The Real Fullstack

The Autoscaling Paradox

Kubernetes scaled from 8 to 40 pods during the peak. Why did response times double?

Architecte10 minLaboratoire de performanceSimulateur de flux
kuberneteshpapostgresqlpgbouncer

Ce défi n'est pas encore traduit en Français. Vous lisez la version anglaise.

Mission:Serve 3,000 requests per second with ≤ 1% errors, database utilisation ≤ 80%, and at most 16 pods' worth of cost.Contexte · Objectifs d'apprentissage ▾

Larkspur's API runs behind a HorizontalPodAutoscaler. During a promotion, latency rose, the HPA kept adding pods up to the maximum, and the database — now juggling 400 connections — slowed down for everyone.

Mission: Serve 3,000 requests per second with ≤ 1% errors, database utilisation ≤ 80%, and at most 16 pods' worth of cost.

Objectifs d'apprentissage

  • See how scaling a tier moves load to a shared dependency.
  • Understand connection contention in PostgreSQL.
  • Use a connection pooler and scale on the real bottleneck.
Simulation
Simulé
Load balancerAPI podsPostgreSQL
Lancer la simulation

Lancez la simulation pour voir la sortie.

Simplification

Each active database connection adds a small amount of contention overhead to every query; real behaviour depends on locks, memory and workload. Modèle pédagogique — les chiffres illustrent un comportement, ce ne sont pas des benchmarks.

Concepts

Utile avant celui-ci

Défis liés

Références