https://pinot.apache.org/ logo
d

Daniel Lavoie

06/17/2021, 2:03 AM
Pinot is a rest API that can support high QPS, what benefits are you looking into a connection pool? Connection pooling would likely be a threading configuration from your java service http client.
c

Charles

06/17/2021, 5:25 AM
Thx for your replay, I think connection pool can support high qps with little threads, but pinot don’t support , we can just use thread pool in service code right?
d

Daniel Lavoie

06/17/2021, 1:23 PM
Connection pool make sense for a stateful protocol like jdbc or raw tcp. HTTP is stateless. What you have on the server is HTTP listeners thread pool that answer client commands. You can scale those by adding more pinot brokers. That’s nothing else than regular a Jetty web server. Pinot is designed to serve high QPS with ( > 100k / sec) stateless http commands. If you introduce a thread pool on the client side, you will only create a potentially bottleneck in your client code. You can create as many concurrent http client threads against Pinot. The only benefit of pooling on the client end is that you will control potential resource exhaustion from your client. You’ll be reusing threads, not tcp connections.
j

Jonathan Meyer

07/12/2021, 5:41 PM
Hi Correct me if I'm in the wrong but from my understanding, using client side connection pooling allows to reuse connections, instead of reopening new sockets for every request For example, I can see that the
pinot-db
Python client does not do that and ~25ms are spent establishing a new connection for every request. In a tight loop where multiple requests have to be sent, this quickly adds up
d

Daniel Lavoie

07/12/2021, 5:49 PM
You are actually right, you can shave on the http tcp connection with an http client lib that supports pooling.
j

Jonathan Meyer

07/12/2021, 5:54 PM
Thanks for confirming @Daniel Lavoie 🙂