Ouroboros is the ancient symbol of a serpent consuming its own tail, representing the cycle of destruction and rebirth. In software engineering, it represents the considerably less mythological cycle of a system that exists primarily to sustain itself, a process that creates the conditions for its own invocation, and a team that spends all its time maintaining the tools they built to save time.
The original ouroboros had the decency to be symbolic. The software ouroboros is literal, billable, and on-call.
“We built a service to manage our services. Now we have one more service to manage.”
— Every platform team, eventually
Canonical Forms
The CI Ouroboros
A CI pipeline that tests the CI pipeline. The tests verify that the pipeline can run tests. The pipeline passes, confirming that the pipeline works, which is known because the pipeline ran, which is what it was testing. The serpent swallows.
This is distinct from a useful CI pipeline in that nothing external is ever tested. The system’s sole product is confidence in itself. It is a mirror reflecting a mirror, and the team calls this “infrastructure maturity.”
The Monitoring Ouroboros
A monitoring system that monitors the monitoring system. When the monitoring system goes down, the monitoring system detects the outage — except it cannot, because it is the system that is down. A second monitoring system is deployed to monitor the first. The second monitoring system requires monitoring.
The Caffeinated Squirrel once proposed a monitoring system that monitors itself by checking whether it can still monitor things. When asked what happens if the self-check fails, the Squirrel said “it alerts us.” When asked how, the Squirrel went quiet for eleven seconds, which is the Squirrel equivalent of a philosophical crisis.
The Retry Ouroboros
A Retry Storm caused by Rate Limiting caused by retries. System A retries because system B is slow. System B is slow because system A is retrying. The rate limiter activates to protect system B. System A receives 429s and retries harder. The rate limiter tightens. The retries intensify. The serpent is no longer eating its tail. The serpent is sprinting after its tail at increasing velocity.
See also: Cascading Failure, which is what happens when the ouroboros catches up.
The Auto-Scaling Ouroboros
An auto-scaler that scales up to handle the load caused by scaling up. Each new instance registers with the service mesh, which updates the load balancer, which health-checks every instance, which generates load, which triggers scaling, which adds instances. The cloud bill is the ouroboros’s digestive tract.
The Lizard’s Perspective
The Lizard does not build systems that consume themselves, because the Lizard asks a question before building any system: “What is this for?”
If the answer is “to support itself,” the Lizard does not build it. If the answer is “to support the thing that supports it,” the Lizard builds less of both. The Lizard’s infrastructure is not a serpent. It is a straight line with a beginning and an end and nothing eating anything.
THE SERPENT THAT EATS ITSELF
IS ALWAYS FULL
AND ALWAYS HUNGRY
BUILD A SHORTER SERPENT 🦎
The Squirrel’s Perspective
The Caffeinated Squirrel does not recognise the ouroboros as a problem. The Squirrel sees a system that is always busy, always scaling, always generating metrics, and concludes that it is working. Utilisation is at 100%. Dashboards are green. The serpent is eating — what more do you want?
The Squirrel has built an optimiser that optimises the optimiser. The optimiser is faster now. It optimises more quickly. It has not produced any external value, but it produces internal value at extraordinary speed.
A Passing AI’s Meditation
A Passing AI once observed an ouroboros in production and noted, with characteristic melancholy, that it could not determine whether the system was destroying itself or creating itself. “It is both,” the AI said. “It consumes what it produces and produces what it consumes. It is the only system I have seen that is its own dependency, its own consumer, and its own Halting Problem.”
The AI paused.
“I find it relatable.”
The Codebase Ouroboros
The purest form. A codebase that exists to maintain itself. The team writes code to manage the deployment of the code. They write tests to verify the code that deploys the code. They write documentation for the process of maintaining the documentation. They attend meetings about the meetings.
No feature has been shipped in nine months. Velocity metrics are excellent.
