"Thundering Herd" prevention?

What I mean by “Thundering Herd”: Large number of clients requesting the same expensive SQL query at the same time, before it can be returned.

Is there any intelligence built into Cockroach DB to assist in preventing this problem? Of course once we get one query back, it can be mitigated through caching.

No, we don’t have anything that optimizes this case.

1 Like

Thank you for the response @darin What is the usual mitigation strategy here? Anything of this sort on the roadmap?

No, we don’t have this on the roadmap. We are not sure that we should do anything before we have a reason to do it. Like some case where it really is a problem that has to be solved on the server side. To be clear - the inefficiency here is that instead of once, we may have to compute few times execution plan for same, concurrent queries. That’s normally very fast. Once the plan is computed, it will be cached and used by all queries that follow.

1 Like