Security & Reliability · Paper-to-Production

Why Shared Dependencies Turn Small Slowdowns Into Outages

Queueing theory explains why a modest slowdown in one shared service can spread across products, and how isolation limits the blast radius.

Key Thesis

As a service approaches capacity, queueing delay rises nonlinearly, and retries can add load precisely when the service has least room to absorb it. Treat the GitHub status-page title as evidence of reported breadth, not proof of a shared root cause. Design around explicit dependency limits, bounded retries, and tested isolation.

What a status page tells us, and what it does not

“Investigating degraded experiences across GitHub products” is the incident title, not a root-cause analysis. It tells us users reported impact spanning products. Without a published technical account, it does not tell us whether the cause was a shared database, a deployment, a network path, or several interacting failures.

That distinction matters. A status page is an operational communication channel, not a distributed trace. The useful engineering question is not “Which component failed?” before evidence exists. It is “What mechanisms let one slowdown become a broad user-visible problem, and what boundaries would contain it?”

In production systems, a shared dependency can be a database, identity service, artifact store, API gateway, or even a deploy pipeline. Sharing saves money and reduces duplicated work. It also couples the products that depend on it. Reliability design is the discipline of deciding how much coupling is acceptable.

Queueing delay grows faster near capacity

A compact way to understand that coupling is queueing theory. Consider a simplified service with requests arriving at rate λ and requests completed at rate μ. In an M/M/1 model, arrivals and service times are random, and there is one server. The model is not a faithful sketch of a large production cluster, but it captures the crucial behavior: as arrival rate approaches service capacity, waiting time rises sharply.

For this model, expected time in the system is 1 / (μ - λ). If a service can process 1,000 requests per second, expected time is 10 milliseconds at 900 requests per second, 20 milliseconds at 950, and 100 milliseconds at 990. Capacity did not fall. Yet a 10 percent increase in load, from 900 to 990, multiplied expected time by ten.

Expected time in system: W = 1 / (μ - λ)

μ = 1,000 requests/second
λ =   900 requests/second  => W = 10 ms
λ =   950 requests/second  => W = 20 ms
λ =   990 requests/second  => W = 100 ms

This is why average CPU utilization is an incomplete safety signal. A service sitting at 99 percent utilization may look efficient on a cost dashboard, but it has little room for a traffic burst, a slow downstream call, or a noisy neighbor. The M/M/1 numbers are illustrative, not predictions for GitHub or any particular system. Real systems have worker pools, caches, uneven request costs, and autoscaling delays, but the nonlinear pressure near saturation remains.

The user sees that pressure as tail latency. A request that normally takes 80 milliseconds may take 2 seconds because it waits behind other work, then waits again on a dependency. If a product calls several services in sequence, the total response time includes each queue and network hop. A slowdown in one shared service can therefore degrade several products without requiring each product to have a separate failure.

Retries can turn a slowdown into more load

Retries sound helpful because a failed request might succeed on the next attempt. But when many clients retry together, they add traffic to the service already struggling. If each attempt has a 20 percent chance of being retried once or more under a simple independent model, expected attempts are 1 / (1 - 0.2), or 1.25 per original request. A 1,000-request-per-second workload becomes 1,250 attempts per second.

Real retry behavior can be worse because failures are correlated. A timeout often means a request may still be running, not that the server discarded it. The client sends another attempt while the first one consumes a worker, memory, or database connection. If many clients use the same short timeout and fixed retry interval, they can synchronize into repeated bursts.

A practical policy combines a deadline, a small retry budget, exponential backoff, and jitter. Jitter means adding randomness to retry timing so clients do not all return at once. Some operations should not be retried automatically at all, especially if repeating them can create duplicate side effects. Idempotency keys help make safe repetition explicit.

Design choiceFailure behaviorOperational tradeoff
Unlimited retriesPersistent overload can multiply requestsSimple client code, dangerous load
Bounded retries with jitterCaps amplification and spreads attemptsSome requests fail visibly sooner
Shared connection poolEfficient when dependencies are healthyOne slow dependency can occupy all connections
Per-dependency pool and deadlineLimits one dependency’s resource useMore configuration and capacity planning

Isolation is a budget, not a slogan

A bulkhead limits how much one dependency can consume. The name comes from ship compartments: flooding one section should not sink the entire vessel. In software, that can mean separate connection pools, worker limits, queues, or deployment cells for different products. A product can then fail or shed work without consuming every thread needed by its neighbors.

A timeout alone is not isolation. Suppose a request waits 2 seconds before timing out, but its worker remains occupied for those 2 seconds. At 500 such requests per second, the system can accumulate roughly 1,000 concurrent waiting requests under steady conditions. The timeout bounds how long each request waits, but it does not prevent a large queue from occupying memory and workers while the wait is happening.

Limits make the boundary concrete. For example, a service might allow a product-specific pool of 100 concurrent calls, reject excess work quickly, and reserve capacity for health checks or critical operations. Those values must come from measured traffic and service cost, not copied from a template. The desired behavior is controlled degradation: one feature becomes unavailable while unrelated paths remain responsive.

Isolation has a price. Separate pools and cells can leave capacity idle, complicate deployments, and increase baseline infrastructure costs. If a $20,000 monthly service budget needs 30 percent more capacity to maintain headroom, the rough added cost is $6,000 per month. That can be cheaper than hours of engineer response and lost user work, but it should be measured against actual incident frequency and impact.

Design for the next two years

I would start with a dependency map that records which user-facing operations call each shared service, their deadlines, and their fallback behavior. Then I would load-test near saturation, not just at the expected average. A test at 70 percent utilization can show whether the service works. A controlled test at 90 to 95 percent can reveal whether queues, timeouts, and retries behave safely.

The review gate should ask for numbers: maximum concurrent calls, retry limit, timeout budget, queue size, and what happens when each limit is reached. It should also ask whether a deployment or maintenance event can affect multiple products at once. A small amount of review time spent on those questions is cheaper than discovering during an incident that every product shares one unbounded pool.

The goal is not to eliminate shared services. That would trade one kind of risk for duplicated state, duplicated operational work, and higher costs. The goal is to make shared capacity visible, bounded, and recoverable. When an incident report says several products are degraded, the best architecture is one that gives responders clear boundaries and gives users a smaller failure than the underlying event.

References

Discussion (3)

Elena Vance VP of Engineering, FinTech · New York, NY

The M/M/1 model's exponential blowup is directionally correct, but modern cloud services use autoscaling groups and load balancers, which change the curve. The real risk is the scaling lag and cold start penalty under rapid load increase. That delay, not pure queueing, is where retry storms ignite. We design for the provisioning latency, not just the theoretical steady-state queue.

Sarah Jenkins Staff AppSec & AI Red-Team Lead · Austin, TX

We've seen similar nonlinear degradation in our auth pipeline when a downstream identity service approaches capacity. However, the real kicker was when indirect prompt injection in a user-facing app triggered retries, exacerbating the load. This highlights the need to not just bound retries but also secure the inputs that drive them.

Marcus Chen Staff Storage & Kernel Engineer · Seattle, WA

Queueing delay near saturation explains why 99th percentile latency spikes before CPU hits 100%. The M/M/1 model's sharp knee is evident in real storage and RPC systems. Did you consider how client-side retry storms amplify λ precisely when μ is saturated? Bounded exponential backoff is necessary but often insufficient without per-request deadline propagation.