Elastic Workloads
As demand spikes, our services automatically provision additional instances using Kubernetes Horizontal Pod Autoscalers.
- Services are stateless, so more instances can simply be added.
- Scaling follows load rather than manual changes.
- Instances are removed again when demand falls.
Low load
1 pod
Busy
1
2
3
Spike
1
2
3
4
5
The autoscaler adds instances as load rises and removes them when it falls.
Database-Per-Service
Scaling compute is easy, but scaling data is hard. We use a strictly decoupled database-per-service model to prevent bottlenecks.
- Each module owns its own logical database, except AuditFlow, which owns no persistent store.
- No module connects to another module's schema.
- Needing another module's data means a REST call across the gateway, or reacting to an event.
- Checkout
- Checkout DB
- Payment Gateway
- Payment DB
Checkout reads its own dataallowed
each module owns its database
each module owns its database
Checkout reads the Payment DBblocked
no module connects to another module's schema
no module connects to another module's schema
Checkout asks Payment Gatewayallowed
it asks across the gateway as a REST call
it asks across the gateway as a REST call
Ready to see how it fits together?
See how stateless services fit into the request path and scale across the module map.