Hacker News

Top stories

Live mirror
30 storiesupdated just nowView source snapshot
  1. Astra for Law(openai.com ↗)
    380comments
  2. Bonsai 2 27B: Near-Lossless Compression in a 9x Smaller Footprint(prismml.com ↗)
    82comments
  3. Goose:experimental lang 1.16x faster than C++ and 1.12x than safe Rust, mem safe(github.com/aardappel ↗)
    36comments
  4. Bend – A language that blocks AI mistakes via proof, on CPU and GPU(bend-lang.com ↗)
    167comments
  5. Hister: A private search engine for the pages you visit and the files you keep(github.com/asciimoo ↗)
    139comments
  6. Wax motor(wikipedia.org ↗)
    50comments
  7. Fujitsu launches made-in-Japan next-generation CPU FUJITSU-MONAKA(global.fujitsu ↗)
    198comments
  8. Alibaba releases Qwen 3.8 Omni Flash(qwen.ai ↗)
    7comments
  9. Telstra outage: The night a network decided the year was 2006(netnod.se ↗)
    3comments
  10. Flet 1.0 – Build cross-platform apps in Python(flet.dev ↗)
    36comments
  11. Diplodocus, Long Thought Exclusively American, Turns Up in Spain(sci.news ↗)
    22comments
  12. Better Icon and Label Alignment(ishadeed.com ↗)
    1comments
  13. I Put Nam A2-Lite Inside an iRig HD X(playtaurus.com ↗)
    2comments
  14. CrowdSec Source Code Leak(crowdsec.net ↗)
    41comments
  15. More than 100k people in Japan are now aged 100 or older(bbc.com ↗)
    129comments
  16. The most important product decision is what you don't build(liamnugent.me ↗)
    19comments
  17. How Uber Protects Against Retry Storms(uber.com ↗)
    25comments
  18. Infinite-Parameter LLMs: Generating and Adapting Weights from Live Data(arxiv.org ↗)
    35comments
  19. Why I didn’t sign the Fields medallists’ letter(gowers.wordpress.com ↗)
    316comments
  20. Rate limits on GitLab.com are changing(about.gitlab.com ↗)
    107comments
  21. How do we prevent mathemathics from devolving into the Medieval Era of secrecy?(mathoverflow.net ↗)
    60comments
  22. CCC invites all model citizens to 40C3(ccc.de ↗)
    181comments
  23. The American Religion of Self-Storage Facilities(newyorker.com ↗)
    347comments
  24. TSMC revealing details about next gen A14 node(mapyourshow.com ↗)
    36comments
  25. Landing the Space Shuttle – A Flying Machine and the Thrill of a Lifetime(eaa.org ↗)
    5comments
  26. Zettascale (YC S24) Is Hiring ASIC/FPGA Engineers to Build Chips for ASI(zscc.ai ↗)
    discuss
  27. Show HN: Snapdrop: Instantly share files between devices. No setup, no signup(snapdrop.me ↗)
    20comments
  28. Computer Reset, Dallas(dfarq.homeip.net ↗)
    4comments
  29. Launch HN: Skillsync (YC W26) – AI chat sessions made portable across agents
    51comments
  30. Show HN: Share your AI Setup, Learn from others(mysetup.ai ↗)
    104comments

How Uber Protects Against Retry Storms

50 pointsby 5h agouber.com
25 comments
4h agoHN ↗

I'd be interested to hear other strategies in this space. I've done the naive thing of allowing retries everywhere, and gotten into retry storms. When I was next presented with the problem, I tried the other naive thing of only allowing retries from the very top level service, which led me to redoing absolutely tons of work for each failure. What's a nice middle path that doesn't add too much complexity?

3h agoHN ↗

This is trading a good developer experience for a bad user experience. There are situations where it makes sense to force manual retry, but there's no reason to apply one universal rule to all possible situations. Lack of considering nuance for your situation is just intellectual laziness.

2h agoHN ↗

My point was that just throwing exponential backoffs at the retry problem is not a magic solution

I don't follow how being cautious about avoiding multiplicative layers of backoffs is trading a good developer experience for a bad user experience. The described situation is an awful user experience. Simply adding a retry and calling it a day sounds like the easy developer experience at the expense of the user experience

2h agoHN ↗

The described situation is an awful user experience

Sure, the worst case scenario is. 99.9999% of the time, a transient error will actually just work on the first or second auto-retry and save your users the effort of paying attention and manually retrying things. This is especially prudent for background tasks where the failure may not be noticed right away; coming back to something fire-and-forget 30m later to see it never tried to finish is not a good user experience.

My point was that just throwing exponential backoffs at the retry problem is not a magic solution

Nobody said it was. In fact, I suggested the exact opposite - a proper solution takes dev effort. Adhering to an iron rule of "just make them manually retry" is throwing your hands up and not even trying to solve the problem because laziness is convenient.

2h agoHN ↗

Nobody said it was

I responded to a post that merely linked to the Wikipedia article for exponential backoff (in response to "I'd be interested to hear other strategies in [protecting against retry storms]")

The submitted article is precisely about the degenerate case and the difficult work of dealing with it

This approach works for transient or low-rate failures. However, during moderate or severe degradation, it becomes counterproductive. Aggressively retrying against an already struggling service increases load, accelerates failure, and amplifies retry traffic across upstream dependencies. What begins as a localized outage can quickly escalate into a stack-wide incident—ultimately degrading, or in the worst case, completely breaking, the end user experience.

15m agoHN ↗

Yes, and then responds to that degenerate case by suggesting that you never automatically retry. It's like saying "you should never drive a car/take a flight/ride public transportation because it's gone wrong so many times". Things go wrong. You should absolutely consider the impact and what will happen when they go wrong, but the end takeaway to just never engage with them because they can go wrong is, frankly speaking, lazy and bad advice.

3h agoHN ↗

Yes, exponential back off and jitter are the first things to work on, and good if you don’t have a better signal (like loss of network).

Also, a simple signal status server or queue system helps to keep global state such that everyone doesn’t retry all at once.

If you have a central error rate server you can skip your retry based on the error rate (100% error rate, don’t retry, etc).

4h agoHN ↗

So many variables, but the simple thing is to set things up like normal rate limiting (which you would want to do anyways). The one generating the errors passes back a retry time. You can add jitter here, tell low priority requests to wait longer, etc.

BTW: do keep track of priority. It’s like having a database that gets flooded with connections and won’t allow new ones in—but will for admin users (btw, it did not used to be that way in the early days of MySQL).

3h agoHN ↗

There's a good amount of literature about this (check the other comments), but you can vastly simplify this into two things you need to do:

1. Your service that retries should have some retry budget. This is a good place to be "smart", because you can reason entirely locally instead of turning it into a distributed systems problem. The best library I've seen for this was doing Exponential Moving Average of requests per second sent down that pipe (not counting retries) and only allowing 20% more requests per second as retries, total. Each individual request could be retried 3 times. This was critical as it bounds the additional load from retries.

2. Whenever a service retries but has to give up, the error it sends to its callers should never be retried. There has to be some agreement that that HTTP code will never be retried. This prevents the multiplicative factor of retry on top of retry, which is why those storms can generate so much load.

Everything else is nice-to-have, but those two alone should bound the total requests you get in a retry storm.

2h agoHN ↗

2. Whenever a service retries but has to give up, the error it sends to its callers should never be retried. There has to be some agreement that that HTTP code will never be retried. This prevents the multiplicative factor of retry on top of retry, which is why those storms can generate so much load.

Ooh, I like the idea of propagating "no retries" hints in the responses back upstream. Have you seen it implemented in the wild, or in public discussions about the practice?

2h agoHN ↗

I've only seen it in bigcorp cross-service typedefs, or in startup's code that re-implements the checks in every service.

2h agoHN ↗

At $previousJob we implemented circuit breakers: centralize all requests to the foreign service (every call to service theta went through the service theta client which had some shared state so everything so we could keep track of requests) and then monitor, when error % got above a certain limit start to dump requests to a text file for sending in the future instead of now. And the centralized caller will send one message every time gap (we started at 30s) and as long as that errors out we keep writing.

We did that because otherwise we would get 2x30 second timeouts to a dead service on every user interaction and it made for a terrible user experience. Keeping track and handling it smartly made the average user experience a lot better.

1h agoHN ↗

One good option that is not (yet?) mentioned here is a deadline for retries. You can cap the request duration by, say, 500ms and pass the remaining time budget to downstream services.

This can be done via an HTTP header and enforced by the middleware.

1h agoHN ↗

Depending on the context, circuit breakers

3h agoHN ↗

I'm suspicious of load shedding not mentioned in the article. Combine that with exp backoff in the caller and you got yourself a pretty robust starting point

2h agoHN ↗

429 (and sometimes 503) errors returned by servers might well be a symptom of intentional load shedding. Perhaps it's just not explicitly called out as a server behavior that induces client retries.

1h agoHN ↗

Not quite. A token. bucket alone would not prevent a retry storm if you have a chain of services A -> B -> C -> D with a failure in D, you'd end up still having A, B & C all performing retries as they cascade through the chain, albeit (yes) at your configured rate-limits (using token bucket), but you'd still end up with an amplification effect.

1h agoHN ↗

So, effectively if A → B → C → D and D is failing, C may retry D, but B and A are discouraged from retrying the whole chain.

This is quite slever. I also really like the concept of an "Error Budget", inspired by SRE and SLO(s) no doubt :)

20m agoHN ↗

I had a former colleague who would put a “retry 10x with sleeps” in each of A, B, C, D.

None of these were even expected to fail. But the code was buggy as well, so after D being retried 10000 times, it’d eventually give up. Managed to convert a sub-second operation into a half hour affair.

1h agoHN ↗

Meanwhile Google keeps giving me “please wait, do not reload page” walls, so I ctrl-r as rapidly as possible. Or is that the human test and response?

1h agoHN ↗

This feels like trying to reinvent Fibre Channel's flow control mechanism.