<?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 Riccardo Di Marino on Medium]]></title>
        <description><![CDATA[Stories by Riccardo Di Marino on Medium]]></description>
        <link>https://medium.com/@r.dimarino?source=rss-cf2699be6f6d------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*vtW2g_TXzerO4HGs53xaFQ.jpeg</url>
            <title>Stories by Riccardo Di Marino on Medium</title>
            <link>https://medium.com/@r.dimarino?source=rss-cf2699be6f6d------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sat, 05 Dec 2026 05:54:39 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@r.dimarino/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[Inside an Availability Zone Failure: A Geo-Resilience Experiment]]></title>
            <link>https://medium.com/storm-reply/inside-an-availability-zone-failure-a-geo-resilience-experiment-422b9b2fcf9f?source=rss-cf2699be6f6d------2</link>
            <guid isPermaLink="false">https://medium.com/p/422b9b2fcf9f</guid>
            <category><![CDATA[kubernetes]]></category>
            <category><![CDATA[cloud-computing]]></category>
            <category><![CDATA[cloud-resiliency]]></category>
            <category><![CDATA[aws-pill-by-storm-reply]]></category>
            <category><![CDATA[aws]]></category>
            <dc:creator><![CDATA[Riccardo Di Marino]]></dc:creator>
            <pubDate>Tue, 10 Feb 2026 13:39:58 GMT</pubDate>
            <atom:updated>2026-02-10T13:39:58.119Z</atom:updated>
            <content:encoded><![CDATA[<h3>High Availability Is a Promise. Geo-Resilience Is a Proof</h3><h3><strong>Introduction</strong></h3><p>Geo-resilience in cloud infrastructure refers to the ability of a system to keep delivering a service even when an entire geographic area of the underlying infrastructure becomes unavailable. It is not about avoiding failures altogether, but about designing systems that can tolerate them without disrupting users.</p><p>In cloud environments, there is often an implicit expectation that things will “just work”: data remains accessible, performance stays within acceptable bounds, capacity can be provisioned when needed, and failures are handled somewhere beneath the surface. Availability, durability, and scalability are commonly perceived as built-in features of the platform. Yet this perception hides an important reality: these properties are not automatic. They emerge only when the system is explicitly designed to support them. And this leads to an uncomfortable question:</p><blockquote>When we design cloud architectures, do we actually test the geo-resilience of our systems in real conditions, or do we just assume it will work when things go wrong?</blockquote><p>It is often assumed that distributing cloud resources across multiple Availability Zones (AZ) is sufficient, but in reality, resilience is not a property automatically inherited from cloud infrastructure and architecture design: it is something that must be demonstrated, measured, and understood in its operational details.</p><p>This article describes a geo-resilience test executed on an Amazon EKS-managed Kubernetes cluster deployed across three Availability Zones, simulating the complete failure of one of them.</p><p>The goal is not to confirm that the EKS cluster technically remains operational, but it is to measure the real impact of losing an Availability Zone on the quality and continuity of the service, observing what happens at the networking, infrastructure, and also, application levels.</p><h3><strong>Knowledge base</strong></h3><p>Before diving into the experiment, it is useful to clarify some fundamental concepts that form the basis of the test.</p><h4>Amazon EKS architecture</h4><p><a href="https://aws.amazon.com/eks/">Amazon Elastic Kubernetes Service</a>(EKS) is a managed Kubernetes service where AWS operates and maintains the Kubernetes control plane. AWS ensures its availability, scalability, and security, while customer teams retain full responsibility for worker nodes and the applications running on the cluster.</p><p>Before injecting any failure, it is important to understand how the Kubernetes cluster is designed and which architectural choices directly influence its behaviour during an Availability Zone outage.</p><p>The cluster under test is intentionally simple, yet representative of many real-world production environments running on AWS EKS.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*4aUvVcAyEIrlr1TV6Qa-DQ.png" /></figure><h4>Worker nodes across multiple Availability Zones</h4><p>Worker nodes are distributed across three Availability Zones. This is the foundational requirement for high-availability: by spreading nodes across zones, the cluster gains the ability, at least in theory, to survive the loss of one AZ while continuing to operate on the remaining ones. But, is it really like that?</p><h4>Active Node autoscaling</h4><p>Worker node autoscaling is enabled and plays a central role in the experiment. The cluster relies on <a href="https://karpenter.sh/">Karpenter</a> (an open-source project designed to enhance node lifecycle management) to react to scheduling pressure by provisioning new worker nodes when cluster needs new resources. Autoscaling, indeed, notices that some pods become “Pending” and asks to AWS to provide new instances(aka worker nodes) to handle the request, and, when instances become ready, it lets K8s to schedule the pods onto them.</p><h4>Applications deployed using Kubernetes Deployments</h4><p>Applications are deployed using standard Kubernetes “Deployment” resources. This choice is deliberate: deployments introduce reconciliation logic that continuously tries to maintain the desired number of replicas, making them ideal for observing how Kubernetes reacts when pods are evicted or nodes become unavailable.</p><h4>Controlling pod placement with Pod Topology Spread Constraints</h4><p>Finally, pod placement across Availability Zones is controlled using <em>Pod Topology Spread Constraints</em> feature. This feature allows us to explicitly define how pods will be distributed across failure domains such as AZs, and what Kubernetes should do when that distribution can no longer be satisfied. This configuration turns out to be one of the most influential factors in determining the real behaviour of the system during a geo-resilience event.</p><h4><strong>What we mean by geo-resilience</strong></h4><p>A geo-resilience solution is designed around real architectures, real dependencies, and a clear definition of what “resilience” means for the system being tested. How geo-resilience is interpreted directly influences how the experiment is built and which failure modes are considered relevant.</p><p>In our scenario, geo-resilience simulation pass through a concrete and practical experiment composed of two simultaneous actions: the first simulates a network failure by completely isolating a subnet of a target Availability Zone, effectively cutting it off from the rest of the system, while the second action simulates a compute shortage by preventing the cluster autoscaler from provisioning additional nodes in the affected AZ, and this naturally leads to the real question behind the test:</p><blockquote>Are we able to manage and configure the infrastructure so that when an entire Availability Zone disappears, it reschedules application pods into the remaining healthy Availability Zones, eventually creating additional nodes if needed to sustain the service?</blockquote><p>Obviously, all of this, is expected to happen <strong>without manual intervention</strong>.</p><h4><strong>Scenario</strong></h4><p>An AZ failure is rarely a single, clean-cut event. In practice, it is the result of multiple, often independent, disruption layers. In our case, we model the failure of an entire Availability Zone as the combination of two orthogonal dimensions:</p><ol><li><strong>network disruption</strong>, where resources still exist but become unreachable;</li><li><strong>compute disruption</strong>, where capacity is no longer available to absorb load or reschedule workloads.</li></ol><p>By combining these two layers, we can approximate a scenario that closely resembles the effective loss of an Availability Zone.</p><blockquote>Now, how can we setup such experiment inside AWS ecosystem?</blockquote><p>This, is what the next paragraph deal with.</p><h4>Using AWS Fault Injection Simulator</h4><p>AWS provide a simulator to inject almost any kind of failure into the working system: <a href="https://aws.amazon.com/it/fis/">AWS Fault Injection Simulator</a> (AWS FIS).</p><p>AWS FIS is a managed chaos engineering service that allows you to inject controlled failures directly into AWS resources. It integrates natively with core AWS services and enables repeatable, auditable experiments without relying on custom scripts or external tooling.</p><p>Failures in AWS FIS are defined through <a href="https://docs.aws.amazon.com/fis/latest/userguide/experiment-templates.html"><strong>experiment templates</strong></a>. <br> An experiment template describes:</p><ul><li><em>one or more actions</em>, executed sequentially or in parallel;</li><li><em>explicit targets</em>, such as subnets, EC2 instances, IAM roles, or entire resource groups;</li><li>the <em>scope</em> and <em>duration</em> of each failure.</li></ul><p>This model makes experiments deterministic, reproducible, and safe to run multiple times, which is a key requirement when testing geo-resilience.</p><p>The goal is not to simulate a simple node crash, but to reproduce a more realistic scenario: an Availability Zone that still exists from AWS’s control-plane perspective, but is no longer usable at runtime.</p><h4>Fault injection actions</h4><p>The AWS FIS experiment is composed of two actions executed in parallel, each targeting a different failure domain.</p><p>The first action introduces a <em>network connectivity disruption</em>. By applying a “DENY” rule to the <a href="https://docs.aws.amazon.com/vpc/latest/userguide/vpc-network-acls.html">Network ACLs (NACLs)</a>,<strong> </strong>stateless, subnet-level traffic filtering mechanisms, we completely isolate the subnet belonging to the target Availability Zone. Nodes remain powered on, but they are effectively cut off from the EKS cluster and other cloud resources.</p><p>The second action targets <em>compute capacity</em>. We simulate an insufficient instance capacity condition that prevents autoscalers from provisioning new EC2 instances in the target Availability Zone.</p><p>Cloud platforms are often described as infinitely scalable. But capacity is not infinite and in catastrophic scenarios, regional incidents, AZ-wide failures, or large-scale events, that assumption can break down.</p><blockquote>What happens to your system when scaling in a specific AZ is no longer an option?</blockquote><p>This exposes the real behaviour of:</p><ul><li>Kubernetes scheduling decisions;</li><li>application resilience;</li></ul><p>By combining network isolation and compute unavailability, we observe the cluster and applications in a degraded-resource scenario, that closely mirrors the failure of an entire Availability Zone.</p><h3>Expected result, “The Fairytale Failover” (a.k.a. how things should work)</h3><p>Once the experiment is triggered and the target Availability Zone is effectively cut off, the expected behaviour is straightforward:</p><ul><li>nodes in the failing AZ become unreachable;</li><li>Kubernetes detects the condition and marks them as “NotReady”;</li><li>pods running on those nodes are evicted;</li><li>workloads are rescheduled onto nodes in the remaining healthy AZs.</li></ul><p>From an infrastructure perspective, the cluster absorbs the failure, workloads move away from the blast radius, and the service keeps running. We rely on <a href="https://kubernetes.io/docs/concepts/scheduling-eviction/topology-spread-constraints/">Pod Topology spread constraint</a> policy in order to let K8s to re-distribute pods among different AZ nodes.</p><p>How? Relying on the <em>“whenUnsatisfiable”</em> attribute.</p><p>With <em>“whenUnsatisfiable: ScheduleAnyway”</em>, Kubernetes scheduler is allowed to violate the topology constraint when necessary. When an AZ fails, evicted pods are rescheduled into the remaining healthy zones, even if this results in multiple replicas running in the same AZ.</p><p>From a service perspective, this is often the desired behaviour: capacity is preserved, and users are less likely to notice the failure. However, there is a subtle but important consequence. When the failed AZ becomes available again, Kubernetes does not automatically rebalance the pods. This happens because Kubernetes does not continuously reconcile pod placement once a pod is running.</p><p>A pod, once scheduled and active on a node, stays there until it is explicitly terminated. As a result, to restore an even distribution across all three Availability Zones, a manual pod restart is required.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*geWhRtcSe1ukLrzjhK_YVw.png" /><figcaption>Pod distribution before failover, during failover, and after recovery when “whenUnsatisfiable: ScheduleAnyway”</figcaption></figure><h3>What actually happened, “Reality Check: When the Fairytale Meets the Network”</h3><p>During the first execution of the experiment, Kubernetes behaves as expected.</p><p>Nodes in the isolated AZ are marked <em>NotReady</em> almost immediately after the starting of the experiment, in line with <a href="https://kubernetes.io/docs/reference/command-line-tools-reference/kube-controller-manager/#:~:text=%2Dnode%2Dmonitor%2Dgrace%2Dperiod%20duration%C2%A0%C2%A0%C2%A0%C2%A0%C2%A0Default%3A%2050s">Node Controller defaults</a>.</p><p>Pods are then evicted after the time defined by the <a href="https://kubernetes.io/docs/reference/config-api/kube-controller-manager-config.v1alpha1/#kubecontrollermanager-config-k8s-io-v1alpha1-KubeControllerManagerConfiguration:~:text=HTTP2_PING_TIMEOUT_SECONDS%20and%20HTTP2_READ_IDLE_TIMEOUT_SECONDS.-,PodEvictionTimeout,-%5BRequired%5D%0Ameta">pod eviction timeout</a>, which by default is 300 seconds. This behaviour aligns with Kubernetes documentation and confirms that the failure detection mechanism works correctly.</p><p>However, after the experiment starts, HTTP 5xx errors begin to appear during seemingly simple operations, such as login or access to internal services. But from the outside, everything still looks almost perfect. End users do not experience outages or failed requests. At most, a slight and intermittent increase in latency can be observed during the failover window.</p><p>Indeed, the applications are designed with redundancy in mind and implement resilient client-side logic, including retries and proper handling of transient failures. This behaviour highlights that even if parts of the system are under stress and pods are logging errors, the application layer preserves service continuity.</p><p>This is a key outcome of the experiment. It anticipates one of the main takeaways of the article: in a geo-resilient system, failures can exist, be real, and still remain invisible to users, depending entirely on how the application is designed.</p><p>But, still, some questions remain. If everything is supposed to be highly available, why are we seeing errors at all? Did we miss something? Or is there a hidden dependency that we did not account for?</p><p>The answer lies in the fact that a Kubernetes cluster rarely operates in complete isolation. Even when the cluster itself is correctly distributed across multiple Availability Zones, it still needs to communicate with external services. And those services must be geo-resilient as well.</p><p>In our scenario, the cluster accesses external AWS-managed services through <a href="https://docs.aws.amazon.com/vpc/latest/privatelink/what-is-privatelink.html">AWS VPC Endpoints</a>, which are themselves advertised as highly available and with FIS networking injection action, only the network traffic is blocked at the subnet level, but the Elastic Network Interfaces (ENIs) associated with VPC Endpoints located in that subnet remains active and the DNS still resolved the IP address of every endpoint in each AZ.</p><p>As a result:</p><ul><li>the VPC Endpoint DNS continues to return IP addresses belonging to the isolated AZ;</li><li>the pod attempts to connect to one of these IPs;</li><li>the connection times out;</li><li>the pod records a 5xx error.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*0ugvpR88N6kaM2IA6NMZgw.png" /><figcaption>VPC Endpoint DNS resolution returning multiple IPs, one of which belongs to an isolated AZ</figcaption></figure><p>At this point, an important limitation about the AWS FIS service emerged, because in a real Availability Zone outage, the regional DNS hostname associated with interface endpoints resolves only to healthy IP addresses. In other words, AWS normally removes unreachable endpoints from DNS once health checks fail.</p><p>This, indeed, is not what happens when the AZ is isolated via subnet-level fault injection, using AWS FIS. From AWS’s perspective, the VPC Endpoint ENIs are still considered healthy, so their IPs continue to be returned by DNS. This means our experiment was not yet fully representative of a real zonal failure.</p><h3>Making the Test Honest: removing the subnet from VPC Endpoints</h3><p>One important detail becomes clear during the experiment: <em>AWS FIS</em> does not automatically update VPC Endpoint DNS records when a failure is injected. Even though the Availability Zone is effectively isolated at the network level, the DNS entries associated with VPC Endpoints continue to include IP addresses from the target AZ. From AWS’s perspective, those endpoints are still healthy.</p><p>For this reason, we introduced an explicit prerequisite to the experiment. Before running the AWS FIS test, we remove the subnet of the target Availability Zone from all relevant VPC Endpoints. This ensures that, during the failure:</p><ul><li>the VPC Endpoint DNS returns only IP addresses from healthy AZs;</li><li>no traffic is routed toward unreachable ENIs;</li><li>pods no longer experience timeouts when accessing external services.</li></ul><p>If subnet-level disruptions are introduced as part of a geo-resilience test, VPC Endpoints must be explicitly taken into account. Otherwise, the experiment risks testing an inconsistent failure model, one where the cluster behaves correctly, but its dependencies do not.</p><p>With this prerequisite in place, the experiment finally behaved as intended. HTTP 5xx errors disappeared, application traffic remained stable, and no unexpected timeouts were observed. Kubernetes reacted exactly as expected, isolating the failing AZ and continuing to serve workloads from the remaining ones.</p><h3><strong>Conclusions / Takeaways</strong></h3><p>This experiment left us with a few lessons that are worth carrying beyond this specific setup.</p><p>The first takeaway is that <em>AWS Fault Injection Simulator does not fully simulate the loss of an entire Availability Zone</em>. While AWS FIS is extremely effective at injecting failures into compute and networking resources, it does not remove automatically the ENI of the VPC Endpoint, which, in our case, continued to expose IP addresses belonging to the failing AZ. To make the geo-resilience test truly representative, a manual intervention was required to remove the target AZ subnet from each VPC Endpoint. This step was essential to align external dependencies with the failure model imposed on the cluster.</p><p>The second lesson is about <em>using the available features that allow us to build a resilient architecture</em> in every scenario. Pod Topology Spread Constraints proved to be a critical mechanism, allowing workloads to be redistributed across healthy Availability Zones while avoiding accidental rescheduling into the same failing zone. Without these constraints, the scheduler could have made placement decisions that were technically valid but architecturally undesirable during a zonal failure. Kubernetes provides the tools, but resilience only emerges when they are used consciously.</p><p>The third takeaway is about error visibility and <em>application design</em>. Depending on how an application is implemented, the same failure scenario can result either in client-facing timeouts or in a barely noticeable degradation of service. Well-designed applications can retry across multiple DNS records and Availability Zones, keeping errors confined to the pod or service layer while preserving end-user continuity.</p><p>Taken together, these points reinforce a broader conclusion: <em>geo-resilience is not owned by a single layer</em>. It emerges from the interaction between infrastructure, networking, and application behaviour. No amount of infrastructure resilience can compensate for poorly designed application logic, and no well-written application can ignore the realities of the underlying platform.</p><blockquote>Resilience is never assumed. It is tested. And it often surprises.</blockquote><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=422b9b2fcf9f" width="1" height="1" alt=""><hr><p><a href="https://medium.com/storm-reply/inside-an-availability-zone-failure-a-geo-resilience-experiment-422b9b2fcf9f">Inside an Availability Zone Failure: A Geo-Resilience Experiment</a> was originally published in <a href="https://medium.com/storm-reply">Storm Reply</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
    </channel>
</rss>