Back to News
Advertisement
Advertisement

⚡ Community Insights

Discussion Sentiment

94% Positive

Analyzed from 442 words in the discussion.

Trending Topics

#best#request#send#priority#load#twice#should#tail#cost#requests

Discussion (14 Comments)Read Original on HackerNews

ak_tabout 1 hour ago
You don't have to send every single request twice, just the ones that are haven't returned in time. Wait until some threshold, such as your p95 latency, and send your backup request after that. Return whichever request comes back first, and it should cut your tail latency without doubling your cost, since it only duplicates the small % of requests at the tail.

Google calls this a 'hedged request': https://cacm.acm.org/research/the-tail-at-scale/

nine_kabout 3 hours ago
Sending two identical parallel requests is the classic approach. But, logically speaking, it should also double the cost.

I would send a second request if the first request fails to return the first token within, say, 1 second. Then there's a chance the first request is stalling, which is an infrequent event.

I wonder if higher-availability tiers of LLM providers do a similar thing internally.

ImPostingOnHNabout 2 hours ago
Token caching might help here, but if it returns the same result, faster, for the same price as priority, seems good
Groxxabout 2 hours ago
This sounds like a job for Fast Fallback instead: https://en.wikipedia.org/wiki/Happy_Eyeballs
dvaplimaabout 3 hours ago
Nice turn around, does anyone has a benchmark regarding other types of requests (priority vs send twice) other than voice/call? Or the tests already test that?
eigenblakeabout 4 hours ago
I love this. Simple. Useful. To the point. If AI was used, I can't tell because it is clearly representing the author's beliefs.
thousand_nightsabout 3 hours ago
agreed, reads like a breath of fresh air, no fluff
crisnobleabout 3 hours ago
Why not send it thrice?
ball_of_lintabout 1 hour ago
It turns out that best of 2 random draws outperforms best of 1, best of 3, and best of all in many load balancing scenarios: https://brooker.co.za/blog/2012/01/17/two-random.html

It's a bit unintuitive, but they key idea is roughly 'If you're working on stale load data (as always), best of 2 strikes the right balance between distributing load evenly and giving more work to less loaded hosts'. If you do 'best of k', you end up with herd behavior, overloading one host. 'best of 1' sends too much traffic to slow hosts.

dahart10 minutes ago
Be careful to not overstate the conclusion of that blog post - best of 3 wins when the cache update rate is more frequent than average task duration, and best of 2 still has herding behavior and loses to 1 random when the update rate is less frequent (which may be high load, or we may also be missing a dimension here). Since the plot chose the window where best of 2 wins, it might bias or prime the reader to believe best of 2 is usually or always best, forgetting that underloaded and overloaded scenarios are in reality more common than all servers having a nice balanced medium size load for long periods.
ramon156about 3 hours ago
for a tier thats twice the cost i would expect >2x the speed. somewhere 5-10x

e.g. 1.40m would become 0.30s.

do people really pay for these priority plans?

behnamohabout 2 hours ago
This is half the story; you should show performance per dollar. I doubt your 2x approach would fare well against the priority if you consider the costs.
ImPostingOnHNabout 2 hours ago
The article mentions that the priority tier costs 2x normal, so the costs of running normal twice should be fine.
moffkalastabout 3 hours ago
If you want a controllable and predictable system, host it yourself. APIs will always have outages, delays and breaking changes every so often. That's the price you pay for not doing it properly and outsourcing your job.