Interestingly, Cloudflare wanted to use hyper but found that it was too correct, so they had to build their own [1].
[1] https://blog.cloudflare.com/how-we-built-pingora-the-proxy-t...
Interestingly, Cloudflare wanted to use hyper but found that it was too correct, so they had to build their own [1].
[1] https://blog.cloudflare.com/how-we-built-pingora-the-proxy-t...
Maybe I need more time or a favorable comparison to another framework to appreciate it.
Interesting, I'm curious about the details here. Does the lb reuse connections for multiple requests or something?
I'm curious too. There must be more to it than that because LBs reusing backhaul connections is standard practice. It's not only an optimization but in many cases you'll quickly hit ephemeral port exhaustion if you don't. TCP connections are distinguished by (src_ip, src_port, dst_ip, dst_port) tuple. For this leg you're probably only varying the src_port portion, and all of the valid options are cooling in time_wait state.
The only downside is that you have to install sqlx-cli and you have to run a couple of special commands to make your binary compile offline or on CI/CD where you don’t provide that database connection.
You can adapt from async to sync but there is a definite complexity tax with all the pinning plus the runtime cost of the extra pinning.
Async is great for more proxy like use cases though.