O'Reilly logo

TypeScript Microservices by Parth Ghiya

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Design considerations

A good API Gateway should adhere to the following design considerations in order to have a rock solid microservice design:

  • Dependency: There should not be a dependency on any other microservice. An API Gateway is just another microservice. If any service ID is unavailable for a preconfigured time or does not follow the SLAs then API Gateway should not wait for that service. It should rather fail fast using circuit breaker or another fall back strategy like returning cached responses.
  • Database and business logic: API Gateway should not have database connectivity. Gateways are dumb that is they do not have any state. If you need a database then we need to create a separate microservice. Likewise business logic should ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required