2 ms·
If you allow users to execute arbitrary queries, how do you protect your server resources from being totally consumed by a small subset of your users?
by sorokod 9y ago
If you allow users to execute arbitrary queries, how do you protect your server resources from being totally consumed by a small subset of your users?
- dvirsky 9y agoIn terms of redis being single threaded, we put a lot of work into making the search concurrent, see here for details: https://redislabs.com/blog/making-redis-concurrent-with-modules/ https://redislabs.com/blog/making-redis-concurrent-with-modu.... Basically we rotate between long queries and short queries, making long queries run slower but not block short ones. Right now rate limiting is left to the user and not solved at the engine level.
- sorokod 9y agoThis is about the complexity of queries (which, without knowing your system, may be unbound) - rate limiting will not help.
- dvirsky 9y agoYeah, I was also thinking about adding execution cap to a single query, that's not hard to add as there is a simple scheduler that checks their progress constantly. So just terminating a long running query is simple.