Opens in a new tab
SRE fundamentals · Lesson 10 of 12

When storage recovers but the reports are still waiting

In brief

A five-minute slowdown can leave ten more minutes of work in the queue. Follow the exports to see how retries, limits and recovery affect the wait.

4 min read

IntermediateLessonAbout reading levels
Is this the right starting point?
Before you read
Basic service, queue and retry concepts plus simple rate arithmetic; the supplied model assumes steady rates and comparable jobs.
What you will take away
Calculate backlog growth and drain time, then distinguish deadlines, cancellation, safe retries and load limits during a dependency slowdown.
Sources
Cream and ochre boats form a curved line across turquoise water beside a narrow stone-walled lock, with a blue boat between its open gates.
On this page6 sections

Storage becomes slow, reports take longer, and people waiting for them try again. More work joins the queue just as less work is leaving it. When storage recovers, the waiting reports do not disappear with the warning light.

Our hypothetical Dispatch service accepts 20 exports a second. Its workers can normally finish 25 a second, but only 10 during a storage slowdown. For the first calculation, hold those rates constant and leave retries out. That is enough to explain why five minutes of trouble can be followed by ten more minutes of catching up.

Count the reports left behind each second

Under normal conditions, the workers can finish the 20 incoming exports and have capacity for five more each second. During the slowdown, 20 still arrive but only 10 finish. The other 10 remain waiting. In a minute that adds 600 exports; in five minutes it adds 3,000.

After storage recovers, new arrivals still need 20 of the workers’ 25 completions each second. Only five are left for the backlog. Clearing 3,000 at five a second takes 600 seconds, or ten minutes. The storage can be healthy throughout that period while customers continue waiting for earlier reports.

Now let retries back into the picture. If each one creates a separate export, a customer trying to hurry a report has added another job to the crowded queue. Repeating an operation without adding another effect is called idempotence. Retaining the original operation’s identity can help recognize a retry, but the service must actually use that identity to prevent duplicate work. It also needs to know whether a report will still be useful after its deadline.

The caller leaves. The worker may keep writing.

A timeout tells us the caller stopped waiting. It does not establish that the worker stopped writing the report. Submit a fresh export and both jobs may continue using the storage that was already struggling.

Follow the original report and the controls begin to answer different questions. Its deadline says when the result becomes too late. A cancellation request can stop wasted work only if the components doing it understand and act on that request. The operation’s retained identity lets another attempt find the existing job. A concurrency limit caps how many attempts use storage at once.

Draw the path on paper: accepted, waiting, writing, then still writing after the caller gives up. Mark who holds resources at each point and what another submission would create. Shortening the caller’s wait changes only one part of that picture; it does not automatically cancel the write, find the earlier job or limit simultaneous calls.

Decide which work can still arrive usefully

A bounded queue has a limit on how much waiting work it accepts. It can refuse or defer new exports before memory fills or every accepted report becomes too late to use. Deadlines help workers recognize work past its useful time, while concurrency limits keep simultaneous calls within what storage can handle well.

Those choices are visible to customers. A prompt refusal may be more useful than accepting a report that cannot arrive on time, but the response must explain whether another attempt is safe. Prioritizing urgent reports helps their callers by making others wait. The product’s promise needs to shape that choice.

Queue length alone can hide the amount of work ahead. Ten tiny reports and ten huge reports have the same count but very different demands. Compare the age of waiting work and its expected processing effort with the delivery promise. Put the limit where you can observe the particular failure it is meant to prevent.

More workers or fewer arrivals?

Consider two responses to the slowdown: add workers, or temporarily accept fewer exports while preserving safe retries. Extra workers may only put more simultaneous demand on saturated storage. Fewer arrivals give existing work room to finish, but newly arriving customers feel the restriction immediately.

Before choosing, look at storage throughput, concurrent calls, completion rate, the oldest waiting job and representative job sizes. For a second practice calculation, accept five exports a second while degraded completion remains 10. Five backlog jobs can now leave each second. The same 3,000-job backlog takes ten minutes to drain, even though storage has not returned to its normal rate.

Check the reports that have waited longest

After a change, look at new exports and the oldest ones still waiting. Keep arrivals, completions, backlog growth and the limit changed together. A quick new submission cannot tell you whether the customers caught in the earlier buildup received their reports.

The arithmetic here assumes steady rates and comparable jobs. Bursts, different sizes, priorities and retries call for measured distributions and controlled testing. These simple counts help explain where the work goes before you choose a more detailed model.

Return to the oldest report. Has it left the queue, and is work arriving more slowly than the workers can finish it? Those answers connect recovery to the people who were waiting. A recovered storage indicator is welcome; the earlier exports still need their turn.

Load limits and growing failures

Handling overload and addressing cascading failures explain bounded load and how failures can amplify demand. The rates and queue model used here are illustrative.

Sources & context

Sources linked in this article. Read alongside the author’s analysis; a citation does not independently verify a publisher’s claims.

Report an error or outdated detail

Keep reading

Where to go next