New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
rqlite /status can be slow to respond with rqlite is under load #1645
Comments
Is it strictly required that the stats are always up-to-date upon calling /status? If a small delay is acceptable we could cache this for a couple seconds. |
For the slow queries part, we could instrument the sql.Driver with an interceptor that logs the executed queries with the time spent. That could aid in debugging. |
Actually, I'm thinking about caching some of the stats. As for your slow query log, yes, that is a feature I'm interested in. Do you have a good, clean, pattern to implement? |
Caching seems a simple and effective solution for this. Tracing sql queries is a well requested feature for database/sql(golang/go#18080), but I believe no one is looking into this, there is not even an official proposal yet. There are third-party libraries that implement this, such as: |
Under load /status can be slow, sometimes too slow for monitoring purposes. I suspect it's the DB layer.
One option could be to wait only for n seconds from DB layer, or examine the queries in the DB layer to determine which might be particularly slow with rqlite is under load.
The text was updated successfully, but these errors were encountered: