[rabbitmq-discuss] Question about rabbit_reader.erl

Erik Rigtorp erik at rigtorp.com
Fri Sep 11 08:37:44 BST 2009


I see, thanks. I noticed how you used the length argument to
async_recv() in a neat way in rabbit_reader.erl. I'm working on a
system where under som loads there can be a delay of 400+ms between
NIC and receiving the data in an erlang process. I thought that maybe
you had discovered that prim_inet:async_recv() has lower latency.

Erik

On Fri, Sep 11, 2009 at 02:23, Matthias Radestock <matthias at lshift.net> wrote:
> Erik,
>
> Erik Rigtorp wrote:
>>
>> I'm curious about why prim_inet:async_recv() is being used instead of
>> active mode.
>
> {active,once} provides no control over PDU size.
> {active,true} provides no flow control.
> gen_tcp:recv() is blocking.
>
> With prim_inet:async_recv() we can receive exactly the amount of data we
> want, asynchronously.
>
>
> Regards,
>
> Matthias.
>
>




More information about the rabbitmq-discuss mailing list