<?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 Varun Ladha on Medium]]></title>
        <description><![CDATA[Stories by Varun Ladha on Medium]]></description>
        <link>https://medium.com/@varunladha789?source=rss-6a746ce7f7a6------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*5TiNC72e-lkCY3m4Ie82cA.jpeg</url>
            <title>Stories by Varun Ladha on Medium</title>
            <link>https://medium.com/@varunladha789?source=rss-6a746ce7f7a6------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sun, 22 Nov 2026 13:24:46 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@varunladha789/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[cgroups in Linux]]></title>
            <link>https://varunladha789.medium.com/cgroups-in-linux-8387294a379f?source=rss-6a746ce7f7a6------2</link>
            <guid isPermaLink="false">https://medium.com/p/8387294a379f</guid>
            <category><![CDATA[cgroup]]></category>
            <category><![CDATA[linux]]></category>
            <category><![CDATA[devops]]></category>
            <dc:creator><![CDATA[Varun Ladha]]></dc:creator>
            <pubDate>Sun, 27 Sep 2026 18:21:19 GMT</pubDate>
            <atom:updated>2026-09-27T18:21:19.359Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/440/0*vEqY4IHPMJ-jarkQ" /></figure><p>Control group (cgroup) is a Linux kernel feature that limits, accounts for, and isolates the resource usage (CPU, memory, disk I/O, network, and so on) of a collection of processes.</p><p>Practical to learn cgroups :</p><ul><li>Check cgroup version , I am having cgroup v1</li></ul><pre>mount | grep cgroup</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/977/1*xbM3a4kH4r2DXOKVKrW2qQ.png" /></figure><ul><li>See that how the Linux organizes processes into control groups.</li></ul><pre>systemd-cgls</pre><ul><li>Create a CPU consuming app .</li></ul><pre>mkdir -p ~/cgroup-project<br>cd ~/cgroup-project<br>nano cpu_test.py</pre><pre>import time<br><br>print(&quot;CPU stress application started&quot;)<br><br>while True:<br>    x = 0<br>    for i in range(10_000_000):<br>        x += i * i</pre><p>. Create systemd service and do the required steps .(Read my article on it)</p><pre>sudo nano /etc/systemd/system/cgroup-demo.service</pre><pre>[Unit]<br>Description=Cgroup CPU Management Demo<br><br>[Service]<br>ExecStart=/usr/bin/python3 /home/varun/cgroup-project/cpu_test.py<br>Restart=no<br><br>[Install]<br>WantedBy=multi-user.target</pre><ul><li>Now check the cgroup <em>systemd-cgtop </em>command<em> .</em></li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*htrkxfOwjhp0bGHznkgUZg.png" /></figure><ul><li>Monitor it using <em>systemd-cgtop,top, </em>command and see it is using large ammount of CPU .</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*EQRy5u3AlBB_hO5hvV9rfA.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*IYcjsxCvNZlir6PXgo9OPQ.png" /></figure><ul><li>Now stop the service make following changes to the systemd unit file . Add limitation <em>CPUQuota .</em></li></ul><pre>[Unit]<br>Description=Cgroup CPU Management Demo<br><br>[Service]<br>ExecStart=/usr/bin/python3 /home/varun/cgroup-project/cpu_test.py<br>CPUQuota=20%<br>Restart=no<br><br>[Install]<br>WantedBy=multi-user.target</pre><ul><li>Reload daemon and start service again .</li></ul><pre>sudo systemctl daemon-reload<br>sudo systemctl start cgroup-demo</pre><ul><li>Now monitor again with <em>systemd-cgtop ,ps aux </em>commands . The CPU usage will not exceed 20 % .</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Tu7-2A4YPEtQdfnxyGkW1w.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Ml7J_BQJ68eYpoWjFOiHTg.png" /></figure><ul><li>Now lets do memmory management . Create memory_test.py</li></ul><pre>import time<br><br>print(&quot;Memory allocation started&quot;)<br><br>data = []<br><br>while True:<br>    data.append(&quot;X&quot; * 1024 * 1024)<br>    print(f&quot;Allocated approximately {len(data)} MB&quot;)<br>    time.sleep(1)</pre><ul><li>Stop the cpu_test service and make changes in unit file .</li></ul><pre>[Service]<br>ExecStart=/usr/bin/python3 /home/varun/cgroup-project/memory_test.py<br>MemoryMax=200M<br>Restart=no</pre><ul><li>Let the systemd know the changes .</li></ul><pre>sudo systemctl daemon-reload<br>sudo systemctl start cgroup-demo</pre><ul><li>Monitor service . The Memory is being controled by the configuration in the unit file .</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*6gQcFo2z5YxR1sv0a7ooDg.png" /></figure><ul><li>After Removing the configuration and restarting the deamon and service again monitor service.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*SrNP6vgOFIytbnbAIlmSgg.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*6gQcFo2z5YxR1sv0a7ooDg.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*biiIKnkRGxxU5TEsUaWs3g.png" /></figure><ul><li>See location of Service cgroup .</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/970/1*zhmcguNQ_aBm49RjmKFAHw.png" /></figure><ul><li>In cgroup v2 , you can see all the limitation configuration of cgroup</li></ul><pre>ls /sys/fs/cgroup/system.slice/cgroup-demo.service/</pre><ul><li>In cgroup v1 it is :</li></ul><pre>ls /sys/fs/cgroup/memory/system.slice/cgroup-demo.service</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1021/1*t4bc6M9CNLYeiJtBsp0Bvg.png" /></figure><ul><li>Stop the service using <em>systemctl</em> command .</li></ul><p><strong>cgroups limits the resources usage when we put resource limitation in Docker and Kubernetes .</strong></p><p>Links to learn :</p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fwww.youtube.com%2Fembed%2FxEmDcUExbTs%3Ffeature%3Doembed&amp;display_name=YouTube&amp;url=https%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3DxEmDcUExbTs&amp;image=https%3A%2F%2Fi.ytimg.com%2Fvi%2FxEmDcUExbTs%2Fhqdefault.jpg&amp;type=text%2Fhtml&amp;schema=youtube" width="854" height="480" frameborder="0" scrolling="no"><a href="https://medium.com/media/07f0ac4b7f5ab29672ece59bb37eda45/href">https://medium.com/media/07f0ac4b7f5ab29672ece59bb37eda45/href</a></iframe><ul><li><a href="https://docs.kernel.org/admin-guide/cgroup-v1/cgroups.html">https://docs.kernel.org/admin-guide/cgroup-v1/cgroups.html</a></li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=8387294a379f" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Systemd in Linux]]></title>
            <link>https://varunladha789.medium.com/systemd-in-linux-bf7561051e54?source=rss-6a746ce7f7a6------2</link>
            <guid isPermaLink="false">https://medium.com/p/bf7561051e54</guid>
            <category><![CDATA[systemctl]]></category>
            <category><![CDATA[linux]]></category>
            <category><![CDATA[devops]]></category>
            <category><![CDATA[systemd]]></category>
            <category><![CDATA[computer-science]]></category>
            <dc:creator><![CDATA[Varun Ladha]]></dc:creator>
            <pubDate>Sat, 26 Sep 2026 07:13:31 GMT</pubDate>
            <atom:updated>2026-09-26T07:13:31.086Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/440/0*vEqY4IHPMJ-jarkQ" /></figure><p><strong>Systemd</strong> is a system and service manager for Linux operating systems. It is designed to be backwards compatible with SysV init scripts, and provides a number of features such as parallel startup of system services at boot time, on-demand activation of daemons, or dependency-based service control logic. In simple words , It provides a system and service manager that runs as PID 1 and starts the rest of the system.</p><p>Practical example to understand it</p><ul><li>Create app.py at /opt/systemd-learning-project/</li></ul><pre>from http.server import HTTPServer, BaseHTTPRequestHandler<br><br>class Handler(BaseHTTPRequestHandler):<br>    def do_GET(self):<br>        self.send_response(200)<br>        self.end_headers()<br>        self.wfile.write(b&quot;Learning Systemd&quot;)<br><br>server = HTTPServer((&quot;0.0.0.0&quot;, 8080), Handler)<br>server.serve_forever()</pre><ul><li>Check it is working .</li><li>Now create systemd file .</li></ul><pre>sudo nano /etc/systemd/system/systemd-learning-project.service</pre><pre>[Unit]<br>Description=Learning Systemd Application<br>After=network.target<br><br>[Service]<br>User=devops<br>WorkingDirectory=/opt/systemd-learning-project<br>ExecStart=/usr/bin/python3 /opt/systemd-learning-project/app.py<br><br>Restart=on-failure<br>RestartSec=5<br><br>[Install]<br>WantedBy=multi-user.target</pre><ul><li>Create new User devops and give it access ,it is not necessary you can set your own user in <em>User= in unit file .</em></li></ul><pre>sudo useradd --system --no-create-home devops<br>sudo chown -R devops:devops /opt/myapp/opt/systemd-learning-project</pre><ul><li>Let the systemd know the new service</li></ul><pre>sudo systemctl daemon-reload<br>sudo systemctl start systemd-learning-project.service<br>sudo systemctl status systemd-learning-project.service</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Q0SV1yicFZfnt7uvpqbIyw.png" /></figure><p>. We can also start this with normal server boot .</p><pre>sudo systemctl enable systemd-learning-project</pre><p>Now let us intentionally make service crash.</p><ul><li>Change app.py content</li></ul><pre>import time<br><br>print(&quot;Application starting...&quot;)<br><br>time.sleep(10)<br><br>print(&quot;Application crashing!&quot;)<br><br>raise Exception(&quot;Intentional test failure&quot;)</pre><ul><li>Let the systemd now the changes</li></ul><pre>sudo systemctl restart systemd-learning-project.service<br>sudo systemctl status systemd-learning-project.service</pre><ul><li>Check logs the application is starting after every 5 second because of configuration in unit file .(<em>Restart=on-failure<br>RestartSec=5 </em>)</li></ul><pre>sudo journalctl -u myapp -f</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*udS_WEGCaKNovEEjc1KDZg.png" /></figure><ul><li>Remove that configuration and check the service restarting . The service will not restart by itself .</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Sb1Gaxun0irnYJ5n72_JQg.png" /></figure><p>Links to Learn :</p><ul><li>Basic Systemctl Commands : <a href="https://youtu.be/--w38cgP3kY?si=98oVIS3GjD1LkEcY">https://youtu.be/--w38cgP3kY?si=98oVIS3GjD1LkEcY</a></li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=bf7561051e54" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Kubernetes Operator]]></title>
            <link>https://varunladha789.medium.com/kubernetes-operator-44cfc47494d6?source=rss-6a746ce7f7a6------2</link>
            <guid isPermaLink="false">https://medium.com/p/44cfc47494d6</guid>
            <category><![CDATA[automation]]></category>
            <category><![CDATA[kubernetes]]></category>
            <category><![CDATA[devops]]></category>
            <category><![CDATA[kubernetes-operator]]></category>
            <dc:creator><![CDATA[Varun Ladha]]></dc:creator>
            <pubDate>Wed, 23 Sep 2026 16:40:24 GMT</pubDate>
            <atom:updated>2026-09-23T16:40:24.822Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/818/0*pB9aT0ZlnxwdcNTb" /></figure><p>Operators are software extensions to Kubernetes that make use of custom resources to manage applications and their components.</p><p><strong>Why to use Operator for certificate Management ?</strong></p><p>In a traditional, manual Kubernetes environment, managing TLS certificates involves several labor-intensive steps . Without automated tools like operators, administrators are responsible for the following lifecycle tasks:</p><ul><li><strong>Generation &amp; Provisioning</strong>: The administrator must manually create certificate signing requests (CSRs), generate private keys, and interact with a Certificate Authority (CA) to get certificates signed .</li><li><strong>Deployment</strong>: Once the certificate is ready, the user must manually create Kubernetes secrets to store these files and mount them into the correct pods or deployments .</li><li><strong>Updates &amp; Rotation</strong>: When certificates approach expiration, the administrator must track these dates manually and perform the renewal process to prevent downtime .</li><li><strong>Rollbacks &amp; Scaling</strong>: If issues arise, scaling the infrastructure or rolling back faulty configurations must be executed by hand, requiring constant vigilance and human intervention .</li></ul><p>So here we can automate all this using operator . Read <a href="https://kubernetes.io/docs/concepts/extend-kubernetes/operator/">kuberentes doc </a>for more use cases .</p><p>Practical :</p><p>Install OLM ,operator, using instruction at OperatorrHub searching for relevant operator .</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*11fGm8uBQaJJgI9pfP7COA.png" /></figure><ul><li>Check all pods</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/794/1*MSaKeGHpB1KjxLENdZ8PnQ.png" /></figure><ul><li>Check all CRD .</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/850/1*sHft7RN1VPN9lkGz-05C4A.png" /></figure><ul><li>Create custom resource and check .</li></ul><pre>apiVersion: operators.coreos.com/v1<br>kind: OperatorGroup<br>metadata:<br>  name: cert-manager-operatorgroup<br>  namespace: operators<br>spec:<br>  targetNamespaces:<br>  - operators</pre><pre>apiVersion: cert-manager.io/v1<br>kind: Issuer<br>metadata:<br>  name: selfsigned-issuer<br>  namespace: default<br>spec:<br>  selfSigned: {}</pre><pre>apiVersion: cert-manager.io/v1<br>kind: Certificate<br>metadata:<br>  name: my-app-certificate<br>  namespace: default<br>spec:<br>  secretName: my-app-tls<br>  dnsNames:<br>    - my-app.example.com <br>  issuerRef: <br>    name: selfsigned-issuer <br>    kind: Issuer</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/813/1*Wt0A1B_EoTdhLmJjhbrHFQ.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/582/1*ZgrvPBbCon7BkGxHLqaBpw.png" /></figure><ul><li>Check secrets , operator automated the process of signing the certificate .</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/783/1*RWfVgZIyBeMGgViL_kVH6A.png" /></figure><p><strong>Key takeaway :</strong></p><ul><li><strong>Automation </strong>: The task of certificate management was automated . you moved away from error-prone manual tasks to an<strong> event-driven reconciliation loop</strong> that maintains the desired state of your cluster autonomously.</li><li><strong>Operational Efficiency</strong>: Operator handles complex Day-2 operations — such as certificate issuance, renewal, and secret injection without requiring manual intervention.</li><li><strong>Scalability &amp; Maintenance</strong>: <strong>Operator Lifecycle Manager </strong>(OLM) allowed for a standardized and modular approach to managing cluster-wide tools, making the environment more robust and easier to scale</li></ul><p>Links to Learn :</p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fwww.youtube.com%2Fembed%2FmTC3UZ8bHJc%3Ffeature%3Doembed&amp;display_name=YouTube&amp;url=https%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3DmTC3UZ8bHJc&amp;image=https%3A%2F%2Fi.ytimg.com%2Fvi%2FmTC3UZ8bHJc%2Fhqdefault.jpg&amp;type=text%2Fhtml&amp;schema=youtube" width="854" height="480" frameborder="0" scrolling="no"><a href="https://medium.com/media/7e3cd193f0669689228b4071f2498b52/href">https://medium.com/media/7e3cd193f0669689228b4071f2498b52/href</a></iframe><ul><li><a href="https://kodekloud.com/studio/labs">KodeKloud Studio</a></li><li><a href="https://operatorhub.io/">OperatorHub.io | The registry for Kubernetes Operators</a></li><li><a href="https://olm.operatorframework.io/docs/">Operator Lifecycle Manager(OLM)</a></li><li><a href="https://kubernetes.io/docs/concepts/extend-kubernetes/operator/">Operator pattern</a></li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=44cfc47494d6" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Priority Classes in Kubernetes]]></title>
            <link>https://varunladha789.medium.com/priority-classes-in-kubernetes-6aaaba715d09?source=rss-6a746ce7f7a6------2</link>
            <guid isPermaLink="false">https://medium.com/p/6aaaba715d09</guid>
            <category><![CDATA[priorityclass]]></category>
            <category><![CDATA[kubernetes]]></category>
            <dc:creator><![CDATA[Varun Ladha]]></dc:creator>
            <pubDate>Sun, 20 Sep 2026 14:32:02 GMT</pubDate>
            <atom:updated>2026-09-20T14:32:02.188Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*yhwSlwY_NgmGGdHG" /><figcaption>Priority Classes in K8s</figcaption></figure><p>Priority classes in Kubernetes are used to define priority of pod . It is like all the favourite food is kept on table what should be served first or in what sequence . System pods have higher priority and application pods have lower priority the range (positive 1 billion to -2 billion for application pods)</p><pre>apiVersion: scheduling.k8s.io/v1<br>kind: PriorityClass<br>metadata:<br>  name: high-priority<br>value: 1000000<br>globalDefault: false<br>description: &quot;This priority class should be used for XYZ service pods only.&quot;</pre><p>Now how to assign it to the pod ? Write class name as value of priorityClassName in pod defination.</p><pre>apiVersion: v1<br>kind: Pod<br>metadata:<br>  name: nginx<br>  labels:<br>    env: test<br>spec:<br>  containers:<br>  - name: nginx<br>    image: nginx<br>    imagePullPolicy: IfNotPresent<br>  priorityClassName: high-priority</pre><p>Now what is Preemption- It is like looking for which food served on the table is not being eaten and serving the food other more favourite food .If</p><p>preemptionPolicy defaults to PreemptLowerPriority, it will allow pods of that PriorityClass to preempt lower-priority pods (as is existing default behavior) means food less liked will be removed If preemptionPolicy is set to Never, pods in that PriorityClass will be non-preempting means the food on the table will remain untill eaten and the other favorite food will be brought to table later , but it will come first from the dishes waiting to be served having less demand .</p><pre>apiVersion: scheduling.k8s.io/v1<br>kind: PriorityClass<br>metadata:<br>  name: high-priority-nonpreempting<br>value: 1000000<br>preemptionPolicy: Never<br>globalDefault: false<br>description: &quot;This priority class will not cause other pods to be preempted.&quot;</pre><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=6aaaba715d09" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[SLA,SLO and SLI]]></title>
            <link>https://varunladha789.medium.com/sla-slo-and-sli-762d15c7e4a6?source=rss-6a746ce7f7a6------2</link>
            <guid isPermaLink="false">https://medium.com/p/762d15c7e4a6</guid>
            <category><![CDATA[software-engineering]]></category>
            <category><![CDATA[sre]]></category>
            <category><![CDATA[computer-science]]></category>
            <category><![CDATA[devops]]></category>
            <category><![CDATA[learning]]></category>
            <dc:creator><![CDATA[Varun Ladha]]></dc:creator>
            <pubDate>Mon, 27 Jul 2026 15:17:43 GMT</pubDate>
            <atom:updated>2026-09-02T18:40:19.200Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*WyTWSBOTk8zULhsLi5tQ0A.png" /></figure><h3>Customer Expectation → SLA → SLO → SLI</h3><h4>1. SLI (Service Level Indicator)</h4><p>The actual measured value of service performance. Ex: Availability,Latency,Error Rate,CPU,Memory,APi success,Queue length,Database response time.</p><p>Ex: Suppose a monitoring tool monitors the application is up every minute.</p><p>In month</p><pre>Total checks = 43200<br><br>Successful checks = 43180<br><br>Availability<br><br>43180 / 43200 ×100<br><br>=99.95%</pre><h4>2. SLO (Service Level Objective)</h4><p>The target the service should achieve, like benchmark decided .</p><p>Ex: Availability 99.9 %</p><h4>3. SLA (Service Level Agreement)</h4><p>Legal or contractual agreement between service provider and the customer .</p><p>It includes</p><ul><li>Availability commitment</li><li>Response time</li><li>Support response</li><li>Compensation if violated</li></ul><p>In simpler terms ,</p><pre>SLI = Reality<br><br>SLO = Goal<br><br>SLA = Promise</pre><h4>What SRE do to meet SLO ?</h4><p>They monitor Systems proactively and respond before users are affected .</p><p>Typical practise include :</p><ul><li><em>Monitoring dashboards and alerts for latency, availability, and errors.</em></li><li><em>Capacity planning (CPU, memory, storage, network).</em></li><li><em>Auto Scaling to handle traffic spikes.</em></li><li><em>Load balancing across multiple instances.</em></li><li><em>Regular deployments using CI/CD with rollback strategies.</em></li><li><em>Database tuning and caching.</em></li><li><em>Incident response and postmortems.</em></li><li><em>Chaos testing and disaster recovery drills.</em></li><li><em>Automation to reduce manual errors.</em></li></ul><h4>Error Budget</h4><p>If SLO is 99.9 % than 0.1% is the error budget which means in 43,200 minutes 43.2 minutes dowmtime is allowed .</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=762d15c7e4a6" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Best Practice to write Docker files]]></title>
            <link>https://varunladha789.medium.com/best-practice-to-write-docker-files-07bbc42ee155?source=rss-6a746ce7f7a6------2</link>
            <guid isPermaLink="false">https://medium.com/p/07bbc42ee155</guid>
            <category><![CDATA[dockerfiles]]></category>
            <category><![CDATA[devops]]></category>
            <category><![CDATA[docker-compose]]></category>
            <dc:creator><![CDATA[Varun Ladha]]></dc:creator>
            <pubDate>Wed, 22 Jul 2026 08:12:36 GMT</pubDate>
            <atom:updated>2026-07-27T15:26:07.475Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*tfKEK7G-LOcD1SgoyCzMAw.png" /></figure><p>Well you can get this by asking question to ChatGPT but you will not get the that human touch of explaining with love and who those who know me that little scent of poetry . Drink water and grab your seat !</p><p>Now if you are reading this than I assume you know what is Docker and Dockerfile . I will directly start with best practise to write Dockerfile .</p><ol><li><strong>Use small and secure Base images: </strong>Choose minimal base images like alpine, slim, or distroless to reduce image size and attack surface. Use official images and check them for vulnerabilities . Just like you take small sip of coffee .</li></ol><pre>FROM node:18-alpine</pre><p>2. <strong>Order Instructions Efficiently</strong> : Docker builds images layer by layer, and layers are cached. Put less frequently changing commands (e.g., installing packages) at the top and frequently changing ones (e.g., app code) later.</p><pre>COPY package*.json ./<br>RUN npm install<br>COPY . .</pre><p>3. <strong>Multistage Build</strong> : Separate build and runtime environments to reduce image size.</p><pre>#stg 1 - Build<br>FROM maven:3.8.3-openjdk-17 AS builder<br><br>WORKDIR /app<br><br>COPY . .<br><br>RUN mvn clean install -DskipTests=true<br><br>#stg 2 - Execute<br><br>FROM eclipse-temurin:17-jre-alpine<br><br>WORKDIR /app<br><br>COPY --from=builder /app/target/*.jar /app/target/expenseapp.jar<br><br>EXPOSE 8080<br><br>CMD [&quot;java&quot;,&quot;-jar&quot;,&quot;/app/target/expenseapp.jar&quot;]</pre><p>4. <strong>Minimize Layers</strong> : Combine related commands to reduce the number of layers just like you used to put books in your bag according to timetable .</p><pre>RUN apt-get update &amp;&amp; apt-get install -y \<br>    curl \<br>    git \<br> &amp;&amp; rm -rf /var/lib/apt/lists/*</pre><p>5. <strong>Do not hard code secrets : </strong>Never store passwords, API keys, or credentials in the Dockerfile. Use environment variables or secret management tools (e.g., Docker Secrets, Vault).</p><p>6.<strong>Use </strong><strong>.dockerignore File</strong> : Use .dockerignore File: Exclude unnecessary files (e.g., .git, node_modules, logs) to reduce build context size.</p><p>7. <strong>Set a Non-Root User : </strong>Avoid running containers as root for better security.</p><pre>RUN addgroup app &amp;&amp; adduser -S -G app appuser<br>USER appuser</pre><p>8. <strong>Use </strong><strong>COPY Over </strong><strong>ADD: </strong>As ADD gives extraction of archives also and COPYdo not do that.</p><p>9.<strong> Define </strong><strong>HEALTHCHECK</strong>: Monitor the container’s health and take action on failure. Tabiyat toh sahi hai na Tumhari ?</p><pre>HEALTHCHECK CMD curl --fail http://localhost:8080/health || exit 1</pre><p>10. <strong>Always Use Specific Tags : </strong>Avoid using latest in production. As latest keep changing !</p><pre>FROM node:latest</pre><p>11. <strong>Clean Up Unnecessary Files : </strong>Remove temp/cache files to keep the image clean like you do on every Diwali !</p><pre>RUN apt-get clean &amp;&amp; rm -rf /var/lib/apt/lists/*</pre><p>12.<strong> Use ENTRYPOINT + CMD Properly</strong> : CMD can be overwritten and ENTRYPOINT is difficult to overwrite like written with pen .</p><pre>ENTRYPOINT [&quot;python&quot;, &quot;app.py&quot;]<br>CMD [&quot;--debug&quot;]</pre><p>Happy co- learning !!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=07bbc42ee155" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Political ideas developed in the 19th Century]]></title>
            <link>https://varunladha789.medium.com/political-ideas-developed-in-the-19th-century-ca47ff824cb2?source=rss-6a746ce7f7a6------2</link>
            <guid isPermaLink="false">https://medium.com/p/ca47ff824cb2</guid>
            <category><![CDATA[ncert]]></category>
            <category><![CDATA[history]]></category>
            <category><![CDATA[upsc-preparation]]></category>
            <dc:creator><![CDATA[Varun Ladha]]></dc:creator>
            <pubDate>Sun, 19 Sep 2021 07:08:08 GMT</pubDate>
            <atom:updated>2021-09-19T07:08:08.705Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/615/1*qnPhs0NQAlRyYmH2Avj7KA.jpeg" /></figure><p>In the 19th century, there was a rapid change in society after the French Revolution. The idea of liberty and democratic rights were discussed and debated among people in many European countries.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/300/1*zvsIEJnNM7mzuttwnXCHWQ.jpeg" /></figure><p>Three groups formed on the basis of ideologies</p><p><strong>Liberals</strong> wanted a <strong>radical</strong> change in society such as :</p><p>· Nation tolerant to all religion</p><p>· Opposed Dynastic rule</p><p>· Safeguard rights of individuals against government</p><p>· Independent Judiciary from rulers and officials</p><p>· Parliamentary Government</p><p>· Right to vote to one having property</p><p>· No voting rights for women</p><p><strong>Radicals</strong> wanted a <strong>radical</strong> change in society such as :</p><p>· Government based on the majority of a country’s population</p><p>· Supported women suffaragette</p><p>· No private property and concentration of property in the hands of few</p><p><strong>Conservatives</strong> believed that change should be a gradual process. They did want any major change in society but accepted the inevitable changes.</p><p>Thus these three Liberals, Radicals, and Conservatives groups developed in the 19th century had a great impact on the social, political, and economic changes in history, and still, the society is grouped into such groups based on different idealogy.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=ca47ff824cb2" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Application Load Balancer using AWS CLI]]></title>
            <link>https://varunladha789.medium.com/application-load-balancer-using-aws-cli-76158fb25123?source=rss-6a746ce7f7a6------2</link>
            <guid isPermaLink="false">https://medium.com/p/76158fb25123</guid>
            <category><![CDATA[aws-cloud]]></category>
            <category><![CDATA[aws-cli]]></category>
            <category><![CDATA[application-load-balancer]]></category>
            <dc:creator><![CDATA[Varun Ladha]]></dc:creator>
            <pubDate>Wed, 05 May 2021 14:00:17 GMT</pubDate>
            <atom:updated>2021-05-05T14:03:10.789Z</atom:updated>
            <content:encoded><![CDATA[<h3>Application Load Balancer Using AWS CLI</h3><p><strong>Introduction:</strong></p><p>Cloud Computing is the on-demand delivery of computer power, database, storage and application, and other IT resources through a cloud service platform via the internet with pay-as-you-go pricing.</p><p>Load balancing is a vital component of any cloud environment. It plays an important role in maintaining the availability of your cloud-based applications to customers, business partners, and end-users. It is important in cloud computing to maintain scalability and availability.</p><p>AWS Elastic Load Balancing offers three types of load balancers that all feature the high availability, automatic scaling, and robust security necessary to make your applications fault-tolerant.</p><p>The three types of load balancers are:</p><p>1. <strong>Application Load Balancer </strong>operates at Application Layer (7th layer). It is ideal to route HTTPS and HTTPS request to targets — EC2 instances, containers, IP addresses and Lambda functions.</p><p>2. <strong>Network Load Balancer</strong> operates at the Network layer(4thlayer). It is ideal for TCP and UDP traffic routing connections to Amazon EC2 instances, microservices, and containers — within Amazon Virtual Private Cloud (Amazon VPC) based on IP protocol data. Network Load Balancer is optimized to handle sudden and volatile traffic patterns while using a single static IP address per Availability Zone.</p><p>3. <strong>Classic Load Balancer</strong> provides basic load balancing across multiple Amazon EC2 instances and operates at both the request level and connection level. Classic Load Balancer is intended for applications that were built within the EC2-Classic network.</p><p>We can use AWS Elastic Load Balancer using AWS Management Console as well as AWS CLI.</p><p><strong>AWS Management Console</strong> bring the whole Cloud to your desktop or mobile screens.</p><p><strong>AWS Command Line Interface</strong> (CLI) is a unified tool to manage your AWS services. Using it, we can control multiple AWS services from the command line and automate them through scripts.</p><p>Here we have used AWS CLI for creating load balancer.</p><p><strong>Steps to follow:</strong></p><p>1.Create a free tier account.</p><p>2.Create a IAM User using AWS IAM.</p><p>a. First select add user and give user name.</p><p>b. Select Programmatic access and management console access both.</p><p>c. Select custom password and give password.</p><p>d. Set permissions. There are three options:</p><p>i. You can add user to an existing group or can create a new group and can attach policies as per requirement.</p><p>ii. You can copy permission given to the older user for the new user.</p><p>iii. You can attach existing policy directly to the user</p><p>e. Give tags(optional), Review and Download the csv file and store it in a secure place.</p><p>Here I have created group Adminusers and nawab user is its member.</p><p>3.Type <em>pip install awscli </em>command in command line to<em> </em>download it.</p><p>4.Type <em>aws configure.</em></p><p>a. Enter Access Key from the csv file you downloaded.</p><p>b. Secret access key from the csv file you downloaded.</p><p>c. Enter your region name in which you will create VPC.</p><p>d. Enter json in output format.</p><p>5. Create your own VPC or can use the default VPC.Here I have created my VarunVPC.</p><p>6. You have to make two public subnets in your VPC <strong>in different Availability zone</strong>(compulsory).</p><p>7. Launch one EC 2 instance in one subnet and other EC 2 instance in other subnet.</p><p>8. Create security groups for both the instances and add HTTP and SSH inbound rules. Ensure that the security groups for these instances allow access on the listener port and the health check port.</p><p>9. Use the following command <em>aws elbv2 help</em> to verify that you are running a version of the AWS CLI that supports Application Load Balancers.</p><p>10.Create an Application Load Balancer by giving name of load balancer(it cannot contain _)and subnet id of two subnet in different Availability zone,</p><p><strong><em>aws elbv2 create-load-balancer — name varun-load-balancer — subnets subnet-0fd63d83e2100272c subnet-091b320adbbdcc170 — security-groups sg-0e7cf6e882453be81</em></strong></p><p>11.Create target group giving target group name,protocol,port and vpc id</p><p><strong><em>aws elbv2 create-target-group — name varun-targets — protocol HTTP — port 80 — vpc-id vpc-01554eba4663d7a87</em></strong></p><p>12.Use the register-targets command to register your instances with your target group.Use the instance id of both the EC 2 instance:</p><p><strong><em>aws elbv2 register-targets — target-group-arn arn:aws:elasticloadbalancing:us-west-2:136983541552:targetgroup/varun-targets/078a41e9ec1881f9 — targets Id=i-066cc641c89d3e711 Id=i-0dc590dabbc78c0ab</em></strong></p><p>13. Use the create listener command to create a listener for your load balancer with a default rule that forwards requests to your target group:</p><p><strong><em>aws elbv2 create-listener — load-balancer-arn arn:aws:elasticloadbalancing:us-west-2:136983541552:loadbalancer/app/varun-load-balancer/f19dfb49e137500b — protocol HTTP — port 80 — default-actions Type=forward,TargetGroupArn=arn:aws:elasticloadbalancing:us-west-2:136983541552:targetgroup/varun-targets/078a41e9ec1881f9</em></strong></p><p>14. We can check the health of the instances.</p><p><strong><em>aws elbv2 describe-target-health — target-group-arn arn:aws:elasticloadbalancing:us-west-2:136983541552:targetgroup/varun-targets/078a41e9ec1881f9</em></strong></p><p>15.Delete the Load Balancer giving its arn.</p><p><strong><em>aws elbv2 delete-load-balancer — load-balancer-arn arn:aws:elasticloadbalancing:us-west-2:136983541552:loadbalancer/app/varun-load-balancer/f19dfb49e137500b</em></strong></p><p>16.Delete the Target groups.</p><p><strong><em>aws elbv2 delete-target-group — target-group-arn arn:aws:elasticloadbalancing:us-west-2:136983541552:targetgroup/varun-targets/078a41e9ec1881f9</em></strong></p><p><strong>Conclusion:</strong> Hence we learned how to launch Application Load Balance using AWS CLI.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=76158fb25123" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[A summarised glimpse of Google I/O 2019]]></title>
            <link>https://varunladha789.medium.com/a-summarised-glimpse-of-google-i-o-2019-b3179db47035?source=rss-6a746ce7f7a6------2</link>
            <guid isPermaLink="false">https://medium.com/p/b3179db47035</guid>
            <category><![CDATA[google-io-2019]]></category>
            <category><![CDATA[blogging]]></category>
            <dc:creator><![CDATA[Varun Ladha]]></dc:creator>
            <pubDate>Wed, 15 May 2019 03:59:38 GMT</pubDate>
            <atom:updated>2019-05-15T03:59:38.360Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/310/1*aNOCv1muoVaPZ4TgPkl8Aw.png" /><figcaption>Google I/O 2019</figcaption></figure><p><strong>Google I/O 2019</strong></p><p>The eminent objectives of Google I/O 19 were Productivity, Privacy, and Security on Google platforms.</p><p><strong>Productivity</strong></p><p><strong><em>Kotlin</em></strong></p><p>New Jetpack APIs for reducing coding difficulties.</p><p><strong><em>Android Jetpack</em></strong></p><p>Releasing 6 new Jetpack libraries (in alpha) and 5 beta version libraries.</p><p>The libraries ‘In Spotlight’ were:</p><p><em>CameraX</em></p><ul><li>CameraX provides a consistent camera experience across devices, so you no longer have to maintain device specific configurations. There’s also an easy migration path from legacy Camera APIs(Inbuilt API) and it works seamlessly with camera2 APIs(Installed API). 70% of camera usage on Android comes from installed apps.</li></ul><p><em>Architectural Components</em></p><ul><li>With the ViewModel and the SavedState module, you can eliminate boilerplate code( the code in which line of code is more with fewer functionalities) and gain the benefits of using both ViewModel and SavedState with simple APIs to save and retrieve data right from your ViewModel.</li><li>WorkManager (background processing) and Navigation (navigation between app screens) are also the new features added to maintain the architecture of the Project.</li></ul><p><em>Jetpack Compose</em></p><ul><li>Jetpack Compose is designed to simplify UI development by combining a reactive programming model with the conciseness and ease-to-use Kotlin. It’s compatible with the existing UI toolkit, so you can mix and match views with direct access to all of the Android and Jetpack APIs.</li><li>It’s also fully declarative for defining UI components. And, it’s designed with Material, animations, and tools in mind from the start. Starting today we’re developing this in the open, and you can find an entire code on AOSP.</li></ul><p><strong><em>Android 3.5 Beta</em></strong></p><p>Android Studio 3.5 includes better IDE memory management for large projects, lower typing latency, lint improvements, CPU usage optimizations, layout editor improvements, emulator improvements, build changes, as well as a complete rewrite of Instant Run, now called Apply Changes which reliably accelerates the ability to see your code change on a device — plus over 400 high-priority bug fixes.</p><p><strong><em>Machine Learning at android scale</em></strong></p><ul><li>Improvement in Android’s Neural Network API.</li><li>Increase in the number of operators supported from 38 to 90.</li><li>An introspection API for advanced users, allowing full control over which hardware components handle acceleration (e.g. DSP vs. NPU).</li><li>Working with MediaTek, they accelerated ML Kit’s face detection API by 9X on the Helio P90. Working with Qualcom, they accelerate Google’s Lens OCR on the Snapdragon 855’s AI Engine, increasing speed by 3X while also reducing power consumption by 3.7X.</li></ul><p><strong><em>Dynamic features and in-app updates</em></strong></p><ul><li>Dynamic feature modules transferred from beta stable. With dynamic feature modules, the developer can reduce app size even more by choosing which parts of your app to deliver — based on conditions like device features and country. They can even deliver modules on-demand, instead of delivering at install time.</li><li>in-app updates transferred from beta to stable. The ability to dynamically update apps is something developers have been requesting for a long time. Let’s say there is a crucial bug in the app, and developers need to push it out right away; they don’t want to wait until users discover an update in the Play Store. It’s possible now!</li></ul><p><strong>Privacy</strong></p><p>Android Q Beta with over 50 features and improvements around user privacy and security. These Q changes provide users more transparency and control. And Google is constantly working on security on the basis of feedback from developers all over the globe.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=b3179db47035" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>