-
Notifications
You must be signed in to change notification settings - Fork 114
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
GetConn waiting queue as FIFO queue #212
Comments
I wonder if this could be done more easily by marking connections as reserved. Because the main problem is that woken |
Hi. Hmm, hard to say, really.. Reserved connection may end up being dead, this could add to complexity.. |
Yes, I looked at adding a I looked at your commit. Looks great! Much simpler and covers the case when a connection is bad. What are the next steps? Do you need me to do anything? |
Hi, we noticed that under higher load that
get_conn()
requests get served out-of-order resulting in high tail latencies. This happens when a queued waker gets called, but before the GetConn is polled a newer GetConn grabs the available db connection. On top of that, the previously queued GetConn gets pushed to the back of the waiting queue, adding more latency.Would you consider turning the
waiting
queue inExchange
into a FIFO queue? I have a patch that we tested in prod and it shows much lower tail latencies for us. See #213.The text was updated successfully, but these errors were encountered: