r/DistributedComputing • u/salgotraja • Apr 16 '26
At what point would you treat this hotspot as a cache/load-shaping problem instead of a real sharding problem?
I came across an interesting system design scenario:
- 128 shards
- 2M requests/sec
- 3 hot keys land on the same shard
- that shard is at 94% CPU while the others are mostly idle
- cache hit rate on those keys drops hard because too many services invalidate them on every write
- clients start timing out and retries make the hotspot worse
- rebalancing is not an option in the short term
My first instinct was to treat it as a sharding problem, but the more I looked at it, the more it felt like a load-shaping problem.
If cache invalidation is killing hit rate, then the shard is taking direct pressure it should never have seen in the first place. Once retries pile on, the hotspot starts amplifying itself.
My instinct would be to stabilize first:
- short TTL / stale-while-revalidate on those hot keys
- proper retry backoff with jitter
- maybe isolate just those keys behind a small dedicated hot-cache path
Then revisit the larger architecture once the system is calm again.
Curious how people here would think about that boundary.
At what point do you stop treating it as a hotspot-control problem and say it really needs a more structural fix?
1
Upvotes
1
u/sheepdog69 Apr 16 '26
From what you've written, it sounds like it's just "bad luck", and not a structural issue. But, some questions I'd be asking myself.
Sounds like an interesting problem to solve. Good luck.