Blog · Architecture
Microservices architecture diagram: how to draw one
A microservices architecture diagram shows each independent service, the API gateway that receives calls, the database each service owns and the queues that connect them. It helps a team see who talks to whom, where dependencies hide and what breaks when one service goes down.
A microservices architecture splits a system into small services, each with one responsibility and, usually, its own database. The diagram of that architecture is the map showing those services and how they talk to each other.
What is a microservices diagram?
It is a drawing of boxes and arrows. Each box is a service (orders, payments, catalog, notifications). Each arrow is a conversation: an API call, a message on a queue or a published event. Around the services you add the supporting pieces: the API gateway in front, the databases, the cache, the queue and monitoring.
Without the drawing, the architecture lives in the heads of two or three people. With it, a new teammate understands the system in minutes, and whoever decides knows where to make changes.
What it is for
- Developer onboarding: a new person sees the services and the path of a request.
- Design review: before creating a new service, you can see whether it adds a circular dependency.
- Failure analysis: the drawing answers "if the payment service goes down, what stops?".
- Talking to non-engineers: management and clients understand what exists without reading code.
How to draw it in 6 steps
- List the services by business capability. Split by capability (billing, inventory, users), not by technical layer.
- Add the entry point. Web, apps and partners arrive through an API gateway that handles authentication and routing.
- Give each service its own database. If two services write to the same table, they are not independent yet. Mark that on the drawing.
- Separate synchronous from asynchronous calls. Use a solid arrow for APIs and a dashed or labeled arrow for queues and events.
- Add the supporting pieces. Queue or broker, cache, identity service, logs, metrics and alerts.
- Label every arrow. Write what travels ("order created", "charge approved"). An unlabeled arrow explains nothing.
Example: a store with four services
The customer arrives through the API gateway. The gateway forwards to the catalog service (reads products) and to the orders service (writes the order to its own database). When the order is created, the service publishes an "order created" event on a queue. The payments service consumes the event, charges the customer and publishes "payment approved". The notifications service listens for that event and sends the receipt. Each service has its own database, and none reads another service's database.
Notice that the drawing already answers an important question: if notifications is down, orders are still created and paid, because the link is a queue.
Common mistakes
- Drawing too many services. If every function became a service, the diagram turns into spaghetti. Group by what changes together.
- Hiding the shared database. When one exists, draw it. It is the most useful fact on the map.
- Mixing levels. Servers, containers and code in one drawing confuse people. For the overview, stay at the service level; for detail, make another board (see the C4 diagram).
- Letting the drawing go stale. An outdated diagram misleads more than it helps. Review it whenever a service is added.
How an outsider reads the diagram
Start at the edge: who calls the system? Then follow one request from the gateway to the database. Finally, look for single points of failure: the service everyone calls, the queue with no backup, the shared database. Doing this with the team in front of the drawing often pays off more than a whole slide meeting. To see how data moves between services, add a data flow diagram. For the bigger picture, start with the guide to the software architecture diagram.
How to keep the drawing useful
A diagram is only worth something while it reflects reality. Decide who owns the drawing and review it whenever a service is added, removed or changes responsibility. Keep the repository and documentation link on each piece so the drawing works as an index. When the system grows, create separate boards per domain instead of squeezing everything onto one screen.
How to do this in Mapyra
In Mapyra, create the board from the Microsserviços com API gateway template: it already includes the gateway, services, queues and databases, and you swap the names for your own system. Drag in more pieces, connect them with labeled arrows and share the link with the team or the client. Start with Mapyra and, if you use Claude, ask it to draft the first version through MCP.
Frequently asked questions
What is the difference between a monolith and microservices in a diagram?
A monolith shows one large box with modules inside and one database. Microservices show several independent boxes, each with its own database, connected by APIs and queues. The question becomes how they talk and what fails together.
Do I need an API gateway?
It is not mandatory, but it is common. It centralizes authentication, routing and rate limits at the entrance, and keeps each app from knowing every service. In a small system, calling a service directly may be enough. The diagram helps you decide.
How do I show queue communication in the drawing?
Draw the queue as its own piece between the publisher and the consumer, and use a dashed arrow or a label with the event name. That makes it clear the link is asynchronous and the consumer can be down without taking the publisher with it.