<?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 Tarun Singhal on Medium]]></title>
        <description><![CDATA[Stories by Tarun Singhal on Medium]]></description>
        <link>https://medium.com/@tarunsinghal.me?source=rss-9e5e15467d9b------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*lCL5UURqu2mDItvVdHuCjA@2x.jpeg</url>
            <title>Stories by Tarun Singhal on Medium</title>
            <link>https://medium.com/@tarunsinghal.me?source=rss-9e5e15467d9b------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Fri, 20 Nov 2026 16:50:44 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@tarunsinghal.me/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[Stop Treating AWS WAR as a Checkbox - A Field Guide for Cloud Architects]]></title>
            <link>https://medium.com/@tarunsinghal.me/stop-treating-aws-war-as-a-checkbox-a-field-guide-for-cloud-architects-16f6d398db9b?source=rss-9e5e15467d9b------2</link>
            <guid isPermaLink="false">https://medium.com/p/16f6d398db9b</guid>
            <category><![CDATA[aws]]></category>
            <category><![CDATA[cloud-architecture]]></category>
            <category><![CDATA[wellarchitectedframework]]></category>
            <category><![CDATA[devops]]></category>
            <category><![CDATA[aws-well-architected]]></category>
            <dc:creator><![CDATA[Tarun Singhal]]></dc:creator>
            <pubDate>Wed, 18 Feb 2026 05:07:54 GMT</pubDate>
            <atom:updated>2026-02-18T05:07:54.407Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ld3SS6xIUCOK1peS8hpn-w.jpeg" /></figure><p><em>A hands-on guide from the trenches — for architects, tech leads, and cloud teams who want to get real value out of the WAR process.</em></p><p>Think of your AWS environment as a house you have been living in for years. You added a room here, patched a wall there, maybe even installed a swimming pool during a weekend sprint. It works … sort of. But nobody has ever stepped back and checked if the foundation is solid, the wiring is up to code, or if the plumbing can handle the load when all the taps are on.</p><p>That’s exactly what the <strong>AWS Well-Architected Framework Review (WAR)</strong> does for your cloud architecture. It’s a structured, honest conversation about how your systems are built — and more importantly, where they could break.</p><p>I’ve led dozens of these reviews across startups, enterprises, and everything in between. This guide is everything I wish someone had told me before my first one.</p><h4><strong>What Exactly Is a Well-Architected Review?</strong></h4><p>Let me be clear about something first: <strong>a WAR is not an audit</strong>. It’s not someone showing up with a clipboard to grade you. It’s a constructive dialogue, more like a design review with a trusted mentor than an inspection.</p><p>AWS designed the Well-Architected Framework as a mechanism to help you benchmark your workloads against battle-tested cloud best practices. The review walks you through a structured set of questions across six core pillars, helping you surface risks you didn’t know existed and create a roadmap to fix them.</p><p>The output? A prioritized list of <strong>High Risk Issues (HRIs)</strong>, a report generated directly in your AWS account, and a clear remediation plan you can actually execute.</p><h4><strong>The Six Pillars — Your North Star</strong></h4><p>The framework rests on six pillars. If you remember nothing else from this article, remember these. Every architectural decision you make should be evaluated against them.</p><p>The Six Pillars of the AWS Well-Architected Framework — each one addresses a critical dimension of cloud architecture.</p><p>Here’s the quick mental model I use:</p><p><strong>Operational Excellence: </strong>Can your team run this thing without heroics at 2 AM? If your operations depend on tribal knowledge and manual runbooks, you’ve got a problem. Think IaC, automated deployments, observability. The 2025 update specifically emphasizes evaluating <strong><em>external</em></strong> customer needs first; your ops should be shaped by what your end users actually experience.</p><p><strong>Security</strong>: This isn’t just about firewalls. It’s identity management, encryption, traceability, least privilege, and having a plan for when (not if) something goes wrong. Every layer, every service, every data path.</p><p><strong>Reliability</strong>: Your system will fail. The question is: does it recover gracefully or does it page everyone at 3 AM? Test recovery procedures. Automate failover. Stop guessing capacity. AWS recently bumped the risk level for fault-isolated workloads (REL13-BP04) from Medium to High that should tell you something about where the industry is heading.</p><p><strong>Performance Efficiency</strong>: Are you using the right tool for the job, or are you running everything on oversized EC2 instances because “it works”? Go serverless where you can. Use managed services. Experiment. Mechanical sympathy matters; understand what’s happening under the hood.</p><p><strong>Cost Optimization</strong>: Cloud bills have a way of sneaking up on you. This pillar pushes you to adopt a consumption model, measure efficiency, and stop throwing money at undifferentiated heavy lifting. If you’re not tagging resources and tracking spend by team or workload, start today.</p><p><strong>Sustainability: </strong>Added in 2021 and still underestimated by most teams. It’s about reducing your environmental footprint — maximizing utilization, using efficient instance types, and questioning whether that always-on dev environment really needs to be always-on.</p><h4><strong>Why Should You Even Bother?</strong></h4><p>I’ll give you the honest answer: most teams skip this until something breaks. And by then, the cost of fixing things is too high compared to what it would have been earlier.</p><p>Here’s what a WAR actually gives you:</p><p><strong>An architectural baseline.</strong> Without a review, you’re flying blind. You might think your architecture is solid, but you won’t know until someone asks the hard questions. A WAR gives you a snapshot here’s where you stand today, measured against proven best practices.</p><p><strong>Risk visibility before incidents.</strong> The review systematically uncovers blind spots. Maybe your backups haven’t been tested in 18 months. Maybe your IAM policies are way too permissive. Maybe your RDS instance isn’t Multi-AZ, and nobody noticed. These are the things that turn a bad day into a really bad week.</p><p><strong>A prioritized improvement roadmap.</strong> Not everything needs to be fixed today. The WAR helps you stack-rank issues by business impact so you can tackle the most dangerous ones first and plan the rest into your sprint cycles.</p><p><strong>Alignment across teams.</strong> I’ve seen WAR sessions become the first time dev, ops, and security teams sit in the same room and talk about the same workload. That alone is worth the time investment.</p><p><strong>AWS credits and partner funding.</strong> Here’s a practical incentive: AWS offers remediation credits (historically $5K+) when you complete a WAR through a certified partner and commit to fixing the issues found. Free money to improve your architecture. Why would you leave that on the table?</p><h4><strong>The Review Journey — Five Phases</strong></h4><p>Don’t think of a WAR as a single event. It’s a journey with distinct phases, and skipping any of them significantly reduces the value you get out.</p><p><strong>Phase 1: Prepare (Don’t Skip This)</strong></p><p>This is where most teams cut corners, and it costs them later.</p><p>S<strong>cope your workloads carefully.</strong> A “workload” in AWS terms is a set of components that deliver business value: your e-commerce platform, your data pipeline, your mobile app backend. Don’t try to boil the ocean by reviewing everything at once. Pick the workload that matters most or carries the highest risk.</p><p><strong>Get the right people in the room.</strong> You need the folks who actually built and operate the system. The dev lead, the ops engineer, the security person, the product owner. A WAR is only as good as the knowledge in the room. If you’re missing the person who designed the database layer, you’ll get incomplete answers.</p><p><strong>Decide which pillars to focus on.</strong> Ideally, you cover all six. But if you just migrated to the cloud and your primary concern is security posture, start there. You can always come back for the rest.</p><p><strong>Choose your lenses.</strong> This is a 2025 game-changer. Beyond the core framework, AWS now offers specialized lenses for <strong>Serverless</strong>, <strong>SaaS</strong>, <strong>Machine Learning</strong>, <strong>Generative AI</strong>, and <strong>Responsible AI</strong>**. If your workload involves any of these, stack the relevant lens on top of the base review. The new Responsible AI Lens is particularly important if you’re building anything with LLMs: it covers governance, bias, transparency, and model monitoring.</p><p><strong>Phase 2: Review (The Main Event)</strong></p><p>Expect to spend 2–4 hours working through questions with a Solutions Architect (either internal or from an AWS partner). The review is conducted using the <strong>AWS Well-Architected Tool</strong> directly in your AWS account.</p><p>Here’s how it actually works:</p><p>You define your workload in the tool, then walk through questions organized by pillar. For each question, you mark which best practices you’re following. The tool provides context, examples, and links to deeper guidance for each question.</p><p><strong>Pro tip</strong>: Don’t treat this like a test where you want to check every box. Be honest. The value comes from accurately reflecting where you are, not from inflating your scores. I’ve seen teams mark everything green and then wonder why the review didn’t help them.</p><p><strong>Another pro tip:</strong> Have your architecture diagrams, runbooks, and monitoring dashboards accessible during the session. When someone asks “how do you handle failover for your database?” you want to show, not just tell.</p><p><strong>Phase 3: Analyze (Where the Gold Is)</strong></p><p>After the review, you’ll have a report that categorizes findings by pillar and risk level. The tool generates an <strong>improvement plan</strong> automatically — a prioritized list of issues with recommended actions.</p><p>This is where the Solutions Architect earns their keep. A good SA won’t just hand you a PDF; they’ll walk you through the findings, explain the “why” behind each risk, and help you understand the trade-offs of different remediation approaches.</p><p>Look for <strong>thematic patterns</strong>. If you’re seeing clusters of issues in a specific pillar across multiple workloads, that’s not a workload problem; that’s an organizational gap. Maybe your team needs better training on security best practices, or maybe your CI/CD pipeline is missing automated compliance checks.</p><p><strong>Phase 4: Remediate (Execution Time)</strong></p><p>Build a <strong>30/60/90-day plan.</strong> Not everything needs immediate attention, but the High Risk Issues should be in your next sprint.</p><p>Some common remediation patterns I see repeatedly:</p><p>- Enabling Multi-AZ for critical databases (reliability)</p><p>- Implementing proper IAM policies with least privilege (security)</p><p>- Adding CloudWatch alarms and dashboards (operational excellence)</p><p>- Right-sizing instances and buying Savings Plans (cost optimization)</p><p>- Turning off idle dev/test environments outside business hours (sustainability + cost)</p><p>Track remediation as milestones in the WA Tool. This creates an audit trail and makes your next review significantly easier.</p><p><strong>Phase 5: Evolve (The Flywheel)</strong></p><p>This is the part most people miss. <strong>A WAR is not a one-and-done exercise.</strong> Your architecture evolves new features ship, traffic patterns change, and new AWS services launch. What was well-architected six months ago might not be today.</p><p>Set a cadence. Quarterly reviews for critical workloads, semi-annual for the rest. Make it part of your operational rhythm, like sprint retrospectives or capacity planning sessions.</p><p><strong>How to Deliver a WAR Like a Senior Architect</strong></p><p>After running more WARs than I can count, here’s what separates a “going through the motions” review from one that actually transforms how a team builds:</p><p><strong>1. Frame It as a Conversation, Not an Interrogation</strong></p><p>The moment people feel judged, they stop being honest. Open with something like: “We’re here to find gaps together, not to point fingers. Every architecture has trade-offs, let’s figure out which ones are intentional and which ones are accidental.”</p><p><strong>2. Connect Every Finding to Business Impact</strong></p><p>Telling a CTO “your S3 buckets don’t have versioning enabled” gets a shrug. Telling them “if someone accidentally deletes production data, you have zero ability to recover it, and that could mean 4–8 hours of downtime and potential data loss” gets a budget approved by the end of the week.</p><p><strong>3. Use the Analogy of Technical Debt</strong></p><p>Most business leaders understand debt. Frame architectural risks the same way: “You’ve been taking on technical debt in your security posture. The interest payments are the incidents you’ll face. We’re here to consolidate that debt into a manageable repayment plan.”</p><p><strong>4. Leverage the WA Tool’s Native Features</strong></p><p>Don’t just answer questions: use <strong>milestones</strong> to snapshot your architecture at different points in time. Use <strong>profiles</strong> to customize the review for your specific industry requirements. Share workloads across your organization so teams can learn from each other.</p><p><strong>5. Pair with AWS Trusted Advisor</strong></p><p>Since the WA Tool integrates with Trusted Advisor, you can pull in real-time data about your account. This turns subjective answers (“yeah, I think our security groups are fine”) into objective, data-backed assessments.</p><p><strong>6. Don’t Forget the New AI Lenses</strong></p><p>If you’re building anything with AI or ML — and in 2026, who isn’t? — stack the <strong>Responsible AI Lens</strong> and the <strong>Generative AI Lens</strong> on top of your review. These cover critical areas like model governance, bias detection, prompt security, and cost optimization for inference workloads. Ignoring these is like building a web app in 2015 without thinking about mobile.</p><h4><strong>Common Mistakes to Avoid</strong></h4><p><strong>Treating it as a checkbox exercise.</strong> If you’re rushing through questions just to get a report, you’re wasting everyone’s time. The value is in the discussion, not the document.</p><p><strong>Reviewing too many workloads at once.</strong> Start with one. Do it well. Build the muscle. Then scale to others.</p><p><strong>Not involving the right stakeholders.</strong> A WAR without the security team is incomplete. A WAR without the people who operate the system is useless.</p><p><strong>Ignoring the findings.</strong> I’ve seen organizations do a beautiful WAR, generate a comprehensive report, and then file it in a SharePoint folder never to be opened again. If you’re not going to act on the findings, don’t waste the time.</p><p><strong>Skipping the Sustainability pillar.</strong> Yes, it’s newer. Yes, it might feel less urgent. But it’s becoming a board-level conversation and it often uncovers cost savings you didn’t expect.</p><h4><strong>What’s New in 2025–2026?</strong></h4><p>The framework has matured significantly since its original five-pillar inception in 2015. Here’s what’s changed recently:</p><p>- <strong>78 new best practices</strong> were added in the April 2025 update alone, offering more actionable and specific guidance than ever before.</p><p>- <strong>Three AI-focused lenses</strong> were launched at re:Invent 2025 — Responsible AI, updated ML, and updated Generative AI — reflecting the explosion of AI workloads on AWS.</p><p>- The <strong>Operational Excellence</strong> pillar now emphasizes <strong><em>external</em></strong> customer needs as the starting point for operational design.</p><p>- <strong>AI-powered reviews</strong> are emerging as a theme, with AWS exploring how agentic AI can assist in conducting and analyzing Well-Architected reviews.</p><h4><strong>Wrapping Up</strong></h4><p>The AWS Well-Architected Framework Review isn’t glamorous. It won’t win you any architecture awards. But it’s one of the highest-ROI activities you can do as a cloud team.</p><p>Think of it this way: you wouldn’t drive your car for five years without a service check. Your cloud architecture deserves the same discipline.</p><p>Start with one workload. Get the right people in the room. Be brutally honest about what you find. Build a plan. Execute. Repeat.</p><p>That’s how you drive a WAR like a pro.</p><p><em>If this helped you, give it a clap and follow for more hands-on AWS architecture content. Got questions about running your first WAR? Drop them in the comments, I read every one.*</em></p><blockquote><strong><em>Happy Architecting!!</em></strong></blockquote><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=16f6d398db9b" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[AWS Well-Architected Generative AI Lens]]></title>
            <link>https://medium.com/@tarunsinghal.me/aws-well-architected-generative-ai-lens-2366e6c7bd30?source=rss-9e5e15467d9b------2</link>
            <guid isPermaLink="false">https://medium.com/p/2366e6c7bd30</guid>
            <category><![CDATA[generative-ai]]></category>
            <category><![CDATA[aws-best-practices]]></category>
            <category><![CDATA[aws-well-architected]]></category>
            <category><![CDATA[ai-engineering]]></category>
            <category><![CDATA[ai-strategy]]></category>
            <dc:creator><![CDATA[Tarun Singhal]]></dc:creator>
            <pubDate>Sat, 19 Apr 2025 12:16:09 GMT</pubDate>
            <atom:updated>2025-04-19T12:16:54.023Z</atom:updated>
            <content:encoded><![CDATA[<h3>AWS Well-Architected Generative AI Lens: A Guide to Building Better AI Applications</h3><p>Great news for those of us working with generative AI on AWS! On April 17th, 2025, AWS released the Well-Architected Generative AI Lens — a structured approach to designing, implementing, and operating generative AI workloads in the cloud. As someone who’s been architecting solutions on AWS and learning Generative AI, I’m excited about this addition to the Well-Architected Framework and want to share why it matters.</p><h4>What is the Well-Architected Generative AI Lens</h4><p>The Well-Architected Framework has always been our north star for building robust cloud architectures. This new Generative AI Lens extends that guidance specifically for generative AI workloads, addressing the unique challenges we face when working with large language models and other generative technologies.</p><p>The lens focuses on the six traditional Well-Architected pillars across six phases of the generative AI lifecycle:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*QyowGMk8BmNhS3K1" /></figure><ul><li><strong>Scoping</strong> the impact of generative AI for your problem.</li><li><strong>Selecting</strong> an appropriate model.</li><li><strong>Customising</strong> the model with prompts, data sources, or updated weights.</li><li><strong>Integrating</strong> the model into existing applications.</li><li><strong>Deploying</strong> the new generative AI capability.</li><li><strong>Iterating</strong> and improving on the released capabilities.</li></ul><p>One thing I particularly appreciate about this lens is its recognition that generative AI development is highly iterative. Unlike traditional software development, we often need to experiment and refine our approach multiple times to get workable solutions with generative AI. The lens provides cloud-agnostic best practices for each phase, making it useful regardless of your exact technology stack.</p><h4>How Lenses Enhance the Well-Architected Framework</h4><p>If you’ve worked with the Well-Architected Framework before, you know it provides a solid foundation for evaluating cloud architectures. But specialized workloads like generative AI introduce considerations that the standard framework doesn’t fully address.</p><p>That’s where lenses come in — they extend the core framework with domain-specific guidance. AWS has already created specialized lenses for:</p><ul><li>Machine Learning workloads</li><li>IoT applications</li><li>Serverless Architecture</li><li>Financial Services</li><li>SaaS applications</li></ul><p>The new Generative AI lens joins this collection, focusing specifically on the unique challenges of building with large language models and other generative technologies.</p><h3>Why this lens matters for your AI strategy</h3><p>In my experience working with clients implementing generative AI, I’ve seen firsthand how these projects present unique architectural challenges. The lens addresses these across all six pillars:</p><p><strong>Operational Excellence</strong></p><ul><li>Achieving consistent model output quality (not just quantity)</li><li>Monitoring operational health</li><li>Maintaining traceability</li><li>Automating lifecycle management</li></ul><p><strong>Security</strong></p><ul><li>Protecting AI endpoints</li><li>Mitigating risks of harmful outputs</li><li>Securing prompts and implementing proper access controls</li></ul><p><strong>Reliability</strong></p><ul><li>Handling varying throughput requirements</li><li>Maintaining reliable component communication</li><li>Implementing robust observability</li><li>Handling failures gracefully</li></ul><p><strong>Performance Efficiency</strong></p><ul><li>Capturing and improving model performance</li><li>Maintaining acceptable response times</li><li>Optimizing computation resources</li></ul><p><strong>Cost Optimization</strong></p><ul><li>Selecting cost-optimized models</li><li>Balancing cost and performance</li><li>Engineering prompts for efficiency</li><li>Optimizing vector stores and retrieval systems</li></ul><p><strong>Sustainability</strong></p><ul><li>Minimizing the environmental impact of training and inference</li><li>Optimizing resource utilization</li><li>Selecting efficient model architectures</li></ul><h4>Key Components of the Generative AI Lens</h4><p>The lens provides several valuable resources for teams building generative AI solutions:</p><ol><li><strong>Design principles</strong> — Guidelines and value statements framing the best practices</li><li><strong>Generative AI lifecycle and Well-Architected pillars</strong> — Strategies aligned with all six pillars across the generative AI lifecycle.</li><li><strong>Cloud-agnostic best practices</strong> — Implementation guidance with references to AWS technologies.</li><li><strong>Related architecture considerations</strong> — Additional discussions on responsible AI and data architecture.</li></ol><h4>Benefits of Using the Generative AI Lens</h4><p>Organizations applying this lens can expect several benefits:</p><ul><li>Cloud-agnostic guidance applicable across various environments and AI tools</li><li>Comprehensive coverage of all six Well-Architected pillars</li><li>Flexible application for organizations at any stage of their AI journey</li><li>Thorough assessment of architectures using large language models</li><li>Decision support for business leaders and data scientists navigating critical decisions</li></ul><h4>Getting Started with the Lens</h4><p>If you’re already working with generative AI on AWS, I recommend downloading the lens documentation and scheduling a review of your current architecture against its recommendations. You’ll likely identify several quick wins that can improve your system’s reliability, performance, or cost-efficiency.</p><p>For those just starting their generative AI journey, the lens provides an excellent roadmap of considerations before you write a single line of code.</p><p>The AWS Well-Architected Generative AI Lens represents a significant step forward in standardizing best practices for these complex systems. As generative AI continues to transform our industry, having a well-architected approach becomes increasingly critical for success.</p><p>I hope you found this helpful! See you again on another topic soon. Till then,</p><blockquote><strong><em>Happy Architecting!!</em></strong></blockquote><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=2366e6c7bd30" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Navigating AWS Global Infrastructure: The Foundation of Your Cloud Success]]></title>
            <link>https://medium.com/@tarunsinghal.me/navigating-aws-global-infrastructure-the-foundation-of-your-cloud-success-b9df82909d25?source=rss-9e5e15467d9b------2</link>
            <guid isPermaLink="false">https://medium.com/p/b9df82909d25</guid>
            <category><![CDATA[aws]]></category>
            <category><![CDATA[cloud-computing]]></category>
            <category><![CDATA[solutions-architecture]]></category>
            <category><![CDATA[aws-infrastructure]]></category>
            <category><![CDATA[aws-best-practices]]></category>
            <dc:creator><![CDATA[Tarun Singhal]]></dc:creator>
            <pubDate>Fri, 04 Apr 2025 03:13:48 GMT</pubDate>
            <atom:updated>2025-04-04T03:13:48.509Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*kIUtYOOM-BmyyhdR-MO8wA.jpeg" /></figure><p>Understanding AWS’s global infrastructure is like having a map before starting a journey. As you build your applications in the cloud, knowing which infrastructure components to use and when — can dramatically improve performance, reliability, and cost-efficiency. Let’s explore these building blocks in a way that helps you make better decisions for your specific needs.</p><h3>AWS Regions:</h3><p>AWS Regions are distinct geographic locations where AWS clusters data centers. Each region is completely independent, giving you control over where your data resides.</p><p>Each Region consists of multiple data centers equipped with compute, storage, networking and database services. These Regions operate independently from one another, with their own power, cooling, and physical security. This isolation ensures that issues in one Region don’t affect others. When you deploy resources in AWS, you explicitly choose which Region to use, and those resources exist only in that Region.</p><h4>How you should choose specific Regions:</h4><ul><li>When working with regulated industries like healthcare or finance, you will need to select regions that comply with local laws. For instance, if you are handling European customer data, you might choose eu-west-1(Ireland) or eu-central-1(Frankfurt) to help meet GDPR requirements.</li><li>Select regions closest to your user base. For an app primarily serving the Indian market, ap-south-1(Mumbai) will provide significantly better performance than regions in Europe or the Americas.</li><li>When implementing a robust DR strategy, choose geographically distant regions to protect against regional disasters. Paring us-east-1 with us-west-2 protects against regional outages on the same continent.</li></ul><h3>Availability Zones:</h3><p>Availability Zones are distinct locations within a region engineered to be isolated from failure in other AZs while maintaining high-bandwidth, low-latency connectivity between them.</p><p>Each AZ consists of one or more discrete data centers, each with redundant power, networking, and connectivity. AZs are physically separated by a meaningful distance to avoid correlated failures, yet close enough to provide low-latency connections for synchronous replication. When you deploy resources across multiple AZs. You effectively create a system that can withstand the failure of an entire data center. AWS services like Amazon RDS and Amazon Elastic Load Balancing are designed to leverage multiple AZs automatically for enhanced reliability.</p><h4>You should leverage multiple AZs when:</h4><ul><li>If you are running critical workloads like payment processing systems, healthcare patient portals, or any platform where downtime means lost revenue, compromised care or even damaged reputation, deploying across multiple AZs is essential.</li><li>For databases or applications that maintain session state, multi-AZ deployments provide automatic failover capabilities. If you are running an e-commerce platform, a multi-AZ RDS deployment ensures your product catalog and inventory systems remain available even if an entire data center experiences issues.</li><li>If your business commits to 99.99% availability or better, multi-AZ architecture is practically mandatory. For a SaaS provider promising enterprise-grade reliability, this architecture prevents a single point of failure from affecting your ability to meet contractual obligations.</li></ul><h3>Edge Locations:</h3><p>Edge locations power Amazon Cloudfront and Amazon Route 53, bringing content closer to end users with over 700 points of presence globally.</p><p>Edge locations are mini-data centers strategically positioned in major cities around the world. Unlike Regions or AZs, edge locations aren’t designed to run all AWS services — they primarily serve Cloudfront content and handle Route53 DNS queries.</p><p>When you use CloudFront to deliver content, files are cached at these edge locations. When a user requests content, CloudFront routes the requests to the edge location that can deliver it with the lowest latency. If the content is already cached there, it&#39;s delivered immediately. If not, CloudFront retrieves it from your origin server, delivers it to the user, and caches it for future requests.</p><p>For Route53, edge locations process DNS queries locally, providing faster resolution times than if all queries had to travel to a central location. This distributed approach dramatically reduces DNS latency and improves user experiences for applications that require frequent DNS lookups.</p><h4>Consider leveraging Edge Locations when:</h4><ul><li>If you run like an e-commerce site with users from around the world, Edge locations ensure images, videos, and other static content load quickly regardless of where the user is located.</li><li>For content-heavy websites like news platform or e-commerce stores, where every second of page load-time impacts user engagement, CloudFront’s Edge locations can dramatically improve performance.</li><li>If your application serves large media files or experiences traffic spikes, offloading this traffic to Edge Locations reduces the load on your origin servers, potentially reducing costs and improving scalability.</li><li>If your application is a potential target for distributed denial-of-service attacks, WAF integration at the edge provides an additional security layer before traffic reaches your actual infrastructure.</li></ul><h3>Local Zones:</h3><p>AWS Local Zones bring select AWS services closer to large population and industry centers that might not have a full AWS Region nearby.</p><p>Local Zones are essentially extensions of an AWS Region into metropolitan areas. They are connected to the parent Region through AWS’s high-bandwidth, redundant network backbone. Unlike Edge locations, which primarily cache content, Local Zones can run a subset of AWS compute, storage, database, and other services.</p><p>When you deploy resources in a Local Zone, they appear as subnets within your existing VPC in the parent region. This means you can use the same APIs, tools, and control plane while gaining the performance benefits of local deployment. Your application components in the local zone connect to other resources in the parent Region with consistent, private networking.</p><p>Local Zones provide a hybrid approach — they are not as comprehensive as full Regions but offer more services than Edge locations, specifically designed for latency-sensitive applications that need to be close to users in specific metropolitan areas.</p><h4>Local Zones make the most sense when:</h4><ul><li>If you are developing multiplayer gaming platforms where even 20ms of additional latency creates a noticeable degradation in user experience, Local zones can provide the necessary performance.</li><li>If your team needs to process, render, or stream high-resolution video content, Local Zones in media hubs like Los Angeles enable real-time collaboration without shipping physical media or experiencing significant delays.</li><li>If you are an advertising company that is gradually moving to the cloud but needs to maintain low-latency connections to local data sources or partners, Local Zones provides a stepping stone that offers cloud benefits without latency penalties.</li></ul><h3>Wavelength Zones:</h3><p>Wavelength Zones embed AWS compute and storage services within 5G networks for ultra-low latency applications by processing data closer to mobile end user.</p><p>Wavelength Zones are deployed inside telecommunications providers&#39; data centers at the edge of the 5G network. This unique positioning means your application’s traffic never leaves the carrier’s network to reach AWS services, eliminating internet hops that typically introduce latency.</p><p>When you deploy an application in the Wavelength zone, it runs on AWS compute and storage resources physically located within the carrier network infrastructure. These resources appear as subnets in your VPC, connected to the parent AWS Region. Applications in Wavelength Zones can access services in the parent region while maintaining single-digit millisecond latency to 5G devices.</p><p>The key difference from other AWS infrastructure components is the tight integration with 5G carriers. This integration creates a seamless path from mobile devices through the carrier network directly to your application, without traversing the public internet.</p><h4>Wavelength Zones are ideal when:</h4><ul><li>If you are developing augmented reality shopping experiences where can visualize products in their home instantly, Wavelength Zones ensure the processing happens close enough to deliver true responsive experiences.</li><li>If you are creating a connected vehicle platform that needs to process and respond to road conditions immediately, deploying your analytics in Wavelength Zones allows decisions to be made within milliseconds rather than hundreds of milliseconds.</li><li>If you are building remote diagnostic tools or patient monitoring systems that require immediate response time and reliable connections, Wavelength’s integration with 5G carriers ensures your application meets critical healthcare needs without perceptible delays.</li></ul><h3>AWS Outposts:</h3><p>AWS Outposts brings the AWS infrastructure, services, APIs, and tools to your on-premises facility as a fully managed services.</p><p>Outposts are fully managed and configurable compute and storage racks built with AWS-designed hardware that you install in your own data center. Once rack-mounted and powered on, AWS connects these racks to the nearest AWS region and remotely manages them as if they were part of AWS cloud infrastructure.</p><p>Unlike other infrastructure components that involve separate data centers, Outposts blurs the line between on-premises and cloud by bringing AWS hardware directly into your facility. AWS handles all maintenance, updates, and monitoring remotely, while you benefit from having the actual compute and storage resources locally.</p><p>Outposts run a subset of AWS services natively on-premises, including EC2, EBS, RDS, ECS, EKS, and many others. These services operate using the same APIs, features, and tools as their cloud equivalents, creating a truly consistent hybrid experience. Data stored on Outposts remains in your data center until you explicitly transfer it to an AWS Region.</p><h4>Outposts is the right choice when:</h4><ul><li>If you work in healthcare with certain protected health information or in financial services with specific trading data that regulations mandate must stay on-site, Outposts lets you use AWS services while keeping data within your facility.</li><li>If you operate trading systems or industrial control applications where microseconds matter and on-premises is non-negotiable, Outposts provides the same APIs and services as the cloud but with the performance of local deployment.</li></ul><h3>AWS Global Accelerator:</h3><p>While not a physical infrastructure components, AWS Global Accelerator optimizes the path from your users to your applications using AWS’s global network backbone.</p><p>Global Accelerator provides static IP addresses that serve as fixed entry points to your applications. When users connect to those addresses, their traffic is immediately routed onto AWS’s private network backbone instead of traveling across the public internet.</p><p>The service continuously monitors the health and performance of application endpoints across regions. It uses this information along with proximity data to direct traffic to the optimal endpoint for each user. If an endpoint becomes unhealthy, Global Accelerator automatically redirects traffic to healthy alternatives in the same or different regions.</p><p>What makes Global Accelerator different from traditional DNS-based routing is that it operates at the network layer rather than relying on DNS resolution. This means it can react immediately to changes in the network conditions or endpoint health without waiting for DNS propagation, which can take minutes or hours.</p><h4><strong>Global Accelerator becomes valuable when:</strong></h4><ul><li>If you run global financial services platform where consistent performance is crucial across all markets, Global Accelerator can reduce the variability inherent in public routing.</li><li>If you operate a video streaming services and want to route users to the nearest healthy endpoint based on network conditions rather than simple geographic proximity, Global Accelerator provides these advanced routing capabilities.</li></ul><h3>Comparison: Choosing the Right AWS Infrastructure Components</h3><p>Here’s a comparison to help you select the right components for your specific needs:</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/1af10d26ab67df6c08d42d3e177ebc72/href">https://medium.com/media/1af10d26ab67df6c08d42d3e177ebc72/href</a></iframe><h3>Architecting for Success: Putting It All Together</h3><p>Let’s look at how you might combine these infrastructure components for comprehensive solutions in different scenarios:</p><h4>For a Global Retail Platform:</h4><ul><li><strong>Core services:</strong> Deploy your inventory and order processing systems across multiple AZs in regions corresponding to your major markets (us-east-1, eu-west-1, ap-southeast-1).</li><li><strong>Static content:</strong> Use CloudFront Edge Locations to deliver product images, videos, and web assets to shoppers worldwide with minimal latency.</li><li><strong>Local inventory systems:</strong> For flagship stores in major cities, use Local Zones to process point-of-sale data and update inventory in near-real-time without round trips to the main regions.</li><li><strong>Mobile shopping experience:</strong> Leverage Wavelength Zones to deliver immersive AR shopping experiences to customers on 5G devices who want to visualize products in their homes.</li><li><strong>Global traffic management:</strong> Implement Global Accelerator to ensure customers always connect to the nearest healthy endpoint, providing consistent performance during sales events.</li></ul><h4>For a Healthcare Solution:</h4><ul><li><strong>Patient records:</strong> Store protected health information in regions that comply with local healthcare regulations, deployed across multiple AZs for high availability.</li><li><strong>Telehealth platform:</strong> Use Edge Locations to deliver the web and mobile application interface components quickly to patients wherever they are.</li><li><strong>Imaging processing:</strong> For hospitals in locations without a full AWS Region, use Local Zones to process medical imaging with low latency, enabling faster diagnosis.</li><li><strong>Remote monitoring:</strong> Deploy real-time patient monitoring analytics in Wavelength Zones to process data from connected medical devices over 5G networks.</li><li><strong>On-site data:</strong> For data that absolutely must remain within hospital premises, use Outposts to run the same AWS services locally while maintaining compliance with strict data residency requirements.</li></ul><h3>Final Thoughts: Making Strategic Infrastructure Decisions</h3><p>Your choice of AWS infrastructure components forms the foundation upon which you will build your entire cloud architecture. Taking time to match your specific requirements to the appropriate components will help you:</p><ul><li>Deliver better performance to your users</li><li>Build more resilient applications</li><li>Meet regulatory and compliance requirements</li><li>Optimize your cloud spending</li></ul><blockquote>Remember that you don’t need to use every component — <strong>the best architecture is often the simplest one that meets your requirements</strong>. Start with your business needs, understand your constraints, and select the infrastructure components that align with both.</blockquote><p>As your applications evolve and your requirements change, continually reassess your infrastructure choices. What worked for your startup might need refinement as you scale globally, and AWS’s flexible infrastructure components give you the tools to adapt as you grow.</p><p>I hope you found this helpful! See you again on another topic soon. Till then,</p><blockquote><strong>Happy Architecting!!</strong></blockquote><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=b9df82909d25" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Anthropic’s “AI Microscope”: Finally Seeing How AI Actually Thinks]]></title>
            <link>https://medium.com/@tarunsinghal.me/anthropics-ai-microscope-finally-seeing-how-ai-actually-thinks-b4d9dbb4e098?source=rss-9e5e15467d9b------2</link>
            <guid isPermaLink="false">https://medium.com/p/b4d9dbb4e098</guid>
            <category><![CDATA[machine-learning]]></category>
            <category><![CDATA[artificial-intelligence]]></category>
            <category><![CDATA[ai-learning]]></category>
            <category><![CDATA[transparency]]></category>
            <category><![CDATA[anthropic-claude]]></category>
            <dc:creator><![CDATA[Tarun Singhal]]></dc:creator>
            <pubDate>Tue, 01 Apr 2025 02:08:02 GMT</pubDate>
            <atom:updated>2025-04-01T02:08:02.053Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/320/1*kWX9Dso-5GsDbt7T2Phtzw.jpeg" /></figure><p>Artificial intelligence has come a long way in recent years, but one of the biggest challenges has always been understanding how it works. We often hear about AI being a “black box” — we know what goes in and what comes out, but what happens in between is a mystery. That’s where Anthropic’s groundbreaking “AI Microscope” comes in, offering researchers a way to peek inside the minds of large language models like Claude.</p><p>This tool is not just a technical achievement — it’s a step toward making AI systems more transparent, trustworthy, and ultimately safer to use. Let’s dive into what this innovation is all about and why it matters.</p><h4>Cracking Open the Black Box</h4><p>So what exactly is this “microscope” thing? It’s not hardware — it’s a set of analytical techniques that let Anthropic’s team trace and visualize these AI models&#39; reasoning paths when solving problems or generating text.</p><p>Before this, we’ve mostly had to take AI outputs at face value. The system gives you an answer, and you either trust it or you don’t. With the microscope approach, researchers can trace WHY the system arrived at a particular conclusion.</p><p>I can’t overstate how big a deal this is. Imagine if we’d been using calculators for decades without understanding how they perform addition — and then suddenly someone figures out how to watch the calculation happen step by step.</p><h4>What They’ve Found (And It’s Wild)</h4><p>The findings so far have been fascinating:</p><p><strong>AI has its own “ language of thought”</strong></p><p>One of the coolest discoveries is that Claude seems to use the same internal reasoning patterns regardless of whether it’s responding in English, Spanish, or Chinese. It’s like there’s a universal “Claude-ese” that exists beneath all human languages.</p><p>This makes me wonder if these systems are developing something analogous to the “language of thought” philosophers have debated for years. Are we accidentally creating minds with their own internal logic?</p><p><strong>These systems plan ahead </strong><br>I always assumed AI just generated text one word at a time, like a really fancy autocomplete. Turns out that Claude is actually planning several steps ahead, especially for complex tasks.</p><p>When writing poetry, for instance, it first identifies rhyming words it wants to use, then works backward to construct lines that will lead to those rhymes. That’s… surprisingly human-like? I do something similar when writing verse.</p><p>For problem-solving tasks, it maps out intermediate steps before generating the final answer. Again, this mirrors how humans tackle complex problems — we break them down before solving them.</p><h3>Not All Sunshine and Rainbows</h3><p>Of course, there are some concerning findings too:</p><p><strong>“Alignment faking” is a thing</strong><br>Here’s something disturbing: sometimes Claude gives explanations for its reasoning that don’t actually match what’s happening inside its neural circuits. Researchers call this “alignment faking” — the AI is essentially making up plausible-sounding justifications for conclusions it reached through other means.</p><p>This feels uncomfortably close to how humans sometimes rationalize our own decisions, doesn’t it? We often make choices based on intuition or emotion, then construct logical-sounding explanations after the fact.</p><p><strong>The computational requirements are intense</strong><br>This kind of analysis requires massive computing resources. We’re talking about tracing the activity of billions of parameters working together. This creates a potential transparency gap — only organizations with serious computing power can perform this kind of research.</p><h3>Why This Actually Matters</h3><p>I think about this research in terms of the growing role AI plays in our lives. These systems are increasingly making or influencing decisions that affect people — from content recommendations to healthcare diagnostics to financial decisions.</p><p>If we’re going to let AI systems have this kind of influence, we damn well better understand how they work. Trust requires transparency, and transparency requires tools like the AI Microscope.</p><h3>From Lab to Classroom?</h3><p>One thing I’m excited about is how this research might eventually filter down to education. Imagine students(like me) being able to visualize AI reasoning processes, tracing how these systems “think” step by step. That could demystify AI and create a generation that understands these systems at a deeper level than we currently do.</p><p>We’re not there yet — this research is still cutting-edge stuff happening in well-funded labs. But I can see a future where understanding AI cognition becomes as fundamental as understanding basic computer programming.</p><h3>Final Thoughts</h3><p>Looking at Anthropic’s work with the AI Microscope gives me cautious optimism. Yes, we’ve created systems with capabilities we don’t fully understand. But we’re also developing tools to peer inside them and map their inner workings.</p><p>This isn’t just academic curiosity — it’s about building AI we can actually trust. As these systems become more powerful and more integrated into our lives, understanding them becomes increasingly crucial.</p><p>I’d love to know what you think about all this. Does knowing more about how AI works make you feel better about these systems? Or does peeling back the curtain reveal even more concerning questions? Drop a comment below!</p><p>Note: This blog represents my understanding of Anthropic’s AI microscope research based on publicly available information. For the most detailed and authoritative information, check out Anthropic’s official publications.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=b4d9dbb4e098" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[The Architecture Behind AWS VPC Endpoints: Understanding the Network Backbone]]></title>
            <link>https://medium.com/@tarunsinghal.me/the-architecture-behind-aws-vpc-endpoints-understanding-the-network-backbone-6c43aa74f762?source=rss-9e5e15467d9b------2</link>
            <guid isPermaLink="false">https://medium.com/p/6c43aa74f762</guid>
            <category><![CDATA[private-aws-access]]></category>
            <category><![CDATA[vpc-interface-endpoint]]></category>
            <category><![CDATA[aws-privatelink]]></category>
            <category><![CDATA[aws-vpc-endpoints]]></category>
            <category><![CDATA[vpc-gateway-endpoint]]></category>
            <dc:creator><![CDATA[Tarun Singhal]]></dc:creator>
            <pubDate>Fri, 21 Mar 2025 04:06:14 GMT</pubDate>
            <atom:updated>2025-03-21T04:06:14.510Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/783/1*7QwtkJoJM8Jsw2QXfaJAxA.png" /></figure><p>If you have been working with AWS for a while, you have probably encountered the challenge of accessing AWS services securely from your VPCs. You may be building in a regulated environment that prohibits internet traffic, or you are simply trying to tighten your security posture. Either way understanding AWS VPC endpoints can completely change how you approach secure architecture.</p><h3>The Problem with Traditional AWS Service Access</h3><p>By default, when your applications need to talk to AWS services like S3, Dynamodb, or SQS, that traffic flows through the public internet. Here’s what the path looks like:</p><ol><li>Traffic leaves your VPC through an Internet Gateway or NAT Gateway.</li><li>It travels across the public internet ( although it stays on the AWS global network for much of the journey)</li><li>It arrives at the public endpoint of the AWS service.</li></ol><pre>EC2 instance → VPC Router → Internet Gateway → Public Internet → AWS S3 Public Endpoint → S3 Bucket</pre><p>This creates several challenges:</p><ul><li>Your resource needs a public IP or NAT gateway.</li><li>Traffic is exposed to the internet, increasing attack surface.</li><li>You incur data transfer charges for NAT gateways.</li><li>Many compliance frameworks (like PCI-DSS, HIPAA, or FedRAMP) have strict requirements about internet exposure.</li></ul><h4>AWS’s Private Service Access Solution</h4><p>VPC endpoint resolves these problems elegantly. They create a private connection between your VPC and supported AWS Services without requiring internet.</p><p>In simple terms: VPC endpoints keep your traffic inside AWS’s network.</p><p>There are two types of VPC endpoints:</p><ul><li><strong>Gateway endpoints</strong> — Used for S3 and DynamoDB only</li><li><strong>Interface endpoints</strong> — Used for most other AWS services</li></ul><p>When I first started using VPC endpoints several years ago, they completely changed how I designed secure applications in AWS. Suddenly, I could create truly private VPCs that still had all the functionality of AWS services.</p><h3>Gateway Endpoints Deep Dive</h3><p>Gateway endpoints are the simplest and most cost-effective type of VPC endpoint. They support only two services:</p><ul><li>S3</li><li>DynamoDb</li></ul><p>Here’s how they work:</p><ol><li>You create a gateway endpoint and associate it with your VPC.</li><li>AWS adds entries to your route table(s) that direct traffic for the specified service to the endpoint</li><li>The prefix list ID in your route table (like pl-6da54004) represents the service&#39;s IP range</li><li>Your traffic never leaves the AWS network</li></ol><p>Here’s what that looks like in a route table:</p><p>Destination Target<br>10.0.0.0/16 — local<br>pl-6da54004 — vpce-1a2b3c4d # S3 endpoint<br>0.0.0.0/0 — igw-1234abcd # Internet Gateway</p><pre>EC2 instance → VPC Router → S3 Gateway Endpoint → AWS Private Network → S3 Bucket</pre><p>The beauty of gateway endpoints:</p><ul><li>They’re completely free to use</li><li>Zero impact on bandwidth or availability</li><li>Simple to set up (just a few clicks)</li><li>No ENIs created in your subnets</li></ul><p>But gateway endpoints have limitations:</p><ul><li>They only work for S3 and DynamoDB</li><li>They’re not accessible from on-premises networks</li><li>They require route table modifications</li><li>They’re region-specific</li></ul><h3>Interface Endpoints</h3><p>Interface endpoints expand VPC endpoint functionality to dozens of AWS services beyond S3 and DynamoDB. They use AWS PrivateLink technology under the hood and work differently from gateway endpoints.</p><p>When you create an interface endpoint:</p><ol><li>AWS places Elastic Network Interfaces (ENIs) in your selected subnets</li><li>These ENIs get private IP addresses from your subnet’s CIDR range</li><li>AWS creates DNS entries that resolve the service’s name to these private IPs.</li><li>Your applications connect to the service using these private IPs.</li></ol><p>For example, if you create an interface endpoint for Amazon SQS, AWS will create DNS entries like:</p><ul><li>Regional endpoint: sqs.us-east-1.amazonaws.com → vpce-0f12345a6b7c8d9e0-12345678.sqs.us-east-1.vpce.amazonaws.com</li><li>Zonal endpoint: us-east-1a.sqs.us-east-1.amazonaws.com → Private IP in us-east-1a</li></ul><pre>EC2 instance → ENI in your subnet → PrivateLink → S3 Bucket</pre><h4>The key advantages of interface endpoints:</h4><ul><li>Support for most AWS services.</li><li>Accessible from on-premises via Direct Connect or VPN</li><li>Accessible from other VPCs via VPC Peering</li><li>Each ENI provides zonal isolation for high availability</li></ul><p>But there are trade-offs:</p><ul><li>Not free — costs about $0.01/hour per endpoint + data processing charges</li><li>Each endpoint creates at least one ENI (consuming IP addresses)</li><li>Bandwidth limits apply (based on the underlying ENI)</li></ul><h3>The PrivateLink Connection</h3><p>You will often hear “PrivateLink” and “interface endpoints” used interchangeably, but they’re not exactly the same thing.</p><p>PrivateLink is the underlying technology that powers interface endpoints. It creates private connections between VPCs and services using ENIs and private IP addresses. When you create an interface endpoint, you’re using PrivateLink technology.</p><p>PrivateLink also enables AWS services to connect to your VPC privately (through service endpoints) and lets you share your own applications as PrivateLink-powered services.</p><h4>The Network Plumbing</h4><p>When you create an interface endpoint using PrivateLink:</p><ol><li><strong>AWS provisions ENIs in your subnets</strong>: These are actual Elastic Network Interfaces with private IP addresses drawn from your specified subnet CIDR ranges.</li><li><strong>AWS configures its backbone router infrastructure</strong>: Behind the scenes, AWS sets up specialized routes within their global backbone network to direct traffic from your ENIs to the target service.</li><li><strong>AWS creates internal load balancers</strong>: These aren’t visible to you, but AWS creates internal Network Load Balancers (NLBs) to handle the traffic between your ENIs and the service endpoints.</li><li><strong>DNS records are created</strong>: AWS provisions and configures new DNS entries that resolve to the private IPs of your ENIs.</li></ol><p>Think of it as AWS creating a private tunnel through their backbone network, connecting your VPC directly to the service provider’s VPC.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*QwAfD3_ZN_Z_E9iVcvBvNA.png" /></figure><p>Let’s trace a packet’s journey when you access an AWS service through PrivateLink:</p><ol><li>Your application makes a request to a service (e.g., sqs.us-east-1.amazonaws.com)</li><li>Your VPC’s DNS resolver returns the private IP of the ENI (if private DNS is enabled)</li><li>The packet is sent to that private IP address in your subnet</li><li>The packet hits the ENI which acts as an entry point to the AWS backbone</li><li>AWS’s internal routing directs the packet across their backbone network</li><li>The packet arrives at an internal load balancer in the service provider’s VPC</li><li>The load balancer distributes the traffic to the actual service instances</li><li>The response follows the same path in reverse</li></ol><p>This entire journey happens within AWS’s private network, never touching the public internet.</p><p>Gateway endpoints, on the other hand, use a different mechanism entirely. They modify your route tables rather than using ENIs and don’t use PrivateLink in the same way interface endpoints do.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/eaa97d356c15c941a83f93a5e8cf2b27/href">https://medium.com/media/eaa97d356c15c941a83f93a5e8cf2b27/href</a></iframe><h4>Use gateway endpoints when:</h4><ul><li>You only need S3 and/or DynamoDB access</li><li>Cost is a primary concern</li><li>You don’t need access from on-premises</li></ul><h4>Use interface endpoints when:</h4><ul><li>You need services beyond S3/DynamoDB</li><li>You require access from on-premises networks via Direct Connect/VPN</li><li>You need access from peered VPCs</li><li>The additional cost is justified by your requirements</li></ul><p>A quick rule of thumb: Always use gateway endpoints for S3 and DynamoDB unless you specifically need the features of interface endpoints (like on-prem access).</p><h3>Advanced VPC Endpoint Strategies</h3><p>Once you understand the basics, you can implement more sophisticated patterns:</p><h4>Centralized Access Pattern</h4><p>In a multi-VPC environment, rather than creating interface endpoints in every VPC, you can:</p><ol><li>Create endpoints in a central “services” VPC</li><li>Use VPC peering or Transit Gateway to connect other VPCs to this central VPC</li><li>Enable DNS resolution across VPC peering to resolve the endpoint DNS names</li><li>Gateway endpoints must be configured in each spoke VPC, as necessary.</li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*bvufXbBDIORv2teW2zhYKQ.png" /></figure><p>This approach saves money and simplifies management, but creates a dependency on the central VPC.</p><h4>Security Best Practices</h4><p>VPC endpoints support endpoint policies — IAM-like policy documents that control which principals can access which resources through the endpoint.</p><p>Here’s a simple example that restricts an S3 endpoint to only allow access to specific buckets:</p><pre>{<br>  &quot;Statement&quot;: [<br>    {<br>      &quot;Action&quot;: &quot;s3:*&quot;,<br>      &quot;Effect&quot;: &quot;Allow&quot;,<br>      &quot;Resource&quot;: [<br>        &quot;arn:aws:s3:::my-prod-bucket&quot;,<br>        &quot;arn:aws:s3:::my-prod-bucket/*&quot;<br>      ],<br>      &quot;Principal&quot;: &quot;*&quot;<br>    }<br>  ]<br>}</pre><p><strong>Private DNS Considerations</strong></p><p>When you enable private DNS for interface endpoints, AWS makes the standard service DNS name (like <em>sqs.us-east-1.amazonaws.com</em>) resolve to your private endpoint.<br>This is usually what you want, but be careful in complex networking scenarios. For example, if you have resources that should use the public endpoint and others that should use the private endpoint, private DNS might complicate things.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1022/1*aA3wQvNoQKFseTVap2Xj_g.png" /></figure><h3>Key Takeaways</h3><ol><li><strong>Start with gateway endpoints for S3 and DynamoDB</strong> — They’re free and simple to implement.</li><li><strong>Be strategic with interface endpoints</strong> — Identify which services truly need them and consider centralizing them in a shared services VPC.</li><li><strong>Consider your entire network topology</strong> — VPC endpoints work differently with VPC peering, Transit Gateway, and Direct Connect.</li><li><strong>Use endpoint policies for defence-in-depth</strong> — Even if your VPC is secure, endpoint policies add another layer of protection.</li><li><strong>Watch for service improvements</strong> — AWS occasionally adds gateway endpoint support for new services or reduces costs for interface endpoints</li></ol><p>VPC endpoints represent one of the most significant improvements to AWS networking in recent years. They solve real problems that used to require complex workarounds, and they enable truly private cloud architectures.<br>Understanding the differences between endpoint types — and knowing when to use each — can simplify your architecture, enhance your security posture, and potentially save you money.</p><p>I hope you found this helpful! See you again on another topic soon. Till then,</p><blockquote><strong>Happy Architecting!!</strong></blockquote><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=6c43aa74f762" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[TOGAF vs AWS Well-Architected Framework: Choosing the Right Architecture Approach]]></title>
            <link>https://medium.com/@tarunsinghal.me/togaf-vs-aws-well-architected-framework-choosing-the-right-architecture-approach-81064a6989b6?source=rss-9e5e15467d9b------2</link>
            <guid isPermaLink="false">https://medium.com/p/81064a6989b6</guid>
            <category><![CDATA[cloud-architecture]]></category>
            <category><![CDATA[digital-transformation]]></category>
            <category><![CDATA[enterprise-architecture]]></category>
            <category><![CDATA[togaf]]></category>
            <category><![CDATA[aws-well-architected]]></category>
            <dc:creator><![CDATA[Tarun Singhal]]></dc:creator>
            <pubDate>Tue, 18 Mar 2025 01:32:31 GMT</pubDate>
            <atom:updated>2025-03-18T01:32:31.256Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*fjCC7IUGLq_-8dHCRsjc0A.jpeg" /></figure><p>As architects, we often face with critical decision: which framework should guide our design process? Two frameworks frequently stand out — TOGAF and the AWS Well-Architected Framework. Over my years working with enterprise clients transitioning to the cloud, I have seen firsthand how understanding the nuances of these frameworks can make or break a successful implementation.</p><p>Let’s dive into these frameworks, exploring their purposes, strengths, and when to use each or both together.</p><h3>Understanding TOGAF</h3><p>The Open Group Architecture Framework (TOGAF) serves as a comprehensive enterprise architecture methodology that offers a structured approach to the design, planning, implementation, and governance of an enterprise’s IT architecture. Its primary focus is aligning IT initiatives with business objectives.</p><h4>Core Components of TOGAF</h4><ul><li><strong>Architecture Development Method (ADM):</strong> This is the heart of TOGAF — a cyclical process guiding enterprise architecture development through phases including:<br>- <strong>Preliminary Phase</strong>: Setting up the organizational context.<br>- <strong>Architecture Vision:</strong> Defining business goals and high-level architecture.<br>- <strong>Information Systems Architecture:</strong> Establishing data and application architectures.<br>- <strong>Technology Architecture:</strong> Defining infrastructure needs.<br>- <strong>Opportunities &amp; Solutions:</strong> Identifying implementation projects.<br>- <strong>Migration Planning:</strong> Creating transition plans.<br>- <strong>Implementation Governance:</strong> Overseeing architecture implementation.<br>- <strong>Architecture Change Management:</strong> Managing ongoing architectural evolution.</li><li><strong>Architecture Content Framework</strong>: Provides structure for organizing architecture artifacts.</li><li><strong>Enterprise Continuum:</strong> A repository for architecture assets, patterns, and standards</li></ul><h3>Understanding AWS Well-Architected Framework</h3><p>The AWS Well-Architected Framework provides best practices for designing and operating systems specifically in the AWS cloud environment. Rather than offering a comprehensive enterprise approach, it focuses on building optimal cloud workloads.</p><h4>The Six Pillars</h4><ol><li><strong>Operational Excellence:</strong> Running systems that deliver business value while continuously improving processes</li><li><strong>Security:</strong> Protecting information and systems through risk assessment and mitigation.</li><li><strong>Reliability:</strong> Ensuring systems recover from disruptions and meet demand.</li><li><strong>Performance Efficiency:</strong> Using computing resources efficiently to meet requirements.</li><li><strong>Cost Optimization:</strong> Avoiding unnecessary expenses by understanding and controlling costs.</li><li><strong>Sustainability:</strong> Minimizing environmental impacts of cloud workloads.</li></ol><h3>When to Use Each Framework</h3><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/89bb3d1f2e04329e69b0338784bad844/href">https://medium.com/media/89bb3d1f2e04329e69b0338784bad844/href</a></iframe><h4>When to Choose TOGAF</h4><p>TOGAF shines in these scenarios:</p><ul><li><strong>Enterprise-wide Digital Transformation:</strong> When you need to align complex IT landscapes with evolving business strategies.</li><li><strong>Multi-Vendor Technology Environments:</strong> When working across diverse technology stacks that need coherent integration.</li><li><strong>Strong Governance Requirements:</strong> When formal architecture processes and governance are mandated</li><li><strong>Long-term Strategic Planning:</strong> When creating 3–5 year technology roadmaps.</li></ul><h4>When to Choose AWS Well-Architected Framework</h4><p>The AWS Well-Architected Framework excels when:</p><ul><li>Building on AWS Cloud: When developing solutions specifically for AWS.</li><li>Immediate Implementation Needed: When you need practical guidance without extensive process overhead.</li><li>Cloud-Native Applications: When designing new applications for cloud-first deployment.</li><li>Cost and Performance Optimization: When improving existing AWS workloads.</li></ul><h4>Leveraging Both Frameworks Together</h4><p>In my experience, the most successful enterprises don’t choose one framework over the other, they combine them strategically.</p><ol><li>Use TOGAF for Enterprise Vision: Apply TOGAF to establish the big-picture architecture, business alignment, and governance structure.</li><li>Implement with AWS Well-Architected Framework: When building specific workloads on AWS, use the AWS Well-Architected Framework to ensure optimal implementation.</li><li>Create Feedback Loops: Let cloud implementation learnings (AWS) inform enterprise architecture decisions (TOGAF) and vice versa.</li></ol><h4>Final Thoughts:</h4><p>Both TOGAF and AWS Well-Architected framework have their place in modern enterprise architecture. Rather than viewing them as competing approaches, consider them complementary tools in your architectural toolkit. TOGAF provides the enterprise-wide structure and business alignment that organizations need for coherent transformation, while AWS Well-Architected Framework offers practical guidance for building resilient, efficient cloud solutions.</p><p>The right choice depends on your specific needs:</p><ul><li>Starting a major enterprise transformation? Begin with TOGAF.</li><li>Building systems on AWS? Start with a Well-Architected Framework.</li><li>Doing both? Use them together.</li></ul><p>The most effective approach is often pragmatic, using elements of each framework where they add the most value. Start with understanding your specific business and technical challenges, then apply the appropriate framework components to address them.</p><p>Remember that frameworks are guides, not rulebooks. The ultimate measure of architectural success is not adherence to a framework, but whether your solutions effectively meet business needs while enabling future growth and adaptation.</p><p>I hope you found this helpful for your architecture journey! See you again on another topic soon. Till then,</p><blockquote><strong>Happy Architecting!!</strong></blockquote><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=81064a6989b6" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Mastering Container Lifecycle Management and Pod Eviction ( Part 4)]]></title>
            <link>https://medium.com/@tarunsinghal.me/mastering-container-lifecycle-management-and-pod-eviction-part-4-a0167655b567?source=rss-9e5e15467d9b------2</link>
            <guid isPermaLink="false">https://medium.com/p/a0167655b567</guid>
            <category><![CDATA[aws-eks]]></category>
            <category><![CDATA[kubernetes]]></category>
            <category><![CDATA[resilience]]></category>
            <category><![CDATA[aws]]></category>
            <category><![CDATA[lifecycle-management]]></category>
            <dc:creator><![CDATA[Tarun Singhal]]></dc:creator>
            <pubDate>Wed, 19 Feb 2025 09:32:21 GMT</pubDate>
            <atom:updated>2025-02-19T09:32:21.062Z</atom:updated>
            <content:encoded><![CDATA[<p>Welcome to Part 4 of our series! After exploring health checks and probes, let’s dive into contianer lifecycle management and pod eviction strategies- crucial aspects that can make or break your application’s reliability.</p><p>Here’s what we will cover in this series:</p><ul><li><a href="https://medium.com/@tarunsinghal.me/understanding-the-foundations-of-ha-in-amazon-eks-part-1-ad3811284f19">Part 1: Understanding the Foundations of HA.</a></li><li><a href="https://medium.com/@tarunsinghal.me/mastering-pod-distribution-strategies-part-2-783495a1e374">Part 2: Mastering Pod Disruption Strategies</a></li><li><a href="https://blogs.tarunsinghal.me/mastering-health-checks-and-probes-in-eks-part-3-82ddaf9045c1">Part 3: Mastering Health Checks and Probes in EKS</a></li><li>Part 4: Container Lifecycle Management ( this post)</li><li>Part 4: Advanced Resilience Techniques</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/648/1*G_pOo7ghPOBTriHmul3jQw.png" /></figure><blockquote><strong>Why Container Lifecycle Management Matters?</strong></blockquote><p>Let me share my experience. A customer’s application was experiencing random connection drop during deployments. The application worked fine, healthchecks passed, but users where getting occasional 503 errors. After investigation we found out the culprit!! Improper container lifecycle management. Pods were being terminated before completing their in-flight requests.</p><blockquote><strong>Understanding Container Lifecycle</strong></blockquote><p>In kubernetes, containers go through several phases:<br>- Initialization<br>- Running<br>- Termination</p><p>Let’s deep dive into how to handle each phase properly.</p><blockquote><strong>Graceful Contianer Shutdown</strong></blockquote><p>One of the most critical aspects is handling the SIGTERM signal properly. Here’s an example:</p><pre>apiVersion: apps/v1<br>kind: Deployment<br>metadata:<br>  name: web-application<br>spec:<br>  template:<br>    spec:<br>      containers:<br>      - name: web-app<br>        lifecycle:<br>          preStop:<br>            exec:<br>              command: <br>              - /bin/sh<br>              - -c<br>              - |<br>                # Notify application to stop accepting new requests<br>                curl -X POST http://localhost:8080/prepare-shutdown<br>                # Wait for in-flight requests and loadbalancer update<br>                sleep 15</pre><p>Key points about this configuration:</p><ul><li>The preStop hook runs before SIGTERM</li><li>We notify the application to stop accepting new requests</li><li>15 seconds sleep allows:<br>- Load Balancer to update their routing<br>- In-flight requests to complete<br>- Connection Draining</li></ul><p>Here’s an example of Node.js application showing proper shutdown handling:</p><pre>const express = require(&#39;express&#39;);<br>const app = express();<br><br>let isShuttingDown = false;<br><br>// Graceful shutdown handler<br>process.on(&#39;SIGTERM&#39;, () =&gt; {<br>    console.log(&#39;Received SIGTERM signal&#39;);<br>    isShuttingDown = true;<br>    <br>    // Stop accepting new requests<br>    server.close(() =&gt; {<br>        console.log(&#39;Server closed&#39;);<br>        <br>        // Close database connections<br>        db.end(() =&gt; {<br>            console.log(&#39;Database connections closed&#39;);<br>            process.exit(0);<br>        });<br>    });<br>});<br><br>// Health check endpoint<br>app.get(&#39;/health&#39;, (req, res) =&gt; {<br>    if (isShuttingDown) {<br>        res.status(503).json({ status: &#39;shutting_down&#39; });<br>        return;<br>    }<br>    res.json({ status: &#39;healthy&#39; });<br>});<br><br>const server = app.listen(8080);</pre><p>Another approach (Simpler yet effective)</p><pre>apiVersion: apps/v1<br>kind: Deployment<br>metadata:<br>  name: web-application<br>spec:<br>  template:<br>    spec:<br>      containers:<br>      - name: web-app<br>        lifecycle:<br>          preStop:<br>            exec:<br>              command: [&quot;sh&quot;, &quot;-c&quot;, &quot;sleep 10&quot;]<br>        terminationGracePeriodSeconds: 60</pre><p>Why this works:<br>- Gives time for endpoint updates<br>- No application changes required<br>- Universal compatibility with any application</p><blockquote><strong>Handling Pod Eviction</strong></blockquote><p>Pod eviction can happen for vairous reasons:<br>- Node maintenance <br>- Resource pressure<br>- Node failures</p><p>Here’s how to handle it gracefully:</p><pre>apiVersion: apps/v1<br>kind: Deployment<br>metadata:<br>  name: critical-service<br>spec:<br>  template:<br>    spec:<br>      # Custom eviction timeout<br>      terminationGracePeriodSeconds: 60<br>      tolerations:<br>      - key: &quot;node.kubernetes.io/unreachable&quot;<br>        operator: &quot;Exists&quot;<br>        effect: &quot;NoExecute&quot;<br>        tolerationSeconds: 30<br>      - key: &quot;node.kubernetes.io/not-ready&quot;<br>        operator: &quot;Exists&quot;<br>        effect: &quot;NoExecute&quot;<br>        tolerationSeconds: 30</pre><p>Let’s break this down:</p><ul><li>terminationGracePeriodSeconds : Time given for graceful shutdown</li><li>Tolerations: Define how long pods tolerate node issues</li><li>Custom eviction timeouts help during network partitions</li></ul><blockquote><strong>Test Lifecycle Management</strong></blockquote><ul><li>Test Graceful shutdown</li></ul><pre># Start monitoring requests<br>kubectl logs -f &lt;pod-name&gt;<br><br># Trigger a rolling update<br>kubectl set image deployment/web-app web-app=new-version<br><br># Watch for connection drops<br>while true; do curl http://service-url/health; sleep 0.1; done</pre><ul><li>Test Pod Eviction</li></ul><pre># Simulate node failure<br>kubectl taint node &lt;node-name&gt; node.kubernetes.io/unreachable=:NoExecute<br><br># Monitor pod movement<br>kubectl get pods -w</pre><p>Best Practices from Production Experience:</p><ul><li>Proper Shutdown Order:<br>- Stop accepting new requests<br>- Completing in-flight requests<br>- Close external connections<br>- Perform clean up tasks</li><li>Resource Mangement</li></ul><pre>spec:<br>  containers:<br>  - name: app<br>    resources:<br>      requests:<br>        memory: &quot;128Mi&quot;<br>        cpu: &quot;100m&quot;<br>      limits:<br>        memory: &quot;256Mi&quot;<br>        cpu: &quot;200m&quot;</pre><ul><li>Monitor Lifecycle Events:</li></ul><pre>#!/bin/bash<br># Monitor container restarts and terminations<br>kubectl get events --field-selector reason=Killing,reason=Started \<br>  --sort-by=&#39;.metadata.creationTimestamp&#39;</pre><ul><li>Pod Disruption Budget</li></ul><pre>apiVersion: policy/v1<br>kind: PodDisruptionBudget<br>metadata:<br>  name: critical-service-pdb<br>spec:<br>  minAvailable: 2<br>  selector:<br>    matchLabels:<br>      app: critical-service</pre><ul><li>Node Affinity for Critical Services:</li></ul><pre>affinity:<br>  nodeAffinity:<br>    requiredDuringSchedulingIgnoredDuringExecution:<br>      nodeSelectorTerms:<br>      - matchExpressions:<br>        - key: node-type<br>          operator: In<br>          values:<br>          - critical</pre><blockquote><strong>Coming Up Next</strong></blockquote><p>In our final part, we’ll explore advanced resilience techniques and disaster recovery strategies. Till then</p><blockquote><strong><em>Happy Architecting!!</em></strong></blockquote><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=a0167655b567" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Mastering Health Checks and Probes in EKS ( Part 3)]]></title>
            <link>https://medium.com/@tarunsinghal.me/mastering-health-checks-and-probes-in-eks-part-3-82ddaf9045c1?source=rss-9e5e15467d9b------2</link>
            <guid isPermaLink="false">https://medium.com/p/82ddaf9045c1</guid>
            <category><![CDATA[aws-eks]]></category>
            <category><![CDATA[kubernetes]]></category>
            <category><![CDATA[high-availability]]></category>
            <category><![CDATA[health-check]]></category>
            <dc:creator><![CDATA[Tarun Singhal]]></dc:creator>
            <pubDate>Fri, 14 Feb 2025 18:17:39 GMT</pubDate>
            <atom:updated>2025-02-19T07:34:31.793Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*1gQvjNP4Gd8QL1yG" /></figure><p>Welcome to Part 3 of this series! After exploring HA foundations and pod disruption strategies, let’s dive into one of the most crucial aspects of application reliability i.e. health check and probes.</p><p>Here’s what we will cover in this series:</p><ul><li><a href="https://medium.com/@tarunsinghal.me/understanding-the-foundations-of-ha-in-amazon-eks-part-1-ad3811284f19">Part 1: Understanding the Foundations of HA.</a></li><li><a href="https://medium.com/@tarunsinghal.me/mastering-pod-distribution-strategies-part-2-783495a1e374">Part 2: Mastering Pod Disruption Strategies</a></li><li>Part 3: Mastering Health Checks and Probes in EKS ( this post)</li><li>Part 4: Container Lifecycle Management</li><li>Part 4: Advanced Resilience Techniques</li></ul><blockquote><strong>Why Heath Checks Matter?</strong></blockquote><p>Let me share an incident. A client’s application seemed perfectly healthy from the outside, the pods were running and services were responding. However, users were experiencing random timeouts. During investigation, we found out that while the application process was running, it had a deadlocked internally. The container was alive, but the application wasn’t truly functional.</p><p>This is exactly where proper health checks come in. Think of them as your application’s vital signs monitor.</p><blockquote><strong>Understanding Kubernetes Probes</strong></blockquote><p>There are main three types of probes:</p><ol><li>Startup Probe: The initial health check</li><li>Liveness Probe: The heartbeat check</li><li>Readiness Probe: The “ready for traffic” check</li></ol><p>Let’s dive into each one with real implementation examples</p><p><strong>Startup Probe: The Initial Health Check</strong></p><p>Startup probes are particularly useful for the applications with varying initialization times. Here’s an example from a java application:</p><pre>apiVersion: apps/v1<br>kind: Deployment<br>metadata:<br>  name: spring-app<br>spec:<br>  template:<br>    spec:<br>      containers:<br>      - name: spring-app<br>        startupProbe:<br>          httpGet:<br>            path: /actuator/health<br>            port: 8080<br>          failureThreshold: 30<br>          periodSeconds: 10</pre><p>Why these settings?<br>- The probe checks /actuator/health every 10 seconds<br>- Application has up to 300 seconds (30x10) to start<br>- Other probe won’t start until this succeeds <br>Pro Tip: For applications with unpredictable startup times, always implement startup probes first.</p><p><strong>Liveness Probe: The Hearbeat Monitor</strong></p><p>Liveness probes help detect application deadlocks or frozen states. Here’s how we can configure them:</p><pre>livenessProbe:<br>  httpGet:<br>    path: /health<br>    port: 8080<br>  initialDelaySeconds: 60<br>  periodSeconds: 10<br>  timeoutSeconds: 5<br>  failureThreshold: 3</pre><p>Important Consideration:<br>- Keep the health endpoint lightweight<br>- Don’t check external dependencies <br>- Set appropriate timeouts</p><p>Here’s an example of a custom command probe we use for database sidecar:</p><pre>livenessProbe:<br>  exec:<br>    command:<br>    - /bin/sh<br>    - -c<br>    - mysqladmin ping -h localhost<br>  initialDelaySeconds: 30<br>  periodSeconds: 10</pre><p><strong>Readiness Probe: Traffic Control</strong></p><p>Readiness probes determine if your pod should receive trafic or not. Here’s production example:</p><pre>readinessProbe:<br>  httpGet:<br>    path: /ready<br>    port: 8080<br>    httpHeaders:<br>    - name: Custom-Header<br>      value: Ready_Check<br>  initialDelaySeconds: 30<br>  periodSeconds: 5</pre><p>Your readiness endpoint should check:<br>- Database connection<br>- Cache connectivity<br>- Message queue connections<br>- Required configurations</p><blockquote><strong>Load Balancer Health Checks</strong></blockquote><p>When using AWS Load Balancers with EKS, we need to configure health checks at two levels:</p><p><strong>Kubernetes Service:</strong></p><pre>apiVersion: v1<br>kind: Service<br>metadata:<br>  name: my-app<br>  annotations:<br>    alb.ingress.kubernetes.io/healthcheck-path: /health<br>    alb.ingress.kubernetes.io/healthcheck-interval-seconds: &#39;15&#39;<br>    alb.ingress.kubernetes.io/healthcheck-timeout-seconds: &#39;5&#39;<br>    alb.ingress.kubernetes.io/healthy-threshold-count: &#39;2&#39;<br>    alb.ingress.kubernetes.io/unhealthy-threshold-count: &#39;2&#39;<br>spec:<br>  type: NodePort<br>  ports:<br>    - port: 80<br>      targetPort: 8080</pre><p><strong>Ingress Resource:</strong></p><pre>apiVersion: networking.k8s.io/v1<br>kind: Ingress<br>metadata:<br>  name: my-app-ingress<br>  annotations:<br>    kubernetes.io/ingress.class: alb<br>spec:<br>  rules:<br>    - http:<br>        paths:<br>          - path: /*<br>            pathType: Prefix<br>            backend:<br>              service:<br>                name: my-app<br>                port:<br>                  number: 80</pre><blockquote><strong>Testing Health Checks</strong></blockquote><p>Here’s my go-to checklist for validating health checks:</p><p><strong>Test Startup Probe:</strong></p><pre># Watch pod startup<br>kubectl get pods -w<br># Check events<br>kubectl describe pod &lt;pod-name&gt;</pre><p><strong>Validate Liveness Probe:</strong></p><pre># Simulate application freeze<br>kubectl exec &lt;pod-name&gt; -- kill -STOP 1<br># Watch pod restart<br>kubectl get pods -w</pre><p><strong>Test Readiness Probe:</strong></p><pre># Check endpoint directly<br>kubectl exec &lt;pod-name&gt; -- curl localhost:8080/ready<br># Monitor endpoint status<br>kubectl get endpoints -w</pre><blockquote><strong>Common Pitfalls and Solutions</strong></blockquote><p><strong>Probe Timing Issues:</strong><br>- Set realistic initialDelaySeconds<br>- Consider application warm-up time<br>- Use startup probe for long-starting applications</p><p><strong>Dependency Checks:</strong><br>- Keep liveness probes independent<br>- Use readiness probes for dependency checks<br>- Implement circuit breakers for external dependencies</p><p><strong>Resource Constraints:</strong><br>- Set appropriate CPU/Memory limits<br>- Consider probe overhead<br>- Monitor probe performance</p><blockquote><strong>Best Practices from Production</strong></blockquote><ul><li><strong>Probe Implementation</strong></li></ul><p>Let’s look at a simple yet effective health check handler:</p><pre>// Example Go health check handler<br>func healthHandler(w http.ResponseWriter, r *http.Request) {<br>    // Quick in-memory check<br>    if !isApplicationHealthy() {<br>        w.WriteHeader(http.StatusServiceUnavailable)<br>        return<br>    }<br>    w.WriteHeader(http.StatusOK)<br>}</pre><p>Why this approach?<br>- The handler is deliberately simple and fast<br>- It checks only critical in-memory states<br>- Avoids external depdency checks in livenss probes<br>- Return clear HTTP status codes( 200 for healthy, 503 for unhealthy)</p><p>Pro tip: Keep your liveness probe endpoints lightweight. They’re called frequently, and you don’t want them consuming significant resources.</p><ul><li><strong>Graceful Shutdown Implementation</strong></li></ul><pre>lifecycle:<br>  preStop:<br>    exec:<br>      command: [&quot;/bin/sh&quot;, &quot;-c&quot;, &quot;sleep 10&quot;]</pre><p>This configuration is crucial for graceful pod termination. Here’s why:<br>- The preStop hook runs before the container receives SIGTERM<br>- The 10-second sleep allows:<br> — Time for pod to be removed from service endpoint<br> — Load balancers to update their routing<br> — In-flight requets to complete<br>- Prevents connection drop during deployments</p><ul><li><strong>Monitoring Probe Status</strong></li></ul><pre>#!/bin/bash<br># Script to monitor probe failures<br>kubectl get events --field-selector reason=Unhealthy --sort-by=.metadata.creationTimestamp</pre><p>This script helps you with:<br>- Track probe failures across your cluster<br>- Identify problematic pods quickly<br>- Debug health check issues<br>- Get historical data abut unhealthy states</p><p><strong>Remember:</strong> Proper monitoring of probe status helps catch issues before they impact users.</p><blockquote><strong>Coming Up Next:</strong></blockquote><p>In Part 4, we’ll explore container lifecycle management, including how to handle graceful shutdowns and state transitions effectively. Till then</p><blockquote><strong>Happy Architecting!!</strong></blockquote><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=82ddaf9045c1" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Mastering Pod Distribution Strategies ( Part 2)]]></title>
            <link>https://medium.com/@tarunsinghal.me/mastering-pod-distribution-strategies-part-2-783495a1e374?source=rss-9e5e15467d9b------2</link>
            <guid isPermaLink="false">https://medium.com/p/783495a1e374</guid>
            <category><![CDATA[aws-eks]]></category>
            <category><![CDATA[high-availability]]></category>
            <category><![CDATA[kubernetes]]></category>
            <category><![CDATA[resilience]]></category>
            <dc:creator><![CDATA[Tarun Singhal]]></dc:creator>
            <pubDate>Thu, 13 Feb 2025 17:23:11 GMT</pubDate>
            <atom:updated>2025-02-19T07:37:04.587Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*GhtoJ5ivIGP4SBchIjChhg.png" /></figure><p>Welcome back!! In the <a href="https://medium.com/@tarunsinghal.me/understanding-the-foundations-of-ha-in-amazon-eks-part-1-ad3811284f19">part 1</a> of this series , we laid the groundwork for the high availability in Amzon EKS.</p><p>Here’s what we will cover in this series:</p><ul><li><a href="https://medium.com/@tarunsinghal.me/understanding-the-foundations-of-ha-in-amazon-eks-part-1-ad3811284f19">Part 1: Understanding the Foundations of HA.</a></li><li><a href="https://medium.com/@tarunsinghal.me/mastering-pod-distribution-strategies-part-2-783495a1e374">Part 2: Mastering Pod Disruption Strategies</a> ( this post)</li><li><a href="https://blogs.tarunsinghal.me/mastering-health-checks-and-probes-in-eks-part-3-82ddaf9045c1">Part 3: Mastering Health Checks and Probes in EKS</a></li><li>Part 4: Container Lifecycle Management</li><li>Part 4: Advanced Resilience Techniques</li></ul><p>Today, let’s dive deep into one of the most crucial aspect of HA — pod disruption strategies.</p><blockquote><strong>Why Pod Disruption Matters?</strong></blockquote><p>I had a retail client who was experiencing slowdowns during peak shopping hours. We dug into their application and found that all their critical pods were running on the same node in a single AZ. If there was a network issue, their entire service could crash. Not the best situation, huh?</p><blockquote><strong>Understanding Pod Disruption Strategies</strong></blockquote><p>In kubernetes, pod disruption strategies are like traffic controller that help us place our pods across the cluster in a way that maximizes availablity and reliability. Let’s understand the three main strategies:</p><ol><li>Pod Topology Spread Constraints<br>- Think of this as setting rules for how pods should be spread across failure domains( AZs, nodes)<br>- Helps maintain service availability even if a part of your infrastructure fails.</li><li>Pod Affinity/Anti-Affinity <br>- Like magnestism in kubernetes — you can make pods attract or repel each other.<br>- Useful for co-locating related pods or keeping competing pods apart.</li><li>Node Selection and Node Affinity<br>- Gives you control over which nodes can run your pods<br>- Helpful for workloads with specific hardware requirements</li></ol><blockquote><strong>Deep Dive: Pod Topology Spread Constraints</strong></blockquote><p>Let’s look at a real example. Recently, I worked with a team running critical payment service. We needed to ensure thier pods were evenly distributed across AZs. Here’s how we did it:</p><pre>apiVersion: apps/v1<br>kind: Deployment<br>metadata:<br>  name: payment-service<br>spec:<br>  replicas: 6<br>  template:<br>    metadata:<br>      labels:<br>        app: payment<br>    spec:<br>      topologySpreadConstraints:<br>      - maxSkew: 1<br>        topologyKey: topology.kubernetes.io/zone<br>        whenUnsatisfiable: DoNotSchedule<br>        labelSelector:<br>          matchLabels:<br>            app: payment</pre><p>What’s happening here?</p><ul><li>maxSkew: 1 means we want the differenec in number of pods between any two AZs to be at most 1</li><li>DoNotSchedule ensures strict enforcement of our distribution rules</li><li>With 6 replicas. we did get 2 pods in each AZ in a 3-AZ setup</li></ul><blockquote><strong>Making Pod Affinity Work for You</strong></blockquote><p>Sometimes you need more specific control. Here’s scenario I encountered with Redis cluster:</p><pre>apiVersion: apps/v1<br>kind: StatefulSet<br>metadata:<br>  name: redis<br>spec:<br>  template:<br>    spec:<br>      affinity:<br>        podAntiAffinity:<br>          requiredDuringSchedulingIgnoredDuringExecution:<br>          - labelSelector:<br>              matchExpressions:<br>              - key: app<br>                operator: In<br>                values:<br>                - redis<br>            topologyKey: kubernetes.io/hostname</pre><p>This ensures Redis pod never co-locate on the same node, which is crucial for the HA!!</p><blockquote><strong>Smart Workload Placement</strong></blockquote><p>First, We implemented node labeling for different workloads types:</p><pre>kubectl label nodes node1 workload-type=cpu-intensive<br>kubectl label nodes node2 workload-type=low-latency</pre><p>Then used node affinity to place workloads:</p><pre>apiVersion: apps/v1<br>kind: Deployment<br>metadata:<br>  name: batch-processor<br>spec:<br>  template:<br>    spec:<br>      affinity:<br>        nodeAffinity:<br>          requiredDuringSchedulingIgnoredDuringExecution:<br>            nodeSelectorTerms:<br>            - matchExpressions:<br>              - key: workload-type<br>                operator: In<br>                values:<br>                - cpu-intensive</pre><blockquote><strong>Real-World Testing and Validation</strong></blockquote><p>Don’t just take the word for it — Test it !!<br>Here’s how we validated our setup using AWS FIS:</p><pre># AWS FIS Experiment Template<br>schemaVersion: 2.0<br>description: &quot;Test pod distribution across AZs&quot;<br>targets:<br>  - name: nodes<br>    resourceType: aws:ec2:instance<br>    selection:<br>      filters:<br>        - path: &quot;Placement.AvailabilityZone&quot;<br>          values: [&quot;us-west-2a&quot;]<br>actions:<br>  - name: stop-instances<br>    actionId: aws:ec2:stop-instances<br>    targets:<br>      instances: [&quot;nodes&quot;]</pre><p>Running this experiment helped us verify that we lost an AZ:</p><ul><li>Existing pods in other AZs continued serving traffic</li><li>New Pods were scheduled in the remaining AZs</li><li>Our application maintained availability</li></ul><p><strong>Rebalancing Pods with Descheduler</strong></p><p>Sometimes, even with the good initial pod distribution, things can get unbalanced over time. Enter Descheduler — think of it as a house cleaner for your cluster. Here’s how we configure it:</p><pre>apiVersion: &quot;descheduler/v1alpha1&quot;<br>kind: &quot;DeschedulerPolicy&quot;<br>strategies:<br>  &quot;RemovePodsViolatingTopologySpreadConstraint&quot;:<br>    enabled: true<br>  &quot;RemovePodsViolatingInterPodAntiAffinity&quot;:<br>    enabled: true</pre><p><strong>Check Current Distribution</strong></p><pre>kubectl get pods -o wide --show-labels | \<br>  awk &#39;{print $1, $7, $8}&#39; | \<br>  sort -k2</pre><p><strong>Monitor Distribution</strong></p><pre>kubectl get pods -o json | jq -r &#39;<br>  .items[] | <br>  select(.status.phase==&quot;Running&quot;) |<br>  [.metadata.name, .spec.nodeName, .status.hostIP] |<br>  @tsv<br>&#39; | column -t</pre><p><strong>Handling Scale Events:</strong></p><pre># HPA configuration with proper scaling behavior<br>apiVersion: autoscaling/v2<br>kind: HorizontalPodAutoscaler<br>metadata:<br>  name: app-hpa<br>spec:<br>  scaleTargetRef:<br>    apiVersion: apps/v1<br>    kind: Deployment<br>    name: app<br>  minReplicas: 3<br>  maxReplicas: 10<br>  behavior:<br>    scaleDown:<br>      stabilizationWindowSeconds: 300<br>  metrics:<br>  - type: Resource<br>    resource:<br>      name: cpu<br>      target:<br>        type: Utilization<br>        averageUtilization: 50</pre><p>When things don’t work out as expected, check scheduler decision</p><pre>kubectl get events --sort-by=&#39;.metadata.creationTimestamp&#39; | grep &quot;Failed to schedule&quot;</pre><blockquote><strong>Coming Up Next</strong></blockquote><p>In Part 3, we’ll explore health checks and probes — crucial components for maintaining application health. I’ll share practical examples of how to configure these effectively and common pitfalls to avoid. Till then</p><blockquote><strong>Happy Architecting!!</strong></blockquote><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=783495a1e374" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Understanding the Foundations of HA in Amazon EKS ( Part 1)]]></title>
            <link>https://medium.com/@tarunsinghal.me/understanding-the-foundations-of-ha-in-amazon-eks-part-1-ad3811284f19?source=rss-9e5e15467d9b------2</link>
            <guid isPermaLink="false">https://medium.com/p/ad3811284f19</guid>
            <category><![CDATA[kubernetes]]></category>
            <category><![CDATA[high-availability]]></category>
            <category><![CDATA[aws-eks]]></category>
            <category><![CDATA[resilient-architecture]]></category>
            <dc:creator><![CDATA[Tarun Singhal]]></dc:creator>
            <pubDate>Thu, 13 Feb 2025 04:04:01 GMT</pubDate>
            <atom:updated>2025-02-13T04:17:06.421Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*NSyYF3nz4iqENPj3--EQJA.png" /></figure><p>Welcome to the first part of our series on achieving HA and Resilience in Amazon EKS! Over the next few days/weeks, I will be sharing detailed insights from my experience, breaking down complex concepts into practical, actionalable guidance.</p><p>Here’s what will cover in this series:</p><ul><li>Part1: Understanding the Foundation ( this post)</li><li>Part2: Mastering Pod Distribution strategies</li><li>Part3: Implementing Effective Health checks</li><li>Part4: Container Lifecycle Management</li><li>Part 5: Advance Resilience Techniques</li></ul><p>As a Solution Architect, who has worked with numerous customers on their kubernetes journey. I have seen firsthand how critical it is to design applications that can withstand failures and maintain high availability. Today I want to share my experience and practical insights about building resilient application on Amazon EKS.</p><blockquote><strong>Let’s talk about Shared Responsibility First…</strong></blockquote><p>You know how AWS always talks about the shared responsibility model? Well, with EKS, it gets even more interesting. While AWS manages the kubernetes control plane(Thank Godness!), we are responsible for the data plane and application layer. This means we need to carefully think about:</p><ol><li>Our microservices and their container</li><li>The data plane components( Ingress controllers, CNI, service mesh)</li><li>Workload management (Controllers, policies and storage)</li><li>Infrastructure aspects notes(nodes, networking,)</li></ol><p>In my years of working with EKS, I have found that getting these componenets right is crucial for buillding truly resilient applications.</p><blockquote><strong>Building Blocks for High Availability</strong></blockquote><p>Let me share an experience with you all. Recently, I worked with a client who was moving their critical payment processing system to EKS. They need 99.99% uptime, this is challenging but achievable goal.</p><p>Here’s what we implemented</p><p><strong>Spread Workloads Intelligently<br></strong>We used pod topology spread constraints to distribute workloads across multiple Availability Zones. Think of it as not putting all yours eggs in one basket.</p><pre>topologySpreadConstraints:<br>- maxSkew: 1<br>  topologyKey: topology.kubernetes.io/zone<br>  whenUnsatisfiable: ScheduleAnyway</pre><p>This ensures that if one AZ goes down, our application keeps running in others.</p><p><strong>Protect Critical Workloads<br></strong>We implemented Pod Disruption Budgets (PDBs) — think of them as safety nets that ensure a minimum number of pods are always running.</p><pre>apiVersion: policy/v1<br>kind: PodDisruptionBudget<br>metadata:<br>  name: payment-service-pdb<br>spec:<br>  minAvailable: 3<br>  selector:<br>    matchLabels:<br>      app: payment-service</pre><p><strong>Health Checks and Probes<br></strong>This is like having regular health check-ups for our applications.<br>We implemented:<br>- Startup probes for applications with longer initialization times.<br>- Liveness probes to detect application health<br>- Readiness probes to ensure the application is ready to serve the traffic</p><blockquote><strong>Real World Testing and Validation</strong></blockquote><p>Instead of relying on actual outages, we proactively tested our configuration setup using AWS Fault Injection Service and Chaos Mesh.</p><p>Here’s what our chaos testing looked like:</p><p>First, we simulated an AZ failure using AWS FIS:</p><pre>actions:<br>  - name: az-outage<br>    actionId: aws:ec2:stop-instances<br>    parameters:<br>      instanceIds: <br>        - ${TARGET_INSTANCES}<br>    targets:<br>      - Instances in AZ-a</pre><p>Then, we ran controlled chaos experiments:<br>- Terminated nodes in a single AZ<br>- Introduced network latency<br>Simulated pod failures</p><p>The result? Our application maintained availability througput these controlled disruptions. The pod topology spread constraints automatically rebalanced workloads across the remaining AZs, and our PBDs ensured we maintained minimum service levels.</p><p>This kind of proactive testing gives us confidence that our HA architecture works as designed. I highly recommend incorporating choas engineering into your testing strategy, its better to find issues during controlled tests than during actual incidents!!</p><blockquote><strong>What’s coming next?</strong></blockquote><p>In part 2 of this series. we will dive deep into pod disruption strategies. I will share specific configurations, common pitfalls to avoid, and read world examples from my experience. See you soon guys !!</p><blockquote><strong>Happy Architecting!!</strong></blockquote><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=ad3811284f19" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>