3 ms·
haproxy can be configured in so many ways. Without providing your haproxy config and testing environment these numbers won't make sense. For example, configure
by halayli 11y ago
haproxy can be configured in so many ways. Without providing your haproxy config and testing environment these numbers won't make sense.
For example, configure haproxy with tcp splicing, and now you eliminated all the userland/kernel copies between client/server, and haproxy goes as fast as your kernel + network IO can go.
- nicolaslem 11y agoNicolas from Nucleon here. You are right, I probably shouldn't have put these numbers there as haproxy can be configured way better than it is with its default configuration. I put them because I was impressed that Rust and mio, with little to no optimization, can compete with the best softwares out there.
- derefr 11y agoI think it's useful to to have "untuned HAProxy" as a reference benchmark, to have a goal to measure pre-1.0 development progress against. When a project hits that order-of-magnitude of speed, you can assume it isn't screwing anything major up in its design.
- halayli 11y agoI am not saying to tune HAProxy to win the benchmark. When you want to compare, it's a good idea to compare apples to apples. Like I said in my previous comment, HAProxy is a doing a lot more than what it's being compared with. HAProxy has timeout schedulers that are activated on every packet received, maintain stats, logging, and a lot more.
- halayli 11y agoWhen proxying network IO, there's not much that the language is doing. The burden is more on the OS. However, the comparison is not fair because what you are doing is just passing data in and out while haproxy is running a scheduler to maintain timeouts, logging, checking acl rules on connection establishment, maintaining stats, etc..