Third-party send to active and passive TCP sockets

Klacke klacke@REDACTED
Tue Nov 2 10:35:38 CET 1999

On Wed, Oct 27, 1999 at 12:51:44PM -0700, Jim Larson wrote:
> With passive sockets, we have the option of deferring further
> recv()s in response to high load.
> For client-side sockets, we can acheive the same effect with active
> sockets by delaying the send() of requests to limit the number of
> outstanding requests at any one time.
> For server-side sockets, we may be overwhelmed by client request
> messages.  Any suggestions for what we can do here?

This is a real problem indeed. We wrote some code here at
bluetail which pretty much solved that problem.
The idea was to have yet another option inet:sock_opts
called {active, once}.

This means that the socket is active, however a soon as 
a message is delivered on the socket, the socket is
reset to passive mode. This way we can have the best of
both worlds. 

We've posted that code to erlang-maintainers and hopefully
it'll be properly released some day. 

> Does the Erlang process scheduler look at the depth of message
> queues in order to avoid overflows?



Claes Wikström                          Tel: +46 (0)8 692 22 09
Bluetail AB                             Email: klacke@REDACTED
Hantverkargatan 78                      WWW:
SE-112 38 Stockholm, SWEDEN

More information about the erlang-questions mailing list