<?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 Yash Gaur on Medium]]></title>
        <description><![CDATA[Stories by Yash Gaur on Medium]]></description>
        <link>https://medium.com/@yash.gaur.e?source=rss-02c35e9b7fe7------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*85hD5OnTpEihWPmRCztzHQ.jpeg</url>
            <title>Stories by Yash Gaur on Medium</title>
            <link>https://medium.com/@yash.gaur.e?source=rss-02c35e9b7fe7------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Fri, 20 Nov 2026 17:35:19 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@yash.gaur.e/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[The Physics of Data Residency: Scaling with Decentralised Compute]]></title>
            <link>https://medium.com/@yash.gaur.e/the-physics-of-data-residency-scaling-with-decentralised-compute-36496fe7653a?source=rss-02c35e9b7fe7------2</link>
            <guid isPermaLink="false">https://medium.com/p/36496fe7653a</guid>
            <category><![CDATA[kubernetes]]></category>
            <category><![CDATA[cloud-computing]]></category>
            <category><![CDATA[data-engineering]]></category>
            <category><![CDATA[devops]]></category>
            <category><![CDATA[aws]]></category>
            <dc:creator><![CDATA[Yash Gaur]]></dc:creator>
            <pubDate>Sat, 15 Aug 2026 16:34:53 GMT</pubDate>
            <atom:updated>2026-08-15T16:34:53.057Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*TRS1OiGH96EG7EGKnMzLuA.jpeg" /></figure><h3>Introduction</h3><p>Modern data platforms process terabytes of information for clients operating across diverse geographies, each governed by compliance frameworks such as <strong>SOC2 and GDPR.</strong></p><p>As platforms expand across regions and launch products with stricter compliance requirements, the limitations of centralised data-processing architectures become increasingly difficult to ignore.</p><p>A typical legacy system ingests raw data from external sources, processes it centrally, and delivers the results to client-facing applications. Although simple in concept, this model becomes problematic at scale. Data may need to remain within a specific region, cloud account, or network boundary for regulatory and security reasons. An architecture built around pulling everything into a central environment cannot easily support those constraints.</p><p>To address this problem, we needed to rethink the fundamental approach to data residency.</p><h3>When Data Gravity Becomes a Liability</h3><p>In the original model, data was pulled into a central environment for processing. This worked with a relatively small infrastructure footprint, but growth introduced an invisible tax on every byte moved.</p><p>That tax appeared in three forms:</p><ul><li><strong>Compliance friction:</strong> Every new geography required extensive validation of trust domains and data-sovereignty requirements.</li><li><strong>A growing blast radius:</strong> The farther data travelled from its origin, the more systems and network boundaries were exposed to a potential security incident.</li><li><strong>Egress costs:</strong> Moving terabytes of data across accounts and regions created a significant and ultimately unsustainable financial burden.</li></ul><p>Pulling data into a central environment was no longer viable. However, deploying and independently managing a complete data-processing platform in every geography was not an attractive alternative either. Although that approach appeared straightforward, it would soon become difficult to <strong>observe, operate, and evolve.</strong></p><p>This led to a more interesting question:</p><blockquote><strong>Can global compliance coexist with effortless management?</strong></blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*85blef5wEvPP3LC47Uwo-Q.png" /></figure><h3>The Vision: Move Compute, Not Data</h3><p>The core idea was to execute workloads wherever the data already lived. By moving compute to the boundary instead of moving data across it, the platform could preserve strict isolation without sacrificing operational efficiency.</p><p>Three architectural constraints guided the transition:</p><ul><li><strong>Zero-egress processing:</strong> Workloads must execute within the same account and network boundary as the data they process.</li><li><strong>Decoupled scale:</strong> Supporting a new client, region, or product should not require operating another Kubernetes cluster.</li><li><strong>One brain, many workrooms:</strong> Orchestration and observability remain centralised, while execution is isolated across separate environments.</li></ul><h3>Implementation Challenges: Bridging the Divide</h3><p>The resulting architecture used a single <strong>Amazon EKS</strong> control plane, with execution capacity extending into separate environments. Managed compute was launched inside the VPCs where the relevant data resided, while <strong>Karpenter</strong> provisioned capacity dynamically according to pod demand.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/901/1*jlQ0usGj1iXfUmFBK0e8mQ.png" /></figure><p>This yielded us the best of both worlds: <strong>centralised management</strong> and <strong>isolated execution</strong>. Implementing this approach and bridging these boundaries revealed three major infrastructure hurdles that only show up once packets start flowing.</p><h4>1. Cross Account Identity (OIDC &amp; IRSA)</h4><p>Our architecture relies on IAM Roles for Service Accounts (IRSA). In a single-account EKS cluster, Kubernetes service accounts are bound to IAM roles via an OIDC identity provider. However, moving compute across account boundaries breaks the default trust relationship.</p><p>As our workloads execute in specific accounts while the EKS control plane resides in a central management account, the OIDC-issued JWTs were treated as untrusted by the destination account’s IAM. Access was silently denied.</p><ul><li><strong>The Implementation</strong>: We mirrored the central cluster’s OIDC provider as a trusted entity within every account and updated local IAM trust policies to explicitly allow the <em>sts:AssumeRoleWithWebIdentity</em> action for the central OIDC issuer.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Otdq9H0PqiSctiLI0Rf8Og.png" /></figure><ul><li><strong>Why this matters</strong>: Without a mirrored identity strategy, your centralised control plane is essentially “identity-blind,” unable to authorise any actions in the remote accounts where the work actually happens.</li></ul><h4>2. Control Plane Reachability &amp; CIDR Registration</h4><p>Once nodes joined the cluster from remote VPCs, we hit a reachability gap. While pods were scheduled successfully, we were unable to stream logs or execute commands into running containers (kubectl exec).</p><p>The EKS API server proxies these requests to kubelets, requiring a valid route to the node’s network. Without explicit knowledge of the remote node CIDR ranges, the control plane had no path to the pods, despite security groups allowing the traffic.</p><ul><li><strong>The Implementation</strong>: We manually registered the remote VPC CIDR ranges with the control plane’s routing table to establish the necessary management pathing.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*HuqPJuQNewnjdGJKaeh6yQ.png" /></figure><ul><li><strong>Why this matters</strong>: Connectivity does not mean reachability. Without explicit routing awareness, your control plane can look healthy while being operationally blind.</li></ul><h4>3. DNS Stability &amp; SNAT Configuration</h4><p>The most complex issue we encountered was intermittent DNS failures. The root cause was <strong>Source Network Address Translation (SNAT)</strong> performed by the AWS VPC CNI.</p><p>By default, the CNI rewrites the source IP of traffic as it leaves a node, translating pod IPs to the node IP. As a result, DNS requests originating from pods lost their pod-level identity. Because security groups are stateful, the return traffic no longer matched the original connection state and was dropped at the node boundary.</p><ul><li><strong>The implementation</strong>: We disabled SNAT for internal CIDR ranges, ensuring that pod IPs were preserved end-to-end.</li><li><strong>Why this matters</strong>: When pod identity is lost at the network boundary, stateful security controls break. This results in “ghost failures” such as sporadic DNS timeouts — issues that are difficult to reproduce, diagnose, and reliably fix in production environments.</li></ul><h3>Turning Pain Into a Playbook</h3><p>By solving these foundational issues, we moved from manual negotiations to a mechanical onboarding process for new geographies:</p><ol><li><strong>Network Sharing</strong>: Subnets are shared using AWS Resource Access Manager (RAM).</li><li><strong>Dynamic Provisioning</strong>: A Karpenter node pool is registered in those subnets.</li><li><strong>Identity</strong> <strong>Federation</strong>: OIDC trust is mirrored and service accounts are annotated.</li><li><strong>Workload Placement</strong>: Node selectors ensure workloads execute within the correct boundary.</li></ol><h3>Conclusion</h3><p>By the time we reached a steady state, the architecture felt almost obvious: a single control plane managing compute inside boundaries where data never leaves its home.</p><p><strong>This transition allowed us to stop fighting the “physics” of compliance.</strong></p><p>If you are scaling across regions and compliance regimes, the lesson is simple: <strong>treat data boundaries as execution boundaries, not transport problems</strong>. Once you move the compute to the data, the system stops fighting itself, and building for global scale becomes significantly simpler.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=36496fe7653a" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>