FANGM Onsite Ques | Design | How high concurrency is handled in cache?
Anonymous User
835

Recently in one of the interviews, I was asked how a cache(we are discussing redis) handles thousands of requests (both READ and WRITE) at same time for SAME KEY without latency?

Exaction Question: "Lets say there is a hot key and there are 1000 requests (some read & some write) hitting one server for that key at SAME time. Will all requests be queued and executed sequentially with help of any locks(Read Shared or Exclusive Write)? How cache internals work?"

I have no experience working in huge scale applications. Can you someone please explain or point me to resources how this scenario is handled in real world?

Comments (3)