Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

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?


In 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-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.


This is about the complexity of queries (which, without knowing your system, may be unbound) - rate limiting will not help.


Yeah, 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.




Consider applying for YC's Winter 2026 batch! Applications are open till Nov 10

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: