<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Jesus Jackson on Medium]]></title>
        <description><![CDATA[Stories by Jesus Jackson on Medium]]></description>
        <link>https://medium.com/@jesus.jackson?source=rss-97b63407e927------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*yN4vLUFEC3RrGPKBoHJt0A.png</url>
            <title>Stories by Jesus Jackson on Medium</title>
            <link>https://medium.com/@jesus.jackson?source=rss-97b63407e927------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sat, 05 Dec 2026 08:36:00 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@jesus.jackson/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Scaling Pods proactively as a strategy to reduce costs and increase performance in predictable…]]></title>
            <link>https://medium.com/enefitit/scaling-pods-proactively-as-a-strategy-to-reduce-costs-and-increase-performance-in-predictable-db96f375dfaf?source=rss-97b63407e927------2</link>
            <guid isPermaLink="false">https://medium.com/p/db96f375dfaf</guid>
            <category><![CDATA[kubernetes]]></category>
            <category><![CDATA[keda]]></category>
            <dc:creator><![CDATA[Jesus Jackson]]></dc:creator>
            <pubDate>Fri, 07 Nov 2025 11:05:57 GMT</pubDate>
            <atom:updated>2025-11-07T13:19:03.116Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*d-XO_SyJN2YFBAOS.png" /><figcaption><a href="https://www.apptio.com/topics/kubernetes/autoscaling/horizontal/">Apttio.com</a></figcaption></figure><h3>Scaling Pods proactively as a strategy to reduce costs and increase performance in predictable environments</h3><h3>Introduction</h3><p>Scaling resources up and down to meet demand is a fundamental aspect of cloud orchestration. It’s rare for the usage of an online service to remain constant, so dynamic scaling becomes essential.</p><p>Together with the rest of the <strong>ELAB (AI/ML Systems &amp; Prototyping Team, Enefit’s R&amp;D unit)</strong>, we decided to explore an alternative to our current scaling approach.</p><h3>Basic Concepts</h3><p>Our setup runs on <strong>Kubernetes (K8s)</strong>, an open-source system for automating deployment, scaling, and management of containerized applications.</p><p>Each containerized unit is called a <strong>pod</strong> — a lightweight, self-contained environment designed to run a specific application or service.</p><p>Currently, our cluster uses a <strong>reactive scaling</strong> strategy: when monitoring detects high CPU usage, Kubernetes automatically starts additional pods to handle the increased load.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*ED6K2YnMKCe-YD-6.jpg" /><figcaption><a href="https://notes.kodekloud.com/docs/Kubernetes-Autoscaling/Kubernetes-Event-Driven-Autoscaling-KEDA/KEDA-CPU-Scaling">KEDA CPU Scaling — KodeKloud Notes</a></figcaption></figure><p><strong>Keda </strong>means <strong>Kubernetes-based Event Driven Autoscaler</strong>, so when certain events happen (like high usage of certain hardware resources) they trigger an increase or decrease of pods running.</p><p>However, we wondered — what if instead of waiting for a spike to occur, we could <strong>proactively scale</strong> the pods ahead of time and then scale down once the load drops?</p><blockquote><em>This proactive approach is possible in our case because incoming requests follow a strict and predictable schedule.</em></blockquote><h3>Why proactive instead of reactive?</h3><p>Reactive scaling introduces delays while waiting for new pods to initialize and respond. It also requires continuous monitoring of resource usage (in our case, <strong>CPU utilization</strong>) to trigger scaling events.</p><p>Since our APIs receive calls from two separate services, we decided to experiment with <strong>scheduled pod scaling</strong> for both. The idea was to reduce the number of “hot” pods running outside peak hours, while <strong>pre-warming</strong> additional pods a few minutes before expected surges to ensure maximum throughput.</p><h3>What was the usage Scenario?</h3><p>Our workload followed a highly predictable pattern:</p><ul><li>Requests were made every 15 minutes</li><li>Major spikes occurred hourly</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*hh08BCf0J8yuEnsu0O2irQ.png" /><figcaption>The averages</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*owTtgHahoHP4zLhhyFBYEg.png" /><figcaption>Peaks could some times cause big delays depending on resources available</figcaption></figure><p>Previously, we maintained <strong>a constant minimum of 50 active pods</strong> to guarantee immediate response times. While effective, this approach incurred significant costs.</p><p>We wanted to see how far we could scale down while keeping the system just as responsive.</p><h3>The approach we used</h3><p>We based our scaling calculations on the <strong>maximum number of concurrent requests</strong> multiplied by the <strong>average request duration</strong>.</p><p>After several iterations, we arrived at the following configuration:</p><h4>Service 1</h4><pre>minReplicaCount: 3   # previously 50<br>triggers:<br>  - type: cron<br>    metadata:<br>      timezone: &quot;Etc/UTC&quot;<br>      start: &quot;12,27,42,57 * * * *&quot;   # 3 minutes before each quarter hour<br>      end:   &quot;28,33,48,3 * * * *&quot;    # 3 minutes after the peak ends<br>      desiredReplicas: &quot;75&quot;          # observed peaks of 75 requests every 15 minutes</pre><h4>Service 2</h4><pre>minReplicaCount: 4   # previously 50<br>triggers:<br>  - type: cron<br>    metadata:<br>      timezone: &quot;Etc/UTC&quot;<br>      start: &quot;12,27,42,57 * * * *&quot;   # 3 minutes before each quarter hour<br>      end:   &quot;28,33,48,3 * * * *&quot;    # 3 minutes after the peak ends<br>      desiredReplicas: &quot;28&quot;          # observed peaks of ~50 requests, each ~0.5s longs, but the requests are around half a second</pre><h3>The performance Impact</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/972/1*Bt0BIAG0KQBeOSxbpSLWVw.png" /><figcaption>The time per call decreased around 30% with the final pod scaling numbers</figcaption></figure><p>After applying scheduled scaling, the <strong>average response time per API call decreased by around 30%</strong>. This improvement was primarily due to the elimination of pod spin-up delays and CPU-triggered scale events.</p><h3>The Cost Impact</h3><p>Although we observed clear performance improvements, it was difficult to measure exact cost savings. Resource tagging was incomplete, preventing us from isolating the impact on compute costs.</p><p>However, for workloads with longer idle periods between calls, we expect <strong>significant potential savings</strong>, especially through better resource reuse across other workloads that don’t follow strict schedules.</p><h3>Future experiments</h3><p>In future iterations, we plan to refine this approach as part of broader <strong>cost-optimization</strong> efforts. With improved data collection and monitoring in place, we’ll be able to better quantify savings and performance impacts before and after applying scheduled scaling strategies.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=db96f375dfaf" width="1" height="1" alt=""><hr><p><a href="https://medium.com/enefitit/scaling-pods-proactively-as-a-strategy-to-reduce-costs-and-increase-performance-in-predictable-db96f375dfaf">Scaling Pods proactively as a strategy to reduce costs and increase performance in predictable…</a> was originally published in <a href="https://medium.com/enefitit">enefitit</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
    </channel>
</rss>