Guide
Premium
Advanced
Real Projects

Kubernetes Autoscaling with KEDA: Scale to Zero, Event-Driven Triggers and Fine-Tuning the HPA

A practical guide to event-driven autoscaling on Kubernetes: why CPU-based HPA fails for queue workers, how the HPA formula and its behavior field really work, KEDA ScaledObjects with SQS, cron and Prometheus, scaling to zero without wrecking latency, fallback when a scaler goes down, clean SIGTERM shutdown, and the five mistakes you will hit in production. Copy-paste YAML and code included. September 9, 2026 expanded edition: KEDA internals (operator, metrics server and the generated HPA) with the kubectl get --raw command that separates a scaler failure from an HPA failure, the single external.metrics.k8s.io provider conflict that silently kills prometheus-adapter, the real difference between threshold and activationThreshold and why the latter is ignored when the minimum is 1, the full scaling arithmetic with numbers plus the clarification that cooldownPeriod only governs the 1-to-0 step, ScaledJob and its four scaling strategies, authentication with TriggerAuthentication and workload identity instead of static keys, the parameters that actually matter in the Kafka, Prometheus and cron scalers, the complete cold-start budget with a prepull DaemonSet and the HTTP add-on, the second autoscaling tier with Karpenter and negative-priority capacity reservation, observability with operator metrics and Prometheus alerts, operations with the pause annotations and living with Argo CD, concurrency-based scaling for synchronous services, the real cost and the three cases where KEDA is not the answer, governance at a hundred ScaledObjects, a full case study with a 61% lower bill, FAQ and glossary.

37 minutes read
PuigFlows
4 views

Verificando acceso...

Loading comments...

Related Resources

Guía
PREMIUM

asyncio in Production: Never Block the Event Loop — TaskGroups, Cancellation and Bounded Concurrency

A practical asyncio guide for Python services in production: why blocking the event loop degrades the whole process without raising a single exception, how to catch it by measuring loop lag and with Python 3.14 introspection, structured concurrency with TaskGroup and handling ExceptionGroup via except*, the task the garbage collector makes vanish, timeouts with a deadline budget propagated across services, correct cancellation with cleanup and shield, bounded concurrency with semaphores and backpressured queues, synchronization primitives, and what changes with eager tasks, python -m asyncio pstree and free-threading. With production-ready code and a deployment checklist.

Guía
PREMIUM

Cache-Aside in Production: TTLs, Invalidation, and How to Prevent Cache Stampedes

The complete guide to the cache-aside pattern with Redis: jittered TTLs, correct invalidation, and the three defenses against cache stampedes (distributed lock, single-flight, and XFetch). Expanded with stale-while-revalidate, fail-open and circuit breakers, two-tier caching with RESP3 invalidation, delayed double delete and CDC, hot keys, eviction and memory management, observability with Prometheus, testing, choosing an engine (Redis, Valkey, Memcached), and a complete TypeScript implementation. With production-ready code in Python and TypeScript.

Guía
PREMIUM

Circuit Breakers: How to Prevent Cascading Failures in Distributed Systems

Learn to implement the circuit breaker pattern so a failing dependency never drags down your whole system: the three states (closed, open, half-open), sliding failure windows, limited probes to avoid thundering herds, robust fallbacks, and how to combine it with timeouts, retries, and bulkheads. Includes distributed state in Redis, observability with Prometheus, pytest testing, circuit breaking in Envoy/Istio, a full case study, and production-ready code in Python and TypeScript.