DEV Community

Discussion on: A Curious Encounter: Unraveling the Roles of Microservices, API Gateways, and API Servers

Collapse
 
deadreyo profile image
Ahmed Atwa • Edited

What are API Gateways usually made with? Are they web servers like nginx or are they runtime services like Nodejs or Java?
Makes me wonder if API Server and Gateway could be merged

Collapse
 
srishtikprasad profile image
Srishti Prasad • Edited

@deadreyo Firstly, API Gateways can be built using different technologies depending on the requirements of the system.

  • Web Server-Based Gateways (e.g. Nginx, Apache)
  • Runtime-Based Gateways (e.g. Node.js, Java, Go, Python)

It’s technically possible to merge an API Gateway and an API Server, especially if you have a small or simple system. However, in most cases, keeping them separate is beneficial due to their distinct roles.
In small-scale applications or monolithic architectures, merging the API Server and Gateway could reduce the number of components to manage.

Collapse
 
deadreyo profile image
Ahmed Atwa

Can web servers manage the authentication and token verification? I assumed no and that a runtime is required for these, due to needing to do complex computations or using a library (for JWT for example), or query the database to verify the token's body is valid.