Answers: <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>
  
Answers: CC BY-SA 4.0
Answers: 2020-12-30T23:39:03.410Z
Answers: 2020-12-30T23:39:03.410Z
Answers: Jonas
Body: <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>
  
Tags: <api><api-gateway>
Title: Can I run an API gateway on the same instance as my API?
UserDisplayName: Neil
ThreadText: # 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.
  
  
  ---
  
  