4 ms·
Very nice, but this is more of a demo code for boost::asio than something that is production-worthy. For example, it doesn't relay FINs between connections, do
by huhtenberg 10y ago
Very nice, but this is more of a demo code for boost::asio than something that is production-worthy.
For example, it doesn't relay FINs between connections, doesn't disable Nagle algorithm on the upstream socket, doesn't wait for pending writes to complete before tearing down the connection, doesn't handle congestion at all (potentially leading to unbound memory use), etc.
- pacmanfan 10y agoCould you point to an open source TCP proxy that you'd consider production worthy with an approachable code base?
- jonhohle 10y agohttp://nginx.org http://nginx.org
- pacmanfan 10y agoI assumed (without looking) that because of all of the features, the nginx codebase wouldn't be that east to read. I'll give it a try!
- LoSboccacc 10y agohaproxy is quite well documented
- toast0 10y agostud is pretty approachable and production worthy; I assume hitch [1] remains so, if you dropped the TLS termination, it would just be a TCP proxy as well. [1] https://hitch-tls.org/ https://hitch-tls.org/
- user5994461 10y agoHAProxy is the gold standard. nginx and apache only do HTTP(S). Don't support TCP.
- jorams 10y ago> nginx and apache only do HTTP(S). Don't support TCP. That's not entirely accurate. For nginx, for example, there's the ngx_stream_core_module[1]. It's not particularly well-documented though, so I don't know much about it. [1]: https://nginx.org/en/docs/stream/ngx_stream_core_module.html https://nginx.org/en/docs/stream/ngx_stream_core_module.html
- user5994461 10y agoIt's totally experimental. It's only been made a few months ago. It's not even compiled into the official distribution, you gotta compile nginx yourself with special flags. For the sake of god, please don't have your entire site run on experimental software like that. ^^