Hacker News

Top stories

Live mirror
30 storiesupdated just nowView source snapshot
  1. Astra for Law(openai.com ↗)
    259comments
  2. Bonsai 2 27B: Near-Lossless Compression in a 9x Smaller Footprint(prismml.com ↗)
    40comments
  3. Bend – A language that blocks AI mistakes via proof, on CPU and GPU(bend-lang.com ↗)
    118comments
  4. Hister: A private search engine for the pages you visit and the files you keep(github.com/asciimoo ↗)
    123comments
  5. How to Write with an LLM(sockpuppet.org ↗)
    25comments
  6. Wax motor(wikipedia.org ↗)
    40comments
  7. Fujitsu launches made-in-Japan next-generation CPU FUJITSU-MONAKA(global.fujitsu ↗)
    184comments
  8. Flet 1.0 – Build cross-platform apps in Python(flet.dev ↗)
    10comments
  9. Sex, AI, and the Apocalypse(iankduncan.com ↗)
    68comments
  10. More than 100k people in Japan are now aged 100 or older(bbc.com ↗)
    14comments
  11. CrowdSec Source Code Leak(crowdsec.net ↗)
    35comments
  12. The most important product decision is what you don't build(liamnugent.me ↗)
    7comments
  13. Diplodocus, Long Thought Exclusively American, Turns Up in Spain(sci.news ↗)
    7comments
  14. Rate limits on GitLab.com are changing(about.gitlab.com ↗)
    103comments
  15. Infinite-Parameter LLMs: Generating and Adapting Weights from Live Data(arxiv.org ↗)
    26comments
  16. How Uber Protects Against Retry Storms(uber.com ↗)
    9comments
  17. How GLM built its own inference infrastructure(z.ai ↗)
    259comments
  18. Why I didn’t sign the Fields medallists’ letter(gowers.wordpress.com ↗)
    253comments
  19. Zettascale (YC S24) Is Hiring ASIC/FPGA Engineers to Build Chips for ASI(zscc.ai ↗)
    discuss
  20. TSMC revealing details about next gen A14 node(mapyourshow.com ↗)
    29comments
  21. How do we prevent mathemathics from devolving into the Medieval Era of secrecy?(mathoverflow.net ↗)
    40comments
  22. The American Religion of Self-Storage Facilities(newyorker.com ↗)
    308comments
  23. Landing the Space Shuttle – A Flying Machine and the Thrill of a Lifetime(eaa.org ↗)
    1comments
  24. CCC invites all model citizens to 40C3(ccc.de ↗)
    176comments
  25. Running Ubuntu on the Lenovo IdeaPad Duet(vhaudiquet.fr ↗)
    20comments
  26. André Weil and the Hodge Conjecture(jiahao116.github.io ↗)
    10comments
  27. Computer Reset, Dallas(dfarq.homeip.net ↗)
    discuss
  28. Launch HN: Skillsync (YC W26) – AI chat sessions made portable across agents
    45comments
  29. Show HN: Snapdrop: Instantly share files between devices. No setup, no signup(snapdrop.me ↗)
    9comments
  30. Show HN: Share your AI Setup, Learn from others(mysetup.ai ↗)
    85comments

How Uber Protects Against Retry Storms

18 pointsby 2h agouber.com
9 comments
1h 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?

47m 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.

47m 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).

52m 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).

28m 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.

39m 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