topic → facts · counter · image

one topic fans out to three microservices through this nginx proxy · Guide →

facts · FastAPI
type a topic and hit Go
counter · Express (called by facts)
no counts yet — they arrive with the first facts reply
image · Go
no image yet — send a topic and watch one land

Load Simulator — autoscaling demo

load · by loadgen (Node)

Generates real CPU load against the facts service. In the k8s lab the autoscaler (HPA) notices within ~15–30s and adds facts pods; here in the compose stack the diagram below simulates that HPA from the measured request rate.

Nothing else to configure — pick a duration and concurrency, press Start Load, and watch the live service graph underneath (or kubectl -n k8slab get hpa -w in the lab).

How long the load runs — HPA samples CPU every ~15s, so 60s+ gives the full demo.

Requests in flight at once — the intensity dial that drives CPU up; 20 is a good show.

load status: unknown

facts replicas: —

Live service graph — requests & replicas

simulated HPA — the cluster lab runs the real one

The graph is the deployed stack's real shape: the dashboard calls /api/* through nginx, and loadgen fires its load run straight at facts (bypassing nginx), each spin request burning CPU in facts and posting its text to counter. Replica scaling is a simulated HPA driven by the measured request rate — the deployed stack is docker compose; the k8s lab (guide §7) runs the real one. Scales 1–6: +1 replica above 30 rps, −1 below 15 rps (hysteresis, 5s cooldown).

topics · polls /api/facts POST /count load run · ?spin=true /api/image wiki summary fetch browser · you this dashboard loadgen Node · :9000 frontend nginx · /api/* proxy facts FastAPI · :8000 ×1 counter Node :3000 image Go · :8080 internet Wikipedia · Commons

loadgen ▸ waiting for a load run — counters arrive with the first one

  1. idle — start a load run above to watch requests flow and replicas scale