PrepCity

A request through a cluster scaling, failure and microservices

LessonsOpen the lab
0:00time
2/2pods ready
81requests a second
0%failing
2machines
Kubernetes clusterrented servers in one cloud region (e.g. Amazon EKS, Frankfurt)Control plane (the brain)mostly run for you by the cloud providerShoppersHAProxyIngress controllerService: webPod 1Pod 2Pod 3Pod 4Pod 5Pod 6Metrics serverCloud providerAutoscaler (HPA)SchedulerAPI serverOrders serviceetcdCluster autoscalerPayments serviceDatabase81 req/sround-robin · 81 req/sroutes /shop /cart2 endpoints41% cpu · node-a41% cpu · node-bfree slotfree slotfree slotfree slotp95 240 msokwants 2 podsidleokokok2 machines15% full of 3ok
Step 1 of 10Idea

Follow one request

At 0:02 a shopper sends GET /shop. It does not go straight to the code: HAProxy takes it first, the ingress controller reads the address and path, and the Service hands it to one of the 2 ready pods, here web-1.

web-1 asks the orders service and the database before it can answer: answered 200 in 107 ms. Every hop adds a little delay, and every hop is one more place that can fail.

What changed

  • Request #1: GET /shop
  • Answered in 107 ms

← → step · R replay · Space pause

You will learn

  1. Nothing has happened yet. Events appear here as the run plays.