advancedScenario-Based & System Design Questions
After enabling a Kubernetes Horizontal Pod Autoscaler based on CPU usage, replica count fluctuates rapidly up and down ('flapping') under moderately variable load.
This usually indicates the scaling thresholds and stabilization window are too tight for the actual load variability — recommend widening the target CPU threshold's margin, increasing the HPA's stabilization window for scale-down decisions specifically (scale-up can be more aggressive, but rapid scale-down right after a brief lull causes flapping), and verifying the metric being scaled on (CPU) genuinely reflects the actual bottleneck rather than a noisy proxy for it.
Ready to master this question?
Generate a complete walkthrough — background, the full answer in plain language, a working code example explained line by line, a real-world scenario, common mistakes, and how this same question gets asked in different ways.
Sign in to generate a response