couchdb-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Adam Kocoloski <kocol...@apache.org>
Subject Re: mochiweb socket options discriminating against slow connections
Date Wed, 04 Nov 2009 22:37:55 GMT
On Nov 4, 2009, at 4:42 PM, Adam Kocoloski wrote:

> I don't know what the behavior is when there are 0 bytes available  
> on the socket -- does gen_tcp:recv just keep returning 0 and leave  
> it to us to implement the timeout, or can we do something like
>
> gen_tcp:recv(Socket, 0, 10000)
>
> Best, Adam

Ok, confirmed -- this call blocks for 10 seconds when no data is  
available on the socket.  I think that's the behavior we're looking  
for: detect stale connections, but let slow connections keep working.   
Not sure what the greater performance implications of switching this  
configuration might be, though (the chunks of data we'd be dealing  
with would be much smaller).  Best,

Adam

Mime
View raw message