<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Autoscaling on Backend Engineering Strategy Tools</title><link>https://backend-engineering-strategy-tools.github.io/site/tags/autoscaling/</link><description>Recent content in Autoscaling on Backend Engineering Strategy Tools</description><generator>Hugo -- gohugo.io</generator><language>en-us</language><lastBuildDate>Mon, 01 Jan 2024 00:00:00 +0000</lastBuildDate><atom:link href="https://backend-engineering-strategy-tools.github.io/site/tags/autoscaling/index.xml" rel="self" type="application/rss+xml"/><item><title>Kubernetes Autoscaling</title><link>https://backend-engineering-strategy-tools.github.io/site/public-notes/kubernetes/k8s-autoscaling/</link><pubDate>Mon, 01 Jan 2024 00:00:00 +0000</pubDate><guid>https://backend-engineering-strategy-tools.github.io/site/public-notes/kubernetes/k8s-autoscaling/</guid><description>&lt;p&gt;Kubernetes has built-in autoscaling at two levels: the Horizontal Pod Autoscaler scales the number of pod replicas based on CPU or memory, and the Cluster Autoscaler adds or removes nodes when pods can&amp;rsquo;t be scheduled. KEDA and Karpenter extend these primitives — KEDA pushing workload scaling further, Karpenter replacing the node provisioner entirely.&lt;/p&gt;
&lt;h2 id="keda"&gt;KEDA
&lt;/h2&gt;&lt;p&gt;Kubernetes Event-Driven Autoscaling. KEDA extends the HPA to scale workloads based on external event sources — Kafka consumer lag, queue depth in SQS or RabbitMQ, HTTP request rate, database query results, cron schedules. The built-in HPA only knows about CPU and memory; KEDA adds a long list of scalers for external systems. The important capability it adds is scale-to-zero: a consumer that has no messages to process can scale down to zero pods and scale back up when work arrives. This makes it well-suited for event-driven workloads and batch processing where idle replicas waste resources.&lt;/p&gt;
&lt;h2 id="karpenter"&gt;Karpenter
&lt;/h2&gt;&lt;p&gt;A node provisioner that replaces the Cluster Autoscaler, originally from AWS and now a CNCF project with support for other clouds. Where the Cluster Autoscaler works by adjusting existing Auto Scaling Groups, Karpenter provisions EC2 instances (or equivalent) directly based on the actual resource requirements of pending pods — choosing the right instance type, size, and purchase option (on-demand vs spot) in real time. This makes provisioning significantly faster and more cost-efficient: the cluster gets exactly the nodes the pending workload needs, not the nearest pre-configured node group. Karpenter also handles consolidation — continuously evaluating whether running workloads could be packed onto fewer nodes and replacing over-provisioned nodes accordingly.&lt;/p&gt;
&lt;h2 id="resources"&gt;Resources
&lt;/h2&gt;&lt;ul&gt;
&lt;li&gt;&lt;a class="link" href="https://keda.sh/docs/" target="_blank" rel="noopener"
 &gt;KEDA documentation&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a class="link" href="https://keda.sh/docs/scalers/" target="_blank" rel="noopener"
 &gt;KEDA scalers&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a class="link" href="https://karpenter.sh/docs/" target="_blank" rel="noopener"
 &gt;Karpenter documentation&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a class="link" href="https://karpenter.sh/docs/concepts/" target="_blank" rel="noopener"
 &gt;Karpenter concepts&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;</description></item></channel></rss>