Nucleon, a dynamic TCP load balancer written in Rust
github.com
github.com
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.
I put them because I was impressed that Rust and mio, with little to no optimization, can compete with the best softwares out there.
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.
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..
And, well, actually, if I had to bet, I'd bet Redis is actually lighter weight than an HTTP request, honestly. HTTP is really quite inefficient for small requests, and requires a massive pile of code to deal with endless, endless corner cases than an application-specific protocol doesn't.
It is.
Here's a cool, non-relevant example of one implementing a Redis clone in Haskell (on HN a month or so ago):
https://honza.ca/2015/09/building-a-redis-clone-in-haskell
The relevant portion is where they parse the protocol, not bad at all (especially compared to HTTP)
I was thinking on adding a separate HTTP API to control the load balancer that would read and write to Redis, notifying the load balancer when changes should be applied.
Overall it's an interesting project and seems like a nice showcase of actual rust src code.