lwip-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[lwip-users] Question about lwip 's disconnect timeout


From: megatron
Subject: [lwip-users] Question about lwip 's disconnect timeout
Date: Thu, 10 Jun 2010 01:08:45 -0700 (PDT)

Hill all,from another forum ,I read this:

     How often are you connecting/disconnecting? TCP will hang on to
     socket endpoints for a while after a disconnect to ensure that late,
     out-of-order segments and any remnants of the four-way disconnect
     handshake are securely dumped and so cannot become part of any new
     connection.

     If you connect/disconnect continually at a rate consistently greater
     than this disconnect timeout, your server will run out of ephemeral
     sockets because of all these socket descriptors/objects in this
     'TIME_WAIT' state.

     If your Apache/IIS server gets a burst of connect/disconnect, it
     doesn't matter too much because a pool of 20000 sockets takes along
     time to become exhausted. With a tiddly uC with a bit of RAM, this 
     will become a problem very quickly.

     The TIME_WAIT timeout can be quite long on some systems and is usually
     in the order of minutes, rather than seconds.

     **Don't use connect/disconnect protocols**

     Don't use them on Windows/Linux unless it's absolutely unavoidable,
    (eg. on web servers where the number of interacting clients exceeds
    the number of available sockets). Such protocols have very high
    latencies but, sadly, they are often used because developers cannot be
    bothered to develop a real protocol that can assemble/disassemble 
    protocol-units to/from byte streams.

    On a uC, it's even more important to avoid continual
connect/disconnects.

My question is :how long is lwip's disconnet timeout? What is the rate I can
connect/disconnect continually?When I use a uC,like LPC2368,should I use UDP
instead of TCP due to the problem described above?

Thanks  a lot!
-- 
View this message in context: 
http://old.nabble.com/Question-about-lwip-%27s-disconnect-timeout-tp28840069p28840069.html
Sent from the lwip-users mailing list archive at Nabble.com.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]