VPCHTTPSClientAPI gatewayAuthOrdersPaymentsAuth DBOrders DBPayments DB
Architectureeditorial

API Gateway with Microservices

An API gateway routing requests to auth, orders, and payments services, each with its own database, grouped inside a VPC.

Start from this template

Opens in the editor. No signup. Export SVG, PNG, or an embed link.


Source text
title: API Gateway with Microservices
theme: editorial
node client "Client" [client]
node gw "API gateway" [gateway]
node auth "Auth" [service]
node orders "Orders" [service]
node pay "Payments" [service]
node authdb "Auth DB" [database]
node ordersdb "Orders DB" [database]
node paydb "Payments DB" [database]
gw right-of client
orders right-of gw
auth above orders
pay below orders
authdb right-of auth
ordersdb right-of orders
paydb right-of pay
group vpc "VPC" { gw auth orders pay authdb ordersdb paydb }
client -> gw : "HTTPS" flow
gw -> auth
gw -> orders
gw -> pay
auth -> authdb
orders -> ordersdb
pay -> paydb

About this template

A client sends HTTPS requests to an API gateway, which routes them to three services: Auth, Orders, and Payments. Each service owns its database, and everything except the client sits inside a VPC group.

This is the usual picture for a "database per service" microservice design. It makes two points easy to see: the gateway is the single entry point, and services never share a database.

Placement lines keep the layout stable: Auth sits above Orders, Payments below, and each database sits right of its service. To add a service, copy one service line, one database line, and their arrows, then add the new ids to the group.