business
intermediate
Business: Microservices Gateway
Solution Components
Cloud Cost Estimator
Dynamic Pricing Calculator
$0 / month
Compute Resources
$ 15
Database Storage
$ 25
Load Balancer
$ 10
CDN / Bandwidth
$ 5
* Estimates vary by provider & region
%% Autogenerated business-microservices
graph TD
classDef standard fill:#1e293b,stroke:#38bdf8,stroke-width:1px,color:#e5e7eb;
classDef c-actor fill:#1e293b,stroke:#e5e7eb,stroke-width:1px,stroke-dasharray: 5 5,color:#e5e7eb;
classDef c-compute fill:#422006,stroke:#fb923c,stroke-width:1px,color:#fed7aa;
classDef c-database fill:#064e3b,stroke:#34d399,stroke-width:1px,color:#d1fae5;
classDef c-network fill:#2e1065,stroke:#a855f7,stroke-width:1px,color:#f3e8ff;
classDef c-storage fill:#450a0a,stroke:#f87171,stroke-width:1px,color:#fee2e2;
classDef c-security fill:#450a0a,stroke:#f87171,stroke-width:1px,color:#fee2e2;
classDef c-gateway fill:#2e1065,stroke:#a855f7,stroke-width:1px,color:#f3e8ff;
classDef c-container fill:#422006,stroke:#facc15,stroke-width:1px,color:#fef9c3;
subgraph cluster ["Service Cluster"]
direction TB
gateway["
"]
class gateway c-network
svc_a["
"]
class svc_a c-compute
svc_b["
"]
class svc_b c-compute
svc_c["
"]
class svc_c c-compute
end
subgraph data ["Data Plane"]
direction TB
db_a["
"]
class db_a c-database
db_b["
"]
class db_b c-database
db_c["
"]
class db_c c-database
bus["Event Bus
message-broker
Async Events"] class bus standard end %% Orphans user["
"]
class user c-actor
%% Edges
gateway -.-> svc_a
gateway -.-> svc_b
gateway -.-> svc_c
svc_a -.-> db_a
svc_a -.-> bus
svc_b -.-> db_b
svc_b -.-> bus
svc_c -.-> db_c
API Gatewaygateway
Identity Serviceservice
Billing Serviceservice
Product Serviceservice
Identity DBdatabase
Billing DBdatabase
Product DBdatabase
message-broker
Async Events"] class bus standard end %% Orphans user["
Client Appsactor
Business: Microservices Gateway
For established businesses with multiple product lines or domains, a monolith can become a bottleneck. This architecture introduces a strong API Gateway pattern to route traffic to specialized services.
Core Components:
- API Gateway: A high-performance entry point (Kong, Tyk, or Cloud Native LB) that handles auth, rate limiting, and routing.
- Microservices: Distinct services (e.g., Billing, Users, Catalog) written in the best tool for the job.
- Container Runtime: Services run in containers (Docker/K8s) for isolation.
- Event Bus: Asynchronous communication happens via RabbitMQ, Kafka, or Cloud Pub/Sub.
Why this stack? It allows teams to work independently on different "Bounded Contexts" while presenting a unified API surface to clients.
Tech Stack
| Component | Technology |
|---|---|
| Segment | business |
| Deployment | containers |
| Gateway | api-gateway |
| Orchestration | kubernetes-ecs |
| Communication | rest-grpc |