<p>It should be fine to run the API Gateway on the same server as API-apps - for smaller setups. For larger setups when you need more servers may make sense to use dedicated nodes for API Gateways. API Gateways are increasingly playing a dual role as an application load balancer, or Level 7 Proxy for your APIs - those have a <strong>specific role when it comes to network addresses and routing</strong>, this is the main reason to why it makes sense to use dedicated servers for this part of your stack.</p>
<blockquote>
<p>why an API gateway should be on a separate server to the API?</p>
</blockquote>
<p>what is more important for this part of the stack is that you would like to avoid single-point-of-failure, so you should use <strong>more than one instance</strong> for API Gateways, and also for the API apps. When using multiple instances, it is often easier to separate the load balancer/Gateway from your app workload due to the specific needs for network addresses for the gateway, but in the end this depends on how your whole architecture looks.</p>

CC BY-SA 4.0
2020-12-30T23:39:03.410Z
2020-12-30T23:39:03.410Z
Jonas
<p>Is there any reason why an API gateway should be on a separate server to the API? Other than ensuring enough resources for both. I am using krackend API gateway and hosting a python API.</p>

<api><api-gateway>
Can I run an API gateway on the same instance as my API?
Neil
# Can I run an API gateway on the same instance as my API?

(Asked by: username_0 on 2020-12-30)

Is there any reason why an API gateway should be on a separate server to the API? Other than ensuring enough resources for both. I am using krackend API gateway and hosting a python API.

**Tags:** api, api-gateway


---

## 1 answers

### Answer by username_1 on 2020-12-30. Score: 1 | Accepted answer

It should be fine to run the API Gateway on the same server as API-apps - for smaller setups. For larger setups when you need more servers may make sense to use dedicated nodes for API Gateways. API Gateways are increasingly playing a dual role as an application load balancer, or Level 7 Proxy for your APIs - those have a **specific role when it comes to network addresses and routing**, this is the main reason to why it makes sense to use dedicated servers for this part of your stack.

> why an API gateway should be on a separate server to the API?

what is more important for this part of the stack is that you would like to avoid single-point-of-failure, so you should use **more than one instance** for API Gateways, and also for the API apps. When using multiple instances, it is often easier to separate the load balancer/Gateway from your app workload due to the specific needs for network addresses for the gateway, but in the end this depends on how your whole architecture looks.


---

