Sitemap
Irene Ufia

Irene Ufia

Blockchain Software Engineer | DevSecOps | Infrastructure Security Engineer

The Missing Decay Function in Cloud Infrastructure

5 min readJul 15, 2026

--

Most of the routing decisions we make in cloud infrastructure assume something has to know the whole picture. A Transit Gateway needs to know both networks it’s translating between. A load balancer’s control plane needs visibility into every backend’s health. Even “distributed” systems usually have some component - a service mesh control plane, a DNS layer, or a routing table that’s implicitly load-bearing for the whole system’s knowledge of itself. Istio’s control plane, istiod, is a good example: the data plane’s Envoy proxies talk peer-to-peer, but the routing rules, service identity, and health state they all act on come from one place. We build hub-and-spoke because it’s legible, auditable, and easy to reason about. It’s also not the only way routing gets solved in nature, and the alternative is worth taking seriously as an engineering philosophy, not just a curiosity.

No ant has ever seen the whole colony

An individual ant knows almost nothing. It doesn’t have a map. It doesn’t know where the nest is relative to the food source, or which of the six paths is the shortest. What it has is a pheromone trail left by other ants and a simple rule: follow stronger trails more often, but not always.

Shorter paths get walked more often per unit time, so pheromone accumulates faster on them, more ants follow them, so the trail gets stronger still. Meanwhile, the pheromone evaporates over time, so a path that nothing walks anymore fades out on its own. Nobody prunes it. Nobody has to notice it’s stale. The colony converges on close-to-optimal routes with zero global knowledge, zero central coordinator, and no explicit cleanup step.

This is, not coincidentally, the design principle behind Ant Colony Optimization, a routing approach from the 1990s that predates most of what we now call modern SDN thinking. AntNet, one of the more studied implementations, used exactly this mechanism for adaptive routing in packet networks: probe packets lay down synthetic pheromone based on observed path quality, and routing tables update based on accumulated trail strength rather than a single authoritative source of truth. It’s decentralized, it self-heals when a path degrades, and no single node ever needs a complete picture of the network to make a good local decision.

Evaporation isn’t an engineering afterthought borrowed from chemistry, it’s the actual reason the biological system works at all. A food source gets depleted. A shorter path opens up after an obstacle clears. Without decay, the colony would stay locked onto whatever path got reinforced first, good or not, because nothing would ever let a stronger option compete on equal footing once an older trail had a head start. Entomologists studying real foraging trails have found some ants even lay two different pheromones for this reason, a long-lived one that marks territory as explored, and a fast-decaying one specifically for active recruitment, so the colony can abandon a used-up source quickly without losing its memory of where it’s already been. The decay rate isn’t a bug being tolerated, it’s tuned by evolution to match how fast the environment actually changes.

Press enter or click to view image in full size

The part that’s actually useful: decay, not just distribution

The instinct when people hear “ant colony routing” is to focus on the decentralization, no central controller, no single point of failure. That’s true, but it’s not the most interesting part for infra work. The more useful idea is the decay mechanism. Pheromone evaporation means the system doesn’t need anyone to actively decide a path is stale. Staleness is self-correcting by default, because reinforcement requires ongoing use, and the absence of use is itself the signal.

Get Irene Ufia’s stories in your inbox

Join Medium for free to get updates from this writer.

Compare that to how most infrastructure actually degrades. Unused routes, unused IAM permissions, unused peering connections, unused feature flags, none of these decay on their own. They sit there, fully privileged, fully routable, until someone audits the system and manually notices nothing’s using them anymore. The failure mode isn’t usually “the system routed traffic somewhere it shouldn’t have.” It’s “the system kept a path alive for months after anything needed it, because nothing in the design made unused things cost anything.” A colony doesn’t have that problem, not because ants are smarter, but because the architecture makes neglect and cleanup the same mechanism.

Mechanically, decay in these systems takes one of two shapes, and the difference matters for how you’d actually implement it. Fixed-TTL decay works like a DNS record: a value is valid for a set window and then it’s simply gone unless something explicitly refreshes it, binary and predictable. Continuous decay works more like the pheromone trail itself: the value degrades a little on every cycle whether it’s used or not, and only sustained, repeated use keeps it above the threshold that matters. Access-key rotation and DNS TTLs are the fixed-window version, cheap to reason about but blunt. Something like a trust or reputation score that erodes gradually with inactivity, the kind of model used in some anomaly-detection and access-scoring systems, is the continuous version, more nuanced but harder to audit at a glance. Most infra defaults to neither, which is really a third option, no decay function at all, and that’s the gap worth noticing before reaching for either of the other two.

Where centralization still wins

This isn’t an argument for tearing out routing tables and control planes. Centralized systems buy you things swarm-style systems structurally can’t: a single source of truth for auditing, predictable behavior under compliance review, and the ability to reason about the entire system’s state at a glance. In regulated fintech infra specifically, “we can’t fully explain why a packet went where it went” is not a sentence you want to say to a regulator. Ant colony optimization has real production use in domains where centralized infrastructure genuinely isn’t available or reliable, ad hoc wireless networks, sensor networks, mesh networks operating with unreliable connectivity. For enterprise cloud networking with full visibility and a small number of nodes, a well-designed hub-and-spoke model is still usually the right engineering call.

The design posture worth stealing

Where this actually changes how I think about systems isn’t “decentralize everything.” It’s a narrower, more useful question: does this component pay a cost for existing when it’s not being used, or does it sit there indefinitely until a human notices? Health checks with automatic deregistration are pheromone decay. TTL-based caching is pheromone decay. IAM policies with automatic expiry are pheromone decay. The pattern shows up anywhere a system is designed so that neglect is self-correcting instead of requiring an audit to catch.

You don’t need to decentralize your routing to borrow this. You just need to design for staleness upfront, so it decays on its own, instead of hoping someone catches it later.

Irene Ufia is a software engineer specializing in DevOps and Infrastructure Security.

Follow me for insights and technical tips: LinkedIn | Github

--

--

Irene Ufia
Irene Ufia

Written by Irene Ufia

Blockchain Software Engineer | DevSecOps | Infrastructure Security Engineer