[erlang-questions] Non-blocking send in erlang: how to save memory when send one content to many people
Thu Dec 15 12:46:27 CET 2011
> In the live streaming use case absolutely. HTTP is half-duplex. Once the server receives all the headers, it does not need to listen on that socket anymore. This means there is no need to keep the socket in the NIF listen thread and all you are doing is periodic write's on the FD from the stream buffer. This is where the real optimization is. Maintaining one circular buffer and just looping sockets over it and doing writes.
> On my servers traffic goes through haproxy on port 80. Once there is a good amount of users on the server, haproxy actually uses more CPU than my streaming server.
Makes sense now. Thanks Sergej
More information about the erlang-questions