[erlang-questions] Non-blocking send in erlang: how to save memory when send one content to many people

Lukas Larsson lukas@REDACTED
Thu Dec 15 00:23:34 CET 2011

You might be interested in the new (R15B) file:sendfile function, if having
the data on disc is an option.
On Dec 14, 2011 11:48 PM, "Max Lapshin" <max.lapshin@REDACTED> wrote:

> I'm sending live stream to 4000+ users.
> Stream is saved in memory (in shared ETS table, in binaries) in chunks
> 500 KBytes each.
> Client comes and asks for next chunk.
> If I write server in C (or with linked-in driver), I whould just
> manage common shared circular buffer from which I will send data and
> remember
> client position in this buffer. If client is too slow to read from
> this buffer, it is disconnected and forgotten.
> Such approach give ability to save memory and not to copy it in
> buffers and driver queues.
> Is it possible to have something like this in erlang?
> Currently, I've got limits around 3 GBit/s from one erlang node on
> loopback interface and I want to raise this limit.
> When traffic comes to this limit, memory begins very fast growing and
> when it reaches limits of RAM, massive disconnects happen.
> This is why I think, that I should save memory first without trying to
> write linked-in tcp driver =)
> _______________________________________________
> erlang-questions mailing list
> erlang-questions@REDACTED
> http://erlang.org/mailman/listinfo/erlang-questions
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20111215/f0db1ad3/attachment.htm>

More information about the erlang-questions mailing list