Hacker News new | ask | show | jobs
by exabrial 1264 days ago
This may be a stupid question, but wouldn't connection pooling offer the same benefit?
1 comments

It helps some cases for sure and what I'd strongly recommend in practice. Connection pooling isn't always a viable option depending on the application though.

Connection pooling doesn't solve all the things we can improve by using HTTP as a base. We can be faster in just data transfer through compression, for example.

Using HTTP/3 starts to help tail latency that we can't solve with TCP. Unreliable networks with packet loss suffer greatly with TCP and not as badly with QUIC.

In theory. In practice nothing implements this.

But in any case, even if your client did support this and the server supported it, we still need HTTP for other things. I don't think it's particularly a "gotcha". HTTP is also stateless, which has lots of benefits for us.

MySqlConnector (the most popular .NET library for MySQL, and the one that I authored) has supported protocol compression for many years: https://github.com/mysql-net/MySqlConnector/issues/31.
but it's here?

https://dev.mysql.com/doc/connector-j/8.0/en/connector-j-con...

And it's in the C API too...