Microservices with API Gateway diagram template

An API gateway in front of independently deployable services that each own their data.

Microservices with API Gateway architecture diagramOpen in ArchBoard

Builds a new scene in your browser. Your existing scenes are not touched.

About this design

Microservices trade simplicity for independence, and this template shows the minimum scaffolding that makes the trade worthwhile. Every client request enters through an API gateway that authenticates the caller, applies rate limits and routes to the right service, so individual services never implement those concerns twice. Each service owns its database, which is the rule that matters most: if two services share tables they are one service with extra latency. Services talk to each other synchronously for queries and through events for anything that can happen later. Use the diagram to discuss service boundaries drawn around business capabilities, versioned contracts, distributed tracing so a slow request can be followed across hops, and the cost of a network call that used to be a function call. Add a service only when a team can run it end to end.

Diagram as text

This is the source of the diagram, in the ArchBoard diagram DSL. Paste it into Tools, Diagram from text to rebuild or change it.

title "Microservices with gateway"
direction LR
browser "Web client" -> gateway kong "API gateway" -> auth auth0 "Auth0"
gateway -> microservice users "Users service" -> db postgres "Users DB"
gateway -> microservice orders "Orders service" -> db mysql "Orders DB"
gateway -> microservice catalog "Catalog service" -> db mongodb "Catalog DB"
orders -> topic kafka "Domain events"
domain-events -> worker mail "Notifications"

Related guides

More web architecture templates