Scaling a microservice under high load means increasing its capacity to handle traffic, typically by running more instances rather than making a single instance bigger.
If a payment service is CPU-bound during checkout spikes, adding two more pods in Kubernetes with a horizontal pod autoscaler tied to CPU usage lets the system absorb the spike, while the database connection pool is checked to make sure it can support the extra instances.
# 1. Find the bottleneck first
kubectl top pods -l app=payment-service
# 2. Scale out manually for an expected spike
kubectl scale deployment payment-service --replicas=6
# 3. Or let Kubernetes scale automatically on CPU
kubectl autoscale deployment payment-service --cpu-percent=70 --min=2 --max=12
# 4. Make sure the service can scale: stateless pods, enough DB connections
spring:
datasource:
hikari:
maximum-pool-size: 10 # x 12 pods = 120 connections; check the DB limitA concise interview answer is
I'd start by figuring out whether the service is CPU, memory, or dependency bound, then scale horizontally with autoscaling driven by the right metric. I'd also check that downstream dependencies like the database or a rate-limited external API can absorb the extra load, since scaling one service can just move the bottleneck.
Last updated: 1 November 2026
Previous question: What monitoring and logging strategies would you employ in a microservices architecture? How would you centralize logs and metrics for better observability?