<?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 Nandhana on Medium]]></title>
        <description><![CDATA[Stories by Nandhana on Medium]]></description>
        <link>https://medium.com/@nandhana32?source=rss-29681834eeb1------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/0*N6GE3d9q4rgpwrCf</url>
            <title>Stories by Nandhana on Medium</title>
            <link>https://medium.com/@nandhana32?source=rss-29681834eeb1------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sat, 05 Dec 2026 05:57:30 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@nandhana32/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[Automating Public SSL/TLS Certificate Deployment with AWS ACM]]></title>
            <link>https://medium.com/@nandhana32/automating-certificate-management-with-exportable-public-certificates-with-aws-f29cc5e86a80?source=rss-29681834eeb1------2</link>
            <guid isPermaLink="false">https://medium.com/p/f29cc5e86a80</guid>
            <category><![CDATA[aws-certificate-manager]]></category>
            <category><![CDATA[aws]]></category>
            <category><![CDATA[acm-automation]]></category>
            <category><![CDATA[aws-certificate]]></category>
            <dc:creator><![CDATA[Nandhana]]></dc:creator>
            <pubDate>Sun, 04 Oct 2026 12:23:08 GMT</pubDate>
            <atom:updated>2026-10-04T14:32:53.834Z</atom:updated>
            <content:encoded><![CDATA[<p>Friends link for non members : <a href="https://medium.com/@nandhana32/automating-certificate-management-with-exportable-public-certificates-with-aws-f29cc5e86a80?source=friends_link&amp;sk=9ac302e4b1e99af9b96ee691966855ff">https://medium.com/@nandhana32/automating-certificate-management-with-exportable-public-certificates-with-aws-f29cc5e86a80?source=friends_link&amp;sk=9ac302e4b1e99af9b96ee691966855ff</a></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/650/1*p0ra7I7ulgp-vEzNigM-7A.png" /></figure><p>For years, using ACM public certificates meant relying strictly on integrated services like CloudFront or ALBs. If your architecture required terminating TLS directly on custom web servers whether EC2 instances, EKS pods, or hybrid on-premises setups you had to manage certificates manually.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*1gP8BqsNET21BIOU9lns7w.png" /></figure><p>Here are the steps for the initial certificate installation:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/472/1*adcMYw46HiulE2yd5Y-_Tw.png" /></figure><ul><li>First, request a public SSL/TLS certificate in AWS Certificate Manager.</li><li>Next, use an AWS Lambda function to export the certificate along with its private key.</li><li>Then, generate a passphrase to encrypt the private key.</li><li>After that, store the passphrase securely in AWS Secrets Manager.</li></ul><p>Finally, deploy the certificate to our EC2 instances using AWS Systems Manager Automation.</p><h4><strong><em>Automated Certificate Renewal workflow/Architecture</em></strong></h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*qVhdDq2pKCZpS6oPERVTEA.png" /></figure><p>Here is the step-by-step workflow for the automated certificate renewal:</p><ol><li>First, AWS EventBridge triggers the renewal process for the ACM certificate.</li><li>Next, a Lambda function fetches the certificate’s metadata from DynamoDB and starts the AWS Step Function.</li><li>The Step Function then invokes an export Lambda, which extracts the certificate and private key from ACM.</li><li>A passphrase is generated to encrypt the private key and is stored securely in AWS Secrets Manager.</li><li>Another Lambda updates the metadata in DynamoDB.</li><li>Then, Systems Manager Automation installs the renewed certificate onto the EC2 instances.</li><li>Finally, a Lambda function confirms the deployment is complete.</li></ol><p><strong>Reference :</strong></p><p>AWS-re:invent — 2025</p><p><a href="https://www.youtube.com/watch?v=IMe7SjVwdm8">https://www.youtube.com/watch?v=IMe7SjVwdm8</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=f29cc5e86a80" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Monitoring Amazon EKS with OpenTelemetry, AWS X-Ray, Amazon Managed Prometheus and Grafana]]></title>
            <link>https://medium.com/@nandhana32/monitoring-amazon-eks-with-opentelemetry-aws-x-ray-amazon-managed-prometheus-and-grafana-f818d43f2417?source=rss-29681834eeb1------2</link>
            <guid isPermaLink="false">https://medium.com/p/f818d43f2417</guid>
            <dc:creator><![CDATA[Nandhana]]></dc:creator>
            <pubDate>Wed, 30 Sep 2026 14:47:19 GMT</pubDate>
            <atom:updated>2026-09-30T16:47:14.969Z</atom:updated>
            <content:encoded><![CDATA[<p>Friend link for non medium members : -<a href="https://medium.com/@nandhana32/monitoring-amazon-eks-with-opentelemetry-aws-x-ray-amazon-managed-prometheus-and-grafana-f818d43f2417?source=friends_link&amp;sk=d76f40ed977d4272d7b7536348f85d37">https://medium.com/@nandhana32/monitoring-amazon-eks-with-opentelemetry-aws-x-ray-amazon-managed-prometheus-and-grafana-f818d43f2417?source=friends_link&amp;sk=d76f40ed977d4272d7b7536348f85d37</a></p><p>When running microservices on Kubernetes, simply knowing that a pod is running is not enough.</p><p>A production application can have dozens of services communicating with each other:</p><pre>User<br>  │<br>  ▼<br>Ingress / Load Balancer<br>  │<br>  ▼<br>Frontend<br>  │<br>  ├──► User Service<br>  │<br>  ├──► Order Service<br>  │        │<br>  │        ├──► Payment Service<br>  │        │<br>  │        └──► Database<br>  │<br>  └──► Notification Service</pre><p>Now imagine a user reports:</p><p><em>“The checkout page is taking 5 seconds to load.</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/547/1*tutW0rBmMPmRvbOKcrq43w.png" /></figure><p>Which component is responsible?</p><p>Is it the frontend?</p><p>The order service?</p><p>The payment API?</p><p>The database?</p><p>A slow external API?</p><p>Or perhaps one of the Kubernetes pods is under resource pressure?</p><p>This is where observability becomes important.</p><p>In this article, I will build an observability architecture for an Amazon EKS-based microservices application using:</p><ul><li><strong>OpenTelemetry</strong></li><li><strong>AWS Distro for OpenTelemetry (ADOT)</strong></li><li><strong>AWS X-Ray</strong></li><li><strong>Amazon Managed Service for Prometheus (AMP)</strong></li><li><strong>Amazon Managed Grafana</strong></li></ul><p>The goal is to collect:</p><ul><li><strong>Metrics</strong> → Amazon Managed Service for Prometheus</li><li><strong>Distributed traces</strong> → AWS X-Ray</li><li><strong>Visualisation</strong> → Amazon Managed Grafana</li></ul><h3>1. What are we trying to solve?</h3><p>Before installing anything, it is important to understand what each component is responsible for.</p><p>There are three major observability signals:</p><pre>Observability<br>                  │<br>        ┌─────────┼─────────┐<br>        │         │         │<br>      Metrics    Logs     Traces<br>        │                   │<br>        ▼                   ▼<br>      AMP                  X-Ray<br>        │<br>        ▼<br>     Grafana</pre><h3>Metrics</h3><p>Metrics tell us <strong>what is happening</strong>.</p><p>Examples:</p><ul><li>CPU utilisation</li><li>Memory utilisation</li><li>Request rate</li><li>HTTP error rate</li><li>Request latency</li><li>Pod restarts</li><li>Kubernetes resource usage</li></ul><p>Prometheus is designed around this type of time-series data.</p><p>Amazon Managed Service for Prometheus provides a managed, Prometheus-compatible service where we can query metrics using PromQL without managing the underlying Prometheus infrastructure.</p><h3>Traces</h3><p>Traces tell us <strong>where a request travelled</strong>.</p><p>For example:</p><pre>HTTP Request<br>     │<br>     ▼<br>Frontend       120ms<br>     │<br>     ▼<br>Order Service  450ms<br>     │<br>     ▼<br>Payment API   380ms<br>     │<br>     ▼<br>Database       40ms</pre><p>This makes distributed tracing extremely useful for microservices.</p><p>AWS X-Ray provides service maps and trace details that help identify latency and errors across distributed applications.</p><h3>Visualisation</h3><p>Metrics are much easier to understand when displayed through dashboards.</p><p>This is where Grafana comes in.</p><p>Amazon Managed Grafana is a fully managed Grafana service and can use Amazon Managed Service for Prometheus as a data source.</p><h3>2. Why OpenTelemetry?</h3><p>One of the most important concepts in this architecture is OpenTelemetry.</p><p>OpenTelemetry is an open-source observability framework for collecting telemetry such as metrics and traces.</p><p>Instead of building an application specifically around one monitoring vendor, applications can produce telemetry using OpenTelemetry.</p><p>The architecture becomes:</p><pre>Application<br>     │<br>     ▼<br>OpenTelemetry<br>     │<br>     ▼<br>ADOT Collector<br>     │<br>     ├──────────────► Amazon Managed Prometheus<br>     │<br>     └──────────────► AWS X-Ray</pre><p>This separation is valuable because the application does not have to be tightly coupled to the final monitoring backend.</p><p>AWS Distro for OpenTelemetry is AWS’s supported distribution of OpenTelemetry. AWS documents ADOT as a way to collect and send telemetry to services including X-Ray, CloudWatch, Amazon OpenSearch Service and Amazon Managed Service for Prometheus.</p><h3>3. Architecture</h3><p>For this demonstration, I will use the following architecture:</p><pre>AWS<br>                          │<br>                 ┌────────▼────────┐<br>                 │       EKS       │<br>                 │                 │<br>                 │  Microservices  │<br>                 │                 │<br>                 │ ┌─────┐ ┌─────┐ │<br>                 │ │ API │ │Order│ │<br>                 │ └──┬──┘ └──┬──┘ │<br>                 │    │       │    │<br>                 │    └───┬───┘    │<br>                 │        │        │<br>                 │   OpenTelemetry │<br>                 │        │        │<br>                 │  ┌─────▼─────┐  │<br>                 │  │   ADOT    │  │<br>                 │  │ Collector  │  │<br>                 │  └─────┬──┬──┘  │<br>                 └────────┼──┼──────┘<br>                          │  │<br>                Metrics ──┘  └── Traces<br>                    │             │<br>                    ▼             ▼<br>                 Amazon        AWS X-Ray<br>                Managed           │<br>               Prometheus        │<br>                    │             │<br>                    └──────┬──────┘<br>                           │<br>                           ▼<br>                   Amazon Managed<br>                       Grafana</pre><p>There is an important distinction here:</p><p><strong>Grafana will primarily visualize the metrics stored in AMP in this demonstration, while X-Ray remains the tracing backend.</strong></p><p>I am also using Terraform/CLI-oriented infrastructure rather than manually creating every resource through the AWS console.</p><h3>5. Install the ADOT EKS Add-on</h3><p>One thing that initially confused me was looking for “AWS Distro for OpenTelemetry” as an independent AWS service in the console.</p><p>It isn’t.</p><p>For EKS, AWS provides ADOT as an <strong>EKS add-on</strong>.</p><p>The EKS add-on name is:</p><pre>adot</pre><p>AWS currently documents the ADOT EKS add-on as a supported, production-ready AWS distribution of OpenTelemetry. It also requires the cert-manager add-on as a prerequisite.</p><p>The conceptual setup is:</p><pre>EKS Cluster<br>    │<br>    ├── CoreDNS<br>    ├── kube-proxy<br>    ├── VPC CNI<br>    ├── cert-manager<br>    │<br>    └── ADOT</pre><p>Once ADOT is available in the cluster, we can deploy/configure the collector.</p><h3>6. Configure the ADOT Collector</h3><p>The ADOT Collector is the component that receives telemetry and sends it to the appropriate backend.</p><p>Conceptually:</p><pre>ADOT Collector<br>                          │<br>              ┌───────────┴───────────┐<br>              │                       │<br>           Metrics                  Traces<br>              │                       │<br>              ▼                       ▼<br>             AMP                    X-Ray</pre><p>For metrics, the collector can scrape Prometheus-compatible endpoints and remote-write the metrics to Amazon Managed Service for Prometheus. AWS documents this exact ADOT → AMP pattern for EKS.</p><p>For traces, ADOT can export telemetry to AWS X-Ray.</p><p>A simplified collector configuration looks conceptually like:</p><pre>receivers:</pre><pre>otlp:<br>    protocols:<br>      grpc:<br>      http:</pre><pre>prometheus:<br>    config:<br>      scrape_configs:<br>        - job_name: kubernetes<br>          ...</pre><pre>processors:</pre><pre>batch:</pre><pre>exporters:</pre><pre>awsxray:<br>    ...</pre><pre>prometheusremotewrite:<br>    endpoint: &lt;AMP_REMOTE_WRITE_ENDPOINT&gt;</pre><pre>service:</pre><pre>pipelines:</pre><pre>traces:<br>      receivers:<br>        - otlp<br>      processors:<br>        - batch<br>      exporters:<br>        - awsxray</pre><pre>metrics:<br>      receivers:<br>        - prometheus<br>      processors:<br>        - batch<br>      exporters:<br>        - prometheusremotewrite</pre><p>The exact production configuration will depend on how the application and Kubernetes metrics are being collected.</p><h3>7. Metrics → Amazon Managed Prometheus</h3><p>Now let’s look at the metrics pipeline.</p><pre>Kubernetes / Application<br>          │<br>          ▼<br>   Prometheus metrics<br>          │<br>          ▼<br>    ADOT Collector<br>          │<br>          │ remote_write<br>          ▼<br>Amazon Managed Prometheus</pre><p>AMP is Prometheus-compatible, so we can continue using PromQL.</p><p>For example:</p><pre>sum(rate(http_requests_total[5m]))</pre><p>or:</p><pre>sum by (pod) (<br>  rate(container_cpu_usage_seconds_total[5m])<br>)</pre><p>This allows us to answer questions such as:</p><ul><li>How many requests are we receiving?</li><li>Which pods are consuming the most CPU?</li><li>Which services have the highest error rate?</li><li>What is our request latency?</li><li>Are pods restarting?</li><li>Is a deployment causing increased resource consumption?</li></ul><p>AMP is managed by AWS, so we don’t have to operate the Prometheus storage layer ourselves. AWS describes AMP as automatically scaling ingestion, storage and querying for container metrics.</p><h3>8. Metrics → Grafana</h3><p>Now we need somewhere to visualise those metrics.</p><p>This is where Amazon Managed Grafana comes in.</p><p>The flow becomes:</p><pre>EKS<br> │<br> ▼<br>ADOT<br> │<br> ▼<br>AMP<br> │<br> │ PromQL<br> ▼<br>Amazon Managed Grafana<br> │<br> ├── Kubernetes Dashboard<br> ├── Node Dashboard<br> ├── Pod Dashboard<br> ├── Application Dashboard<br> └── Service Dashboard</pre><p>Amazon Managed Grafana can be connected directly to an Amazon Managed Service for Prometheus workspace as a data source. Authentication between the services is handled through AWS integration.</p><p>A useful dashboard could contain:</p><pre>┌─────────────────────────────────────────────┐<br>│              EKS Overview                   │<br>├─────────────────────────────────────────────┤<br>│                                             │<br>│ CPU                 Memory                  │<br>│ ███████ 62%         ██████ 48%              │<br>│                                             │<br>├─────────────────────────────────────────────┤<br>│ Request Rate        Error Rate              │<br>│ 2,340 req/s         0.8%                    │<br>│                                             │<br>├─────────────────────────────────────────────┤<br>│ Pod Restarts        P95 Latency             │<br>│ 3                   420ms                   │<br>│                                             │<br>└─────────────────────────────────────────────┘</pre><h3>9. Distributed Tracing with AWS X-Ray</h3><p>Metrics tell us that something is slow.</p><p>Tracing helps us understand <strong>why</strong>.</p><p>Imagine this request:</p><pre>GET /checkout</pre><pre>│<br>        ▼<br>Frontend<br>  100ms<br>        │<br>        ▼<br>Order Service<br>  150ms<br>        │<br>        ▼<br>Payment Service<br>  2.8 seconds<br>        │<br>        ▼<br>External Payment API<br>  2.6 seconds</pre><p>Without distributed tracing, we might simply see:</p><pre>Checkout latency = 3 seconds</pre><p>With tracing, we can identify the slow dependency.</p><p>The trace might look conceptually like:</p><pre>Trace ID: abc123</pre><pre>checkout<br>│<br>├── frontend             100ms<br>│<br>├── order-service        150ms<br>│<br>└── payment-service     2800ms<br>       │<br>       └── payment-api  2600ms</pre><p>This is where AWS X-Ray becomes extremely useful.</p><p>AWS documents ADOT as the modern way to collect telemetry and send traces to X-Ray.</p><h3>10. The important difference between Metrics and Traces</h3><p>This is one of the most important concepts I took away from this setup.</p><h3>Metrics answer:</h3><blockquote><em>“Is there a problem?”</em></blockquote><p>For example:</p><pre>HTTP 5xx rate = 8%<br>P95 latency = 2.5 seconds<br>CPU = 92%</pre><h3>Traces answer:</h3><blockquote><em>“Where is the problem?”</em></blockquote><p>For example:</p><pre>API<br> └── Order Service<br>      └── Payment Service<br>           └── External Payment API<br>                └── 2.2 seconds</pre><h3>Grafana answers:</h3><blockquote><em>“Can I continuously visualise and monitor these metrics?”</em></blockquote><h3>X-Ray answers:</h3><blockquote><em>“Can I follow an individual request through my distributed application?”</em></blockquote><p>Together they provide much better visibility than using Kubernetes metrics alone.</p><h3>11. A Real Troubleshooting Scenario</h3><p>Let’s say our Grafana dashboard suddenly shows:</p><pre>P95 API latency<br>200ms → 2.4 seconds</pre><p>First, we can use PromQL/Grafana to determine:</p><ul><li>Which service is affected?</li><li>Which pods are affected?</li><li>Did CPU or memory increase?</li><li>Did request volume increase?</li><li>Did the problem start after a deployment?</li></ul><p>Then we move to X-Ray.</p><p>We inspect the traces and discover:</p><pre>API<br> │<br> └── Order Service<br>       │<br>       └── Payment Service<br>             │<br>             └── External Payment API<br>                    │<br>                    └── 2.1 seconds</pre><p>Now the investigation is much more focused.</p><p>Instead of randomly investigating Kubernetes nodes, we can investigate the payment service and its external dependency.</p><p>This is the real value of combining metrics and distributed tracing.</p><h3>12. Why not just use X-Ray?</h3><p>A common question is:</p><blockquote><em>“If X-Ray gives me application traces, why do I need Prometheus and Grafana?”</em></blockquote><p>Because they solve different problems.</p><p>Consider:</p><p>RequirementToolDistributed request tracingAWS X-RayKubernetes metricsPrometheus / AMPApplication metricsPrometheus / AMPPromQL queriesAMPMetrics dashboardsGrafanaTrace/service mapX-RayRequest-level investigationX-RayLong-term metrics storageAMP</p><p>In a real enterprise environment, you may also have logging and other observability platforms.</p><p>The important thing is not to think of observability as choosing <strong>one tool</strong>.</p><p>It is about creating a telemetry pipeline where each tool has a specific responsibility.</p><h3>13. Current AWS Architecture</h3><p>There is an important detail worth mentioning.</p><p>AWS now provides multiple ways to collect metrics from EKS.</p><p>For example, Amazon Managed Service for Prometheus supports managed collectors that can scrape metrics without requiring you to operate a collector inside the cluster.</p><p>AWS currently recommends an agentless managed metrics approach for some AMP use cases.</p><p>However, if you need a collector that handles <strong>metrics plus traces</strong>, AWS documents the self-managed OpenTelemetry Collector approach. That approach can send metrics to AMP and traces to X-Ray.</p><p>For this reason, the architecture in this article deliberately uses:</p><pre>EKS<br> │<br> ▼<br>ADOT Collector<br> ├──────────► AMP<br> │<br> └──────────► X-Ray</pre><p>rather than treating AMP as the entire observability solution.</p><h3>14. The Bigger Picture</h3><p>Once we put everything together:</p><pre>USERS<br>                           │<br>                           ▼<br>                    Load Balancer<br>                           │<br>                           ▼<br>                     Amazon EKS<br>                           │<br>              ┌────────────┴────────────┐<br>              │                         │<br>        Microservice A            Microservice B<br>              │                         │<br>              └────────────┬────────────┘<br>                           │<br>                    OpenTelemetry<br>                           │<br>                           ▼<br>                    ADOT Collector<br>                     /           \<br>                    /             \<br>                   ▼               ▼<br>              METRICS            TRACES<br>                 │                  │<br>                 ▼                  ▼<br>               AMP                X-Ray<br>                 │                  │<br>                 ▼                  ▼<br>              Grafana          Trace Analysis<br>                 │<br>                 ▼<br>             Dashboards</pre><p>This gives us two complementary views of the application.</p><h3>Platform view</h3><pre>Grafana<br>   │<br>   ├── CPU<br>   ├── Memory<br>   ├── Pods<br>   ├── Requests<br>   ├── Errors<br>   └── Latency</pre><h3>Request view</h3><pre>X-Ray<br>   │<br>   ├── Service A<br>   │     │<br>   │     └── Service B<br>   │            │<br>   │            └── Database<br>   │<br>   └── External API</pre><p>One tells us <strong>what is happening</strong>.</p><p>The other helps us understand <strong>where it is happening</strong>.</p><h3>15. What I learned</h3><p>The biggest lesson from this setup is that observability isn’t simply:</p><blockquote><em>“Install a monitoring tool.”</em></blockquote><p>It is about building a telemetry pipeline.</p><p>OpenTelemetry provides a standard way of generating and collecting telemetry.</p><p>ADOT provides the AWS-supported OpenTelemetry distribution.</p><p>Amazon Managed Service for Prometheus provides managed Prometheus-compatible metrics storage and querying.</p><p>Amazon Managed Grafana provides dashboards and visualisation.</p><p>AWS X-Ray provides distributed tracing.</p><p>Together:</p><pre>OpenTelemetry<br>      │<br>      ▼<br>     ADOT<br>   /      \<br>  /        \<br>Metrics    Traces<br>  │          │<br>  ▼          ▼<br> AMP       X-Ray<br>  │<br>  ▼<br>Grafana</pre><p>And that’s the architecture I would want to understand before operating a production microservices platform on EKS.</p><h3>Final Thoughts</h3><p>When troubleshooting production Kubernetes applications, I don’t want to start by randomly checking pods.</p><p>I want observability to tell me:</p><pre>Something is wrong<br>       ↓<br>Which service?<br>       ↓<br>Which endpoint?<br>       ↓<br>Which pod?<br>       ↓<br>Which dependency?<br>       ↓<br>What changed?<br>       ↓<br>What is the actual root cause?</pre><p>That is where combining <strong>OpenTelemetry + ADOT + Amazon Managed Prometheus + Grafana + AWS X-Ray</strong> becomes powerful.</p><p>The goal isn’t simply to collect more telemetry.</p><p>The goal is to turn telemetry into something engineers can use to troubleshoot production systems quickly.</p><h3>AWS References</h3><ul><li>AWS EKS — ADOT and OpenTelemetry: AWS documentation</li><li>AWS X-Ray — ADOT integration</li><li>Amazon Managed Service for Prometheus — ADOT ingestion</li><li>Amazon Managed Grafana — AMP integration</li><li>AWS Observability Accelerator for EKS</li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=f818d43f2417" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[From Three Charts to One: How I Rebuilt My Kubernetes Microservices with a Universal Helm Pattern]]></title>
            <link>https://medium.com/@nandhana32/from-three-charts-to-one-how-i-rebuilt-my-kubernetes-microservices-with-a-universal-helm-pattern-6b9b5115b963?source=rss-29681834eeb1------2</link>
            <guid isPermaLink="false">https://medium.com/p/6b9b5115b963</guid>
            <category><![CDATA[ek]]></category>
            <category><![CDATA[helm]]></category>
            <category><![CDATA[microservices]]></category>
            <category><![CDATA[kubernetes]]></category>
            <category><![CDATA[devops]]></category>
            <dc:creator><![CDATA[Nandhana]]></dc:creator>
            <pubDate>Mon, 06 Jul 2026 18:03:39 GMT</pubDate>
            <atom:updated>2026-07-06T18:03:39.615Z</atom:updated>
            <content:encoded><![CDATA[<p>A practical walkthrough of moving from repetitive, probe-less hand-crafted charts to a single reusable chart that deploys all three services and what genuinely improved.. !</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/800/0*cK28grN3gSGM4CuD.png" /></figure><p>This post walks through exactly that journey on a live AWS EKS cluster: from three separate hand-crafted charts with no health probes, to one reusable chart that deploys all three services with proper production-grade configuration. I’ll show both the before and after, explain what actually improved, and flag the one thing I’d do differently in a company context.</p><h3>The starting point: three separate charts</h3><p>My original setup had a dedicated Helm chart for each microservice order, payment, and user. The folder structure looked like this:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/867/1*oZ5Gy37F8QVU3SE73xYcgw.png" /></figure><p>Each deployment template was nearly identical. Here’s the order-service one:</p><pre>order-service/templates/deployment.yaml</pre><pre>apiVersion: apps/v1<br>kind: Deployment<br>metadata:<br>  name: {{ .Release.Name }}<br>  labels:<br>    app: {{ .Release.Name }}<br>spec:<br>  replicas: {{ .Values.replicaCount }}<br>  selector:<br>    matchLabels:<br>      app: {{ .Release.Name }}<br>  template:<br>    metadata:<br>      labels:<br>        app: {{ .Release.Name }}<br>    spec:<br>      containers:<br>        - name: {{ .Release.Name }}<br>          image: &quot;{{ .Values.image.repository }}:{{ .Values.image.tag }}&quot;<br>          imagePullPolicy: {{ .Values.image.pullPolicy }}<br>          args: {{ toYaml .Values.args | nindent 12 }}<br>          ports:<br>            - containerPort: {{ .Values.service.targetPort }}<br>          resources:<br>            requests:<br>              cpu: {{ .Values.resources.requests.cpu }}<br>              memory: {{ .Values.resources.requests.memory }}<br>            limits:<br>              cpu: {{ .Values.resources.limits.cpu }}<br>              memory: {{ .Values.resources.limits.memory }}</pre><h3>What was wrong with this approach</h3><p>The most serious problem wasn’t the repetition. It was the missing health probes.</p><p>Without liveness, readiness, and startup probes, Kubernetes has no way to know whether your container is actually ready to serve traffic or still starting up. A pod stuck in a deadlock looks identical to a healthy one. Traffic gets routed anyway. Users see errors.</p><ul><li>No startup probe :- long-starting containers get killed and restarted in a loop before they’ve had a chance to initialise</li><li>No readiness probe :- pods receive traffic the moment the container starts, before the application is actually ready to serve requests</li><li>No liveness probe :- a crashed or deadlocked container stays in rotation, silently returning errors until a human notices</li><li>Three templates to maintain :- any structural change to the deployment has to be made in three separate files</li><li>No HPA, ingress, or ConfigMap support</li></ul><h3>The universal chart pattern</h3><p>Instead of one chart per service, one chart that all three services deploy through with a separate values file per service. The chart defines <em>how</em> to deploy. The values file defines <em>what</em> to deploy.</p><p><strong>helm repo add universal-app : </strong><a href="https://yousafkhamza.github.io/universal-app-chart/">https://yousafkhamza.github.io/universal-app-chart/</a></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/877/1*7OMi10phQ3DLaFgsU3l_ZQ.png" /></figure><h3>The values files</h3><pre>values/order-service.yaml</pre><pre>replicaCount: 2<br><br>image:<br>  repository: nginx<br>  tag: latest<br>  pullPolicy: IfNotPresent<br><br>service:<br>  type: ClusterIP<br>  port: 80<br>  targetPort: 80<br><br>resources:<br>  requests:<br>    cpu: 100m<br>    memory: 128Mi<br>  limits:<br>    cpu: 250m<br>    memory: 256Mi<br><br>env:<br>  - name: SERVICE_NAME<br>    value: &quot;order-service&quot;<br><br>probes:<br>  enabled: true<br>  startup:<br>    path: /<br>    initialDelaySeconds: 5<br>    periodSeconds: 5<br>    timeoutSeconds: 3<br>    failureThreshold: 10<br>  liveness:<br>    path: /<br>    initialDelaySeconds: 10<br>    periodSeconds: 15<br>    timeoutSeconds: 3<br>    failureThreshold: 3<br>  readiness:<br>    path: /<br>    initialDelaySeconds: 5<br>    periodSeconds: 10<br>    timeoutSeconds: 3<br>    failureThreshold: 3</pre><p>Payment and user services use identical structure with their respective env SERVICE_NAME var. No other differences for this setup.</p><h3>Deploying all three</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/857/1*qqzzetptDEP5T51BAwR5sQ.png" /></figure><h3>The result</h3><p>Six pods across two EKS nodes, each service spread automatically no manual affinity rules needed. Kubernetes scheduled them across both nodes by default.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/855/1*l0q70kvEydD2oYqg770C8Q.png" /></figure><p>All six pods at 1/1 Ready. The readiness probe passed before any pod entered the service’s endpoint list meaning no pod received traffic until it was confirmed healthy.</p><h3>What actually improved</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/942/1*xiVRm7gUSHr5uOfOM6z1NQ.png" /></figure><p>The chart also exposes ConfigMap, Secret, PVC, Ingress, and ServiceAccount support all optional and all configured per service through values. Adding ingress to order-service does not touch payment-service’s configuration.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=6b9b5115b963" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[The Signal Nobody Tells You About: Thread Dumps via SIGQUIT During a Production Outage in JVM]]></title>
            <link>https://medium.com/@nandhana32/title-the-signal-nobody-tells-you-about-thread-dumps-via-sigquit-during-a-production-outage-in-d86ab0ee6e8a?source=rss-29681834eeb1------2</link>
            <guid isPermaLink="false">https://medium.com/p/d86ab0ee6e8a</guid>
            <category><![CDATA[production-outage]]></category>
            <category><![CDATA[sre]]></category>
            <category><![CDATA[devops]]></category>
            <category><![CDATA[jvm-debugg]]></category>
            <dc:creator><![CDATA[Nandhana]]></dc:creator>
            <pubDate>Sun, 05 Jul 2026 12:06:49 GMT</pubDate>
            <atom:updated>2026-07-05T13:27:43.080Z</atom:updated>
            <content:encoded><![CDATA[<p>I was reading through the JVM man pages recently and stumbled across the -Xrs flag. The description was short: &quot;Reduces the use of operating system signals by the JVM.&quot; Buried in that one line is something every DevOps and SRE engineer dealing with Java in production should know about: SIGQUIT.</p><h3>The problem it solves</h3><p>My usual move for a thread dump is<strong> jcmd PID Thread.print</strong>. Clean, fast, done. But recently I&#39;ve been working with environments where only the JRE is installed, not the full JDK.<strong> No jcmd. No jstack</strong>. Nothing you&#39;d normally reach for.</p><p>Turns out there’s a much older, more universal way to get the same result.</p><h3>Using SIGQUIT</h3><p>Every JVM, unless told otherwise, installs a handler for the SIGQUIT signal. Send it a SIGQUIT and instead of dying (which is what SIGQUIT does to most Unix processes by default), the JVM prints a full thread dump of every thread currently running, plus some garbage collection stats at the end.</p><pre>ps -a | grep java        # find the PID<br>kill -QUIT 44649          # or: kill -3 44649</pre><p>That’s it. No extra tooling required, just ps, grep, and kill, which exist on basically every Linux box you&#39;ll ever SSH into.</p><h3>The one thing that will bite you: -Xrs</h3><p>Here’s the gotcha that sent me down this rabbit hole in the first place. If the JVM was started with -Xrs, it does <strong>not</strong> install its custom signal handlers. That means SIGQUIT falls back to the OS default behavior, which is to terminate the process.</p><p>So on a normal JVM: SIGQUIT gives you a dump and the app keeps running, completely unaffected. On a JVM started with -Xrs: SIGQUIT kills the app outright.</p><p>Worth checking your startup flags (ps -ef | grep java and look at the JVM args) before you casually kill -3 something in production for the first time.</p><h3>Does taking a dump pause or kill the threads?</h3><p>No. This is the part that trips people up because SIGQUIT sounds destructive. It isn’t, under normal conditions. Think of it like a manager walking into a room and shouting “everyone freeze and shout out what you’re doing right now.” Every thread reports its current stack trace, then goes right back to work. Nothing is interrupted, paused, or terminated. It’s a non-destructive snapshot.</p><h3>What’s actually in the dump, and how many threads should you expect</h3><p>A typical production Java app has somewhere between <strong>50 and 500 threads</strong> at any given time: request-handling threads, DB connection pool threads, GC threads, scheduled task threads, thread pools pulled in by libraries. If you see numbers well beyond that, that’s often a thread leak, not normal load.</p><p>Critically, you only take <strong>one dump</strong>, not one per thread. A single kill -3 captures every thread in the JVM at that instant, in one text output. It&#39;s a group photo, not individual portraits.</p><p>A single thread’s entry looks like this:</p><pre>&quot;http-nio-8080-exec-42&quot; #87 daemon prio=5 ...<br>   java.lang.Thread.State: BLOCKED (on object monitor)<br>   at com.myapp.PaymentService.charge(PaymentService.java:112)<br>   - waiting to lock &lt;0x000000076ab...&gt; held by &quot;http-nio-8080-exec-13&quot;</pre><h3>How to actually triage this during a live outage</h3><p>A dump with 300 threads in it is useless if you just scroll through it top to bottom during an incident call. Here’s the order that works:</p><ol><li><strong>Group by thread state first.</strong> Search for BLOCKED, WAITING, TIMED_WAITING, RUNNABLE. A pile of BLOCKED threads points at lock contention or a deadlock.</li><li><strong>Check for an explicit deadlock report.</strong> jstack/jcmd output prints a Found one Java-level deadlock section naming the exact threads and locks. Raw kill -3 output doesn&#39;t do this for you, you have to manually match &quot;waiting to lock X held by thread Y&quot; chains.</li><li><strong>Filter to your own package first.</strong> Search for your app’s package name (e.g. com.myapp) to skip past framework and internal JVM threads and get straight to your code.</li><li><strong>For high CPU instead of a hang</strong>, take 2–3 dumps a few seconds apart. Whichever thread stays RUNNABLE in the same stack location across all of them is your hot spot.</li><li><strong>Don’t eyeball it manually.</strong> Paste the output into a thread dump analyzer. fastthread.io is free, web-based, and auto-detects deadlocks and blocked chains. IntelliJ also has a built-in analyzer under Analyze &gt; Analyze Stacktrace.</li></ol><h3>Why this matters even if you’re not a developer</h3><p>This sits in a shared zone between DevOps/SRE and development, and that’s exactly what makes it valuable. Capturing the dump and doing first-pass triage (is everything blocked, is one thread pegged at 100%, is there a printed deadlock) requires zero knowledge of the codebase. It’s pattern recognition on thread states. The deep root cause, actually understanding <em>why</em> PaymentService.charge() deadlocks, is dev territory. But showing up to an incident already able to say &quot;these two threads are deadlocked on these two locks, here&#39;s the dump&quot; instead of waiting for a developer to start from zero is a real reduction in MTTR, and MTTR reduction is a metric most of us already own.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=d86ab0ee6e8a" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[“A billion dollars here, a billion dollars there…” — the cost lesson every DevOps engineer learns…]]></title>
            <link>https://medium.com/@nandhana32/a-billion-dollars-here-a-billion-dollars-there-the-cost-lesson-every-devops-engineer-404d3b24a804?source=rss-29681834eeb1------2</link>
            <guid isPermaLink="false">https://medium.com/p/404d3b24a804</guid>
            <category><![CDATA[design-systems]]></category>
            <category><![CDATA[devops-testing]]></category>
            <category><![CDATA[testing]]></category>
            <dc:creator><![CDATA[Nandhana]]></dc:creator>
            <pubDate>Sat, 04 Jul 2026 14:32:58 GMT</pubDate>
            <atom:updated>2026-07-04T14:36:08.516Z</atom:updated>
            <content:encoded><![CDATA[<p><strong>“A billion dollars here, a billion dollars there…” — the cost lesson every DevOps engineer learns the hard way</strong></p><p>There’s a line in Michael Nygard’s <em>*Release It!*</em> that has stuck with me more than any framework or tool ever has.</p><p>It’s a riff on the old political quip: “A million here, a million there, and pretty soon you’re talking about real money.” Nygard’s version, applied to engineering, is this: organisations will fight hard to avoid a one-time expense, while quietly bleeding out through recurring operational costs that dwarf it many times over.</p><p>I’ve watched this play out on real infrastructure, and I’ve caused it myself early in my career. Here’s the pattern.</p><p><strong>The one-time cost is visible. The recurring cost is invisible.</strong></p><p>A one-time expense shows up as a single line item that needs a name attached to it and a sign-off. Buy the extra capacity. Pay for the proper monitoring stack. Spend two sprints building real deployment automation. Someone has to approve that number, so it gets scrutinised, negotiated, and often cut.</p><p>A recurring cost doesn’t work like that. It’s an engineer pulled into a 2am page. It’s the hour lost every deploy because the pipeline needs a manual babysit. It’s the slow drip of toil that never appears as a single number on anyone’s budget, because it’s smeared across every sprint, every on-call rotation, every postmortem nobody has time to act on.</p><p>By the time the recurring cost is added up, it’s usually far bigger than the one-time cost anyone refused to spend. It’s just been paid in instalments, by people, instead of in one instalment, by a budget.</p><p><strong>Three places this shows up constantly</strong></p><p><em>*Capacity planning.*</em> Under-provisioning to save on infrastructure spend looks efficient in a cost report. In production it becomes recurring firefighting: manual scaling at 3am, incident channels lighting up during traffic spikes, engineers context-switching out of real work to babysit load. The “savings” get eaten by lost engineering time and, eventually, by the outage that finally forces the upgrade anyone was trying to avoid.</p><p><em>*Deployment automation.*</em> Knight Capital lost $440 million in 45 minutes in 2012 because a manual, error-prone deployment process left old code running on one production server. The company had avoided investing properly in deployment safety for years. That avoided cost didn’t disappear, it compounded quietly through every risky manual release, until it was called in all at once.</p><p><em>*Technical debt.*</em> The quick patch that skips the proper fix saves an afternoon today. It also becomes the workaround that three future engineers have to route around, the edge case that breaks every migration, the thing nobody wants to touch during an incident because nobody fully understands it anymore. One afternoon saved, months repaid.</p><p><strong>The question worth asking before you say no to the upfront cost</strong></p><p>Not “can we afford this now,” but “who pays for not doing this, and when.” If the answer is “future on-call engineers, in small unbudgeted instalments, indefinitely,” that’s not actually the cheaper option. It’s just an option where the bill is hidden and handed to someone else.</p><p>Release It! frames this as a resilience and capacity problem. I think it’s really a budgeting problem wearing an engineering costume. The most expensive systems I’ve worked on were never the ones with a big upfront investment. They were the ones where every upfront investment got quietly declined, one reasonable-sounding decision at a time.</p><p>— -</p><p><em>*If you’ve seen this pattern play out, one-time investment skipped, recurring cost paid for years, I’d be curious to hear the story.*</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=404d3b24a804" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[I Built a Production-Grade Microservices Platform on AWS EKS From Scratch.]]></title>
            <link>https://medium.com/@nandhana32/i-built-a-production-grade-microservices-platform-on-aws-eks-from-scratch-91da9e33dfc7?source=rss-29681834eeb1------2</link>
            <guid isPermaLink="false">https://medium.com/p/91da9e33dfc7</guid>
            <category><![CDATA[architecture]]></category>
            <category><![CDATA[aws-eks]]></category>
            <category><![CDATA[kubernetes]]></category>
            <category><![CDATA[microservices]]></category>
            <category><![CDATA[api-gateway]]></category>
            <dc:creator><![CDATA[Nandhana]]></dc:creator>
            <pubDate>Fri, 03 Jul 2026 22:16:34 GMT</pubDate>
            <atom:updated>2026-07-04T11:31:41.471Z</atom:updated>
            <content:encoded><![CDATA[<h3><strong>I Built a Production-Grade Microservices Platform on AWS EKS From Scratch. Here Is Everything That Went Wrong !</strong></h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*IMf9fLzFATHjj83vgnHjJg.png" /></figure><p>I have been working with Kubernetes and AWS for years, so I decided to do it deliberately spin up a full production-grade EKS platform manually, component by component, so I had no choice but to understand every piece.</p><p>This is not a clean tutorial where everything works first time. It is the actual record of what I built, what broke, and how I fixed it. I think that is more useful.</p><p><strong>## The Network First</strong></p><p>I started with a blank VPC. `10.0.0.0/16` in `us-east-1`. Everything else builds on top of this so it is worth getting right before touching a single EC2 instance.</p><p>Four subnets across two availability zones:</p><pre>- 10.0.1.0/24 - public, AZ1<br>- 10.0.2.0/24 - public, AZ2<br>- 10.0.3.0/24 - private, AZ1<br>- 10.0.4.0/24 - private, AZ2</pre><p>Public subnets get an Internet Gateway. Private subnets get NAT Gateways one per AZ, not one shared. The reason: if I put a single NAT Gateway in AZ1 and AZ1 goes down, every node in AZ2 loses outbound internet access too. Two NAT Gateways costs more, but that is how you do HA properly.</p><p>Three route tables — one public (routes to IGW), two private (each routes to its own NAT Gateway).</p><p>Before moving on, I tagged all four subnets. These tags are not optional:</p><pre>Public subnets: kubernetes.io/role/elb = 1<br>Private subnets: kubernetes.io/role/internal-elb = 1<br>All subnets: kubernetes.io/cluster/workshop-dev = shared</pre><p>The AWS Load Balancer Controller uses these to discover which subnets to place load balancers in. Skip them and you spend an afternoon wondering why no ALB is being created.</p><p>—</p><p><strong>## IAM Roles and the EKS Cluster</strong></p><p>EKS needs two IAM roles before it will let you create anything. One for the control plane, one for the worker nodes.</p><pre>Control plane role: attach `AmazonEKSClusterPolicy`.<br>Node role: attach three policies - `AmazonEKSWorkerNodePolicy`, `AmazonEKS_CNI_Policy`, and `AmazonEC2ContainerRegistryReadOnly`.</pre><p>The node role needs ECR read access because the nodes pull container images. Without it, every pod will fail with `ImagePullBackOff` and you will spend time looking in the wrong place.</p><p>Cluster: Kubernetes 1.35, `us-east-1`, public and private endpoint access both enabled.</p><p>—</p><p><strong>## First Mistake: EKS Access Entries</strong></p><p>Once the cluster was active, I ran `kubectl get nodes` and got this:</p><pre>E0702 14:08:48 memcache.go:265 couldn&#39;t get current server API group list:<br>the server has asked for the client to provide credentials</pre><p>AWS credentials were fine. `aws sts get-caller-identity` returned the correct user. The issue is that EKS has two completely separate authentication layers and people regularly confuse them.</p><p>Layer 1: AWS IAM — are you a valid AWS identity? Checked via SigV4 signed requests.</p><p>Layer 2: Kubernetes RBAC — once you are through the door, what are you allowed to do?</p><p>Passing layer 1 does not give you layer 2. You have to explicitly register your IAM identity with the cluster.</p><p>In older EKS versions, you did this by editing an `aws-auth` ConfigMap inside the cluster. If you corrupted that file, you locked yourself out permanently. EKS 1.35 uses Access Entries instead — managed via the AWS API, outside the cluster.</p><pre>aws eks create-access-entry \<br>- cluster-name workshop-dev \<br>- principal-arn arn:aws:iam::ACCOUNT_ID:user/Nandhana \<br>- region us-east-1</pre><pre>aws eks associate-access-policy \<br>- cluster-name workshop-dev \<br>- principal-arn arn:aws:iam::ACCOUNT_ID:user/Nandhana \<br>- policy-arn arn:aws:eks::aws:cluster-access-policy/AmazonEKSClusterAdminPolicy \<br>- access-scope type=cluster \<br>- region us-east-1</pre><p>Then:</p><pre>aws eks update-kubeconfig - region us-east-1 - name workshop-dev<br>kubectl get nodes</pre><p>Two nodes, both Ready.</p><p>One thing worth knowing: when you create an EKS cluster through the AWS Console, the console uses a browser session role internally — not your IAM user. So your IAM user is never automatically registered as the cluster creator. This catches everyone at least once.</p><p>—</p><p><strong>## The AWS Load Balancer Controller and IRSA</strong></p><p>The AWS Load Balancer Controller is what creates real AWS ALBs when you define a Kubernetes Ingress resource. Without it, an Ingress is just a piece of YAML that does nothing.</p><p>For the controller to create ALBs, it needs to call AWS APIs. The naive approach is to put AWS access keys in environment variables inside the pod. Do not do this. Keys can leak through logs, `kubectl describe`, CI output. They are long-lived. If the pod is compromised, the attacker has indefinite access.</p><p>The correct approach is IRSA — IAM Roles for Service Accounts.</p><p>The idea: instead of giving the pod static credentials, Kubernetes injects a short-lived signed token into the pod at runtime. The pod exchanges that token with AWS STS via an OIDC provider. STS validates the token and issues temporary credentials that expire in an hour. The pod calls AWS APIs. The credentials rotate automatically.</p><p>No keys stored anywhere. Nothing to leak. If the pod is compromised, the credentials expire in under an hour.</p><p>Setting it up:</p><p># Tell AWS to trust this cluster as an identity provider</p><pre>eksctl utils associate-iam-oidc-provider \<br>- cluster workshop-dev \<br>- region us-east-1 \<br>- approve</pre><p># Create the IAM policy that defines what the controller is allowed to do</p><p>curl -o iam_policy.json <a href="https://raw.githubusercontent.com/kubernetes-sigs/aws-load-balancer-controller/main/docs/install/iam_policy.json">https://raw.githubusercontent.com/kubernetes-sigs/aws-load-balancer-controller/main/docs/install/iam_policy.json</a></p><pre>aws iam create-policy \<br>- policy-name AWSLoadBalancerControllerIAMPolicy \<br>- policy-document file://iam_policy.json</pre><p># Create the IAM role and Kubernetes service account, linked via OIDC</p><pre>eksctl create iamserviceaccount \<br>- cluster workshop-dev \<br>- namespace kube-system \<br>- name aws-load-balancer-controller \<br>- attach-policy-arn arn:aws:iam::ACCOUNT_ID:policy/AWSLoadBalancerControllerIAMPolicy \<br>- override-existing-serviceaccounts \<br>- region us-east-1 \<br>- approve</pre><p>That last command creates an IAM role, attaches the policy, creates a Kubernetes service account, annotates it with the role ARN, and sets a trust policy scoped to only this service account in this cluster. All in one step.</p><p>Install the controller:</p><pre>helm repo add eks https://aws.github.io/eks-charts<br>helm repo update<br>helm install aws-load-balancer-controller eks/aws-load-balancer-controller \<br>-n kube-system \<br>- set clusterName=workshop-dev \<br>- set serviceAccount.create=false \<br>- set serviceAccount.name=aws-load-balancer-controller \<br>- set region=us-east-1 \<br>- set vpcId=YOUR_VPC_ID</pre><p>`serviceAccount.create=false` tells Helm to use the one we just created rather than making a new one.</p><p>— -</p><p><strong>## Three Microservices via Helm (Written From Scratch)</strong></p><p>Rather than pulling an existing chart, I wrote all three from scratch. You learn more from writing it than from configuring someone else’s work.</p><p>Structure for each service:</p><pre>user-service/<br>Chart.yaml<br>values.yaml<br>templates/<br>deployment.yaml<br>service.yaml</pre><p>`values.yaml` for user-service:</p><pre>replicaCount: 2<br>image:<br>repository: hashicorp/http-echo<br>tag: &quot;0.2.3&quot;<br>args:<br>- &quot;-text=Hello from user-service&quot;<br>- &quot;-listen=:5678&quot;<br>-----------------------------------------<br>service:<br>type: ClusterIP<br>port: 80<br>targetPort: 5678</pre><p>`hashicorp/http-echo` is a lightweight container that just returns a string. Perfect for testing routing without needing real application code.</p><p>`deployment.yaml` using Go templating:</p><pre>apiVersion: apps/v1<br>kind: Deployment<br>metadata:<br>name: {{ .Release.Name }}<br>spec:<br>replicas: {{ .Values.replicaCount }}<br>selector:<br>matchLabels:<br>app: {{ .Release.Name }}<br>template:<br>metadata:<br>labels:<br>app: {{ .Release.Name }}<br>spec:<br>containers:<br>- name: {{ .Release.Name }}<br>image: &quot;{{ .Values.image.repository }}:{{ .Values.image.tag }}&quot;<br>args: {{ toYaml .Values.args | nindent 12 }}<br>ports:<br>- containerPort: {{ .Values.service.targetPort }}</pre><p>`{{ .Release.Name }}` gets replaced with whatever name you give at install time. Same templates, different values, three completely different deployments.</p><pre>helm install user-service ./user-service -n default<br>helm install order-service ./order-service -n default<br>helm install payment-service ./payment-service -n default</pre><p>Six pods running, two per service.</p><p>—</p><p><strong>## Second Mistake: The ALB That Would Not Appear</strong></p><p>I created the Ingress resource with path-based routing to each service:</p><pre>apiVersion: networking.k8s.io/v1<br>kind: Ingress<br>metadata:<br>name: workshop-ingress<br>namespace: default<br>annotations:<br>kubernetes.io/ingress.class: alb<br>alb.ingress.kubernetes.io/scheme: internet-facing<br>alb.ingress.kubernetes.io/target-type: ip<br>spec:<br>rules:<br>- http:<br>paths:<br>- path: /users<br>pathType: Prefix<br>backend:<br>service:<br>name: user-service<br>port:<br>number: 80<br>- path: /orders<br>pathType: Prefix<br>backend:<br>service:<br>name: order-service<br>port:<br>number: 80<br>- path: /payments<br>pathType: Prefix<br>backend:<br>service:<br>name: payment-service<br>port:<br>number: 80</pre><p>Applied it. Waited. No ALB appeared. Checked the controller logs and found this:</p><pre>AccessDenied: User is not authorized to perform:<br>elasticloadbalancing:DescribeListenerAttributes</pre><p>The IAM policy I had downloaded was from v2.7.2 of the controller, but the deployed version needed a newer permission that was not in that policy version. I downloaded the latest policy from the main branch and created a new policy version:</p><pre>curl -o iam_policy_new.json https://raw.githubusercontent.com/kubernetes-sigs/aws-load-balancer-controller/main/docs/install/iam_policy.json<br>aws iam create-policy-version \<br>- policy-arn arn:aws:iam::ACCOUNT_ID:policy/AWSLoadBalancerControllerIAMPolicy \<br>- policy-document file://iam_policy_new.json \<br>- set-as-default</pre><p>Restarted the controller pods to pick up the new permissions:</p><pre>kubectl rollout restart deployment aws-load-balancer-controller -n kube-system</pre><p>ALB appeared within two minutes. Tested the routes:</p><pre>curl http://&lt;ALB-DNS&gt;/users # Hello from user-service<br>curl http://&lt;ALB-DNS&gt;/orders # Hello from order-service<br>curl http://&lt;ALB-DNS&gt;/payments # Hello from payment-service</pre><p><strong>## API Gateway and VPC Link</strong></p><p>The ALB works. But it is internet-facing, which means anyone who discovers the DNS name can bypass API Gateway entirely and hit it directly. That defeats the purpose of having API Gateway.</p><p>The proper pattern is to put API Gateway in front as the only public entry point, and connect it to the ALB privately via a VPC Link.</p><p>VPC Link creates a private network tunnel using AWS PrivateLink. API Gateway sends requests through the tunnel to your ALB inside the VPC. Traffic never leaves the AWS network.</p><p># Create the VPC Link</p><pre>aws apigatewayv2 create-vpc-link \<br>- name workshop-vpc-link \<br>- subnet-ids PRIVATE_SUBNET_1 PRIVATE_SUBNET_2 \<br>- security-group-ids SG_ID \<br>- region us-east-1</pre><p>Wait for it to become AVAILABLE (a few minutes), then create the HTTP API:</p><pre>aws apigatewayv2 create-api \<br>- name workshop-api \<br>- protocol-type HTTP \<br>- region us-east-1</pre><p>Create the integration — this is what points API Gateway at the ALB via the VPC Link:</p><pre>aws apigatewayv2 create-integration \<br>- api-id API_ID \<br>- integration-type HTTP_PROXY \<br>- integration-uri ALB_LISTENER_ARN \<br>- integration-method ANY \<br>- connection-type VPC_LINK \<br>- connection-id VPC_LINK_ID \<br>- payload-format-version 1.0 \<br>- region us-east-1</pre><p><strong>## Third Mistake: The Stage Prefix Problem</strong></p><p>I created three routes, deployed to a `prod` stage, and tested:</p><pre>curl https://API_ID.execute-api.us-east-1.amazonaws.com/prod/users</pre><p>Got a 404 from the ALB. Everything was connected but the ALB was rejecting the request.</p><p>The issue: API Gateway was forwarding `/prod/users` to the ALB. But the ALB only has rules for `/users`. The stage name was being included in the path sent to the backend.</p><p>Fixed with a path override on the integration:</p><pre>aws apigatewayv2 update-integration \<br>- api-id API_ID \<br>- integration-id INTEGRATION_ID \<br>- request-parameters &#39;{&quot;overwrite:path&quot;: &quot;$request.path&quot;}&#39; \<br>- region us-east-1</pre><p>`$request.path` in API Gateway v2 refers to the route path — `/users` — not the full URL path including the stage. Setting `overwrite:path` to this value strips the stage prefix before forwarding to the ALB.</p><p>After that:</p><pre>curl https://API_ID.execute-api.us-east-1.amazonaws.com/prod/users<br># Hello from user-service<br>curl https://API_ID.execute-api.us-east-1.amazonaws.com/prod/orders<br># Hello from order-service<br>curl https://API_ID.execute-api.us-east-1.amazonaws.com/prod/payments<br># Hello from payment-service</pre><p>Full stack working end to end.</p><p><strong>## What I Would Do Differently</strong></p><p><strong>**On the IAM policy version**</strong>: always pin to a specific version of the AWS Load Balancer Controller and use the policy JSON from exactly that tag in the GitHub repo. Mixing versions causes exactly the kind of permission error I hit.</p><p><strong>**On the API Gateway stage prefix**</strong>: for a real production API where you want clean URLs, consider using the `$default` stage which removes the stage name from the URL entirely. Reserve named stages for when you need to version your API externally.</p><p>— — — — — — — — — — — — — — — — — — — —</p><p><strong>## The Things That Are Not Here</strong></p><p>This is not the complete production setup. For that you would also add:</p><p>- WAF on the ALB (OWASP managed rules, rate limiting, geo-blocking)</p><p>- HTTPS on the ALB with ACM certificates</p><p>- Internal ALB instead of internet-facing, so only API Gateway can reach it</p><p>- HPA (Horizontal Pod Autoscaler) on the microservices</p><p>- Proper monitoring — Prometheus, Grafana, alerting</p><p>- Secrets management — nothing in environment variables, everything through a secrets store</p><p>— — — — — — — — — — — — — — — — — — —</p><p><em>*Stack: EKS 1.35, AWS Load Balancer Controller v2.7.2, Helm 3, us-east-1. All commands tested on WSL2 running Ubuntu 22.04 with AWS CLI v2.*</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=91da9e33dfc7" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[How OpenAI Scaled to 800M Users with a Single PostgreSQL Primary And How we can Learn from It…]]></title>
            <link>https://medium.com/@nandhana32/how-openai-scaled-to-800m-users-with-a-single-postgresql-primary-and-how-we-can-learn-from-it-440b995109bc?source=rss-29681834eeb1------2</link>
            <guid isPermaLink="false">https://medium.com/p/440b995109bc</guid>
            <category><![CDATA[database-optimisation]]></category>
            <category><![CDATA[azure-postgresql]]></category>
            <category><![CDATA[open-ai-database-setup]]></category>
            <category><![CDATA[postgresql-database]]></category>
            <category><![CDATA[postgresql]]></category>
            <dc:creator><![CDATA[Nandhana]]></dc:creator>
            <pubDate>Wed, 01 Apr 2026 10:43:49 GMT</pubDate>
            <atom:updated>2026-04-01T11:00:57.108Z</atom:updated>
            <content:encoded><![CDATA[<p><strong>How OpenAI Scaled to 800M Users with a Single PostgreSQL Primary And How we can Learn from It…</strong></p><p>When most engineers think about scaling to hundreds of millions of users, they imagine sharding, distributed databases, and complex architectures.</p><p>OpenAI did something different !!</p><p>They scaled ChatGPT to nearly <strong>800 million users</strong> while keeping a <strong>single PostgreSQL primary database</strong>. That sounds unbelievable first. But then I read there article wrote by the Engineering team.</p><p>The real story isn’t about PostgreSQL being “magical” It’s about <strong>discipline in system design</strong>.</p><p>This article breaks down the architecture principles behind that approach and how you can adopt the same mindset.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/967/1*e2ZMeOkhh0EJVUGkyf6Rqw.png" /></figure><p>There’s a common belief in engineering:</p><blockquote><em>“Once you scale, you must shard your database.”</em></blockquote><p>OpenAI challenged that.</p><p>Instead of jumping into distributed complexity early, they focused on <strong>maximizing what a single system can do</strong> before adding complexity.</p><p><strong>From this what I have understood is,</strong></p><p>Scaling is not about adding complexity. It’s about <strong>removing bottlenecks methodically</strong>.</p><h3>The Core Architecture</h3><p>At the heart of OpenAI’s system is a surprisingly simple idea:</p><ul><li><strong>1 Primary PostgreSQL instance (writes)</strong></li><li><strong>Multiple Read Replicas (reads)</strong></li><li><strong>Connection Pooling (PgBouncer)</strong></li><li><strong>Caching Layer (Redis)</strong></li><li><strong>Strict traffic control (rate limiting + query discipline)</strong></li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/745/1*J7NyrOgmUb55uibPKKKI8Q.png" /></figure><p>Let’s break this down.</p><h3>1. Single Writer Principle</h3><p>OpenAI kept <strong>one primary database responsible for all writes</strong>.</p><p>Why?</p><p>Because:</p><ul><li>It avoids consistency issues</li><li>It simplifies transactions</li><li>It removes the complexity of distributed writes</li></ul><p>Instead of scaling writes horizontally, they focused on:</p><ul><li>Making writes efficient</li><li>Reducing unnecessary write operations</li><li>Moving non-critical workloads elsewhere</li></ul><p>This is a powerful lesson:</p><p><strong>Not everything needs to be written to your primary database</strong>.</p><h3>2. Read Replicas for Scale</h3><p>The real scaling happens through <strong>read replicas</strong>.</p><p>Instead of letting millions of users hit the primary database:</p><ul><li>Read-heavy queries are routed to replicas</li><li>The primary is protected for writes and critical reads</li></ul><p>This simple routing strategy dramatically reduces load on the primary.</p><h3>3. Caching Is Not Optional</h3><p>Even with replicas, database reads can become expensive.</p><p>So OpenAI added a <strong>caching layer</strong>.</p><p>But the interesting part is not caching itself — it’s <strong>how they handled cache misses</strong>.</p><h3>The Problem: Cache Stampede</h3><p>When a cache entry expires:</p><ul><li>Thousands of requests may hit the database at once</li></ul><p><strong>The Solution: Cache Locking / Leasing</strong></p><p>Only <strong>one request</strong> fetches data from the database.</p><p>Others wait.</p><p>This prevents:</p><ul><li>Sudden spikes</li><li>Database overload</li><li>Cascading failures</li></ul><p>This is one of the most important scaling techniques — and often overlooked.</p><h3>4. Connection Pooling with PgBouncer</h3><p>At scale, even <strong>opening database connections</strong> becomes expensive.</p><p>OpenAI used <strong>PgBouncer</strong> to:</p><ul><li>Reuse connections</li><li>Prevent connection storms</li><li>Reduce latency</li></ul><p>Without pooling:</p><ul><li>Thousands of users = thousands of connections</li><li>PostgreSQL gets overwhelmed</li></ul><p>With pooling:</p><ul><li>A small number of connections serve many users efficiently</li></ul><h3>5. Rate Limiting and Discipline</h3><p>One of the most underrated aspects of OpenAI’s system is <strong>discipline</strong>.</p><p>They didn’t just scale infrastructure — they controlled usage.</p><p>They applied:</p><ul><li>Rate limiting at multiple layers</li><li>Query timeouts</li><li>Strict workload isolation</li></ul><p>Why?</p><p>Because at scale:</p><p><em>The biggest threat isn’t traffic. It’s uncontrolled traffic.</em></p><h3>6. Not Everything Belongs in PostgreSQL</h3><p>As the system grew, OpenAI introduced new features:</p><ul><li>File uploads</li><li>Images</li><li>Voice data</li><li>Experimental features</li></ul><p>Instead of forcing everything into PostgreSQL, they:</p><ul><li>Moved certain workloads to <strong>other systems</strong></li><li>Used sharded solutions where appropriate</li></ul><p>The key idea: <em>Use PostgreSQL for what it does best, not everything.</em></p><h3>7. The Real Lesson: Discipline Over Complexity</h3><p>Many companies scale like this:</p><ol><li>Traffic increases</li><li>System slows down</li><li>Panic</li><li>Introduce complex distributed systems</li></ol><p>OpenAI did the opposite:</p><ol><li>Identify bottleneck</li><li>Fix it precisely</li><li>Move to next bottleneck</li><li>No shortcuts.</li><li>No premature sharding.</li></ol><p>Just <strong>incremental mastery</strong>.</p><h3>What We Can Take Away</h3><p>We don’t need 50 replicas or millions of users to apply this.</p><p>We can start today with:</p><ul><li>One PostgreSQL primary</li><li>A couple of read replicas</li><li>PgBouncer</li><li>Redis caching</li><li>Clear read/write separation</li></ul><p>More importantly: <em>Focus on understanding our system deeply before scaling it blindly.</em></p><h3>Final Thought</h3><p>Scaling is not about how many technologies you use.</p><p>It’s about how well you understand the ones you already have.</p><p>OpenAI didn’t win by adding complexity.</p><p>They won by <strong>delaying it as long as possible</strong>.</p><p>And that’s a lesson every engineer should take seriously.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=440b995109bc" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Gateway API VS Ingress Controller]]></title>
            <link>https://medium.com/@nandhana32/gateway-api-vs-ingress-controller-48e20769107e?source=rss-29681834eeb1------2</link>
            <guid isPermaLink="false">https://medium.com/p/48e20769107e</guid>
            <dc:creator><![CDATA[Nandhana]]></dc:creator>
            <pubDate>Mon, 02 Mar 2026 15:59:38 GMT</pubDate>
            <atom:updated>2026-03-03T12:11:54.052Z</atom:updated>
            <content:encoded><![CDATA[<p>Better late than never !</p><p>If you’re a tech enthusiast, stick around with me…Because we are going to learn about some trending update in Kubernetes !</p><p><strong>NGINX ingress controller is getting retired</strong>, Kubernetes officially announced this months back, <a href="https://kubernetes.io/blog/2025/11/11/ingress-nginx-retirement/">Ingress NGINX Retirement: What You Need to Know | Kubernetes</a></p><p>Why the Ingress NGINX retirement is a game-changer.</p><ul><li><strong>Vendor Lock-In:</strong> Migrating from one ingress controller to another became a painful exercise in translating a web of custom annotations.</li><li><strong>Security Gaps:</strong> Enforcing consistent security practices like TLS encryption and HTTPS redirects across a diverse set of applications and teams was often difficult and inconsistent or required too much effort and annotations.</li></ul><p>Common ways to expose applications running in a Kubernetes cluster. In cloud environments, a Service of type Load Balancer is the simplest method, as it provides a public IP address. Another option is NodePort, though it is less common in cloud setups. More advanced setups typically use Ingress, which acts as a single entry point to the cluster and routes traffic to internal services and pods.</p><p>Let’s dig into a scenario here, if we take two deployments and both of them are belongs to two different departments, and in ideal case, both of the departments have to work hand in hand to expose both services through single point.</p><p><strong>Method1 :- host matching</strong> usually refers to how an <strong>Ingress</strong> or <strong>Istio VirtualService</strong> routes traffic based on the HTTP Host header (or the requested domain name).</p><p>Eg:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*4fhU7ytXIhha9ydMOiUl_g.png" /></figure><p><strong>Method 2 :- path matching</strong> is used in <strong>Ingress</strong> or <strong>Gateway API</strong> routing rules to decide how HTTP requests are forwarded based on the request’s URL path.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*bAbaw1riUI2TdyNCcIiEmg.png" /></figure><p>There is no support for multi protocols like TCP, UDP and also no support for header manipulation, authentication, rate limiting, re-directs, session affinity, CORS etc.. We could not mention them under the spec session of the manifest file. But there is a work around in the Kubernetes through a method called annotations. Under the meta data section, we can pass through annotations. Kubernetes itself <strong>does not interpret</strong> these annotations. It simply stores them in the API server as part of the resource definition.</p><ul><li>The NGINX Ingress Controller is a <strong>Kubernetes controller</strong> running inside your cluster.</li><li>When it sees an annotation it recognizes (based on its internal logic), it <strong>parses</strong> the value and updates its NGINX configuration accordingly.</li></ul><pre>+---------------------+<br>| User / Developer    |<br>| creates Ingress     |<br>| with annotations    |<br>+----------+----------+<br>           |<br>           v<br>+----------+----------+<br>| Kubernetes API      | &lt;- Stores Ingress YAML<br>| (etcd)              |<br>+----------+----------+<br>           |<br>           v<br>+----------+----------+<br>| NGINX Ingress       | &lt;- Watches Ingress resources<br>| Controller          |    Reads annotations<br>+----------+----------+<br>           |<br>           v<br>+----------+----------+<br>| NGINX Pod / Config  | &lt;- Generates runtime config<br>| applies annotation  |<br>+----------+----------+<br>           |<br>           v<br>+----------+----------+<br>| HTTP Traffic         |<br>| behavior applied     |<br>+---------------------+</pre><p>So let’s talk about the next generation of service mesh API’s, the <strong>GATEWAY API.</strong></p><p>Gateway <strong>API has gateway</strong> class which is at the top level, which is configured by infrastructure providers. And next level is <strong>Gateway</strong> itself which is handled by the cluster operators,</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*PxgM6E3veuVnXI_J.png" /></figure><p><strong>Application developers, </strong>they own configuring these rules to route the traffic to hit a particular service.</p><p>Eg:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/793/1*K9pkGt4pbUjkOpOlL6w-mg.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/973/1*054NDl2VR6yIv3PJHUC_2A.png" /></figure><p>……………………………………………………………………………………………..</p><p><strong>Notes:</strong></p><p>This articles is prepared by referring Kubernetes official documentation page : <a href="https://gateway-api.sigs.k8s.io/">Introduction — Kubernetes Gateway API</a></p><p>Mumshad mannaambeth tutorials on API gateway <a href="https://www.youtube.com/watch?v=xaZ87iSvMAI&amp;t=772s">Gateway API Explained: The Future of Kubernetes Networking — YouTube</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=48e20769107e" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>