SysPad › Examples › Polyglot microservices platform
Polyglot microservices platform
Kong Gateway routes to three independently-owned services, each on the datastore its team chose: PlanetScale (Orders), MongoDB Atlas (Catalog), Tiger/TimescaleDB (Metrics) - plus a shared self-managed Redis and Amazon MQ for async order events.
Kong as a registered distributor (even split across services, not weighted - a current engine limitation), and a self-managed Redis with an explicit non-zero infra cost.
- Load: 9,000 req/sec
- First to saturate: Metrics Service
- Estimated cost: $18k/mo
How it works
- Kong Gateway
- One front door in front of services that agree on nothing else. Self-hosted, so unlike a managed gateway it carries a fixed monthly cost whether or not anyone calls it.
- PlanetScale
- Orders needs relational guarantees and online schema changes, so its team picked MySQL. Nobody else has to live with that choice.
- MongoDB Atlas
- Catalog documents vary by product type, which is the case document storage genuinely wins. Storing them in the orders database would mean a migration every time marketing invents a field.
- Tiger (TimescaleDB)
- Metrics are append-only and queried by time range, so a time-series store with compression turned on beats a general-purpose database at both cost and speed.
- Shared Redis
- The one thing all three teams share, run by the platform team for the custom Lua a managed cache will not allow. Shared infrastructure is also shared blast radius: everything here degrades together.
- Order Events
- Order events leave the request path here, so fulfilment can be slow, retried, or briefly down without the customer seeing any of it.
Lessons for this architecture
- How Kong Gateway works
- How ECS Fargate works
- How AWS Lambda works
- How PlanetScale works
- How MongoDB Atlas works
- How Tiger (TimescaleDB) works
- How Redis (self-managed) works
- How Amazon MQ works