[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Determining whether a TCP connection is up
From: |
Stefan Monnier |
Subject: |
Re: Determining whether a TCP connection is up |
Date: |
Mon, 12 Aug 2013 21:52:34 -0400 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux) |
>> Another option is to kill connections after some time of inactivity,
>> rather than leave them open and suffer a timeout next time we need to
>> use it.
> Yes. But it's not very nice for the servers. NNTP and IMAP servers do
> the access control stuff upon connection, which can be
> resource-intensive.
Those servers don't like to have thousands of idle connections tying up
resources either.
If you kill your connections after a reasonable amount of inactivity,
the cost of connection is not that bad.
> The earliest version of the ... Mozilla? or whatever they were called at
> the time? (I think) ... news reader famously was written in a
> connection-less method which made a news connection for every action it
> made. It DDoS-ed several NNTP servers.
I think that "after some time of inactivity" is not quite the same as "a
news connection for every action".
E.g.: Use (process-put <proc> 'last-time (float-time)) in the process
filter, then use an idle timer to kill connections older than some
limit. And when sending a command, check that last-time stamp, and
consider the process dead if it's older than the limit (in case the
idle-timer didn't do its job (yet) for some reason).
Stefan
- Re: Determining whether a TCP connection is up, (continued)
- Re: Determining whether a TCP connection is up, Lars Magne Ingebrigtsen, 2013/08/05
- Re: Determining whether a TCP connection is up, Julien Danjou, 2013/08/06
- Re: Determining whether a TCP connection is up, joakim, 2013/08/06
- Re: Determining whether a TCP connection is up, Lars Magne Ingebrigtsen, 2013/08/06
- Re: Determining whether a TCP connection is up, Stefan Monnier, 2013/08/06
- Re: Determining whether a TCP connection is up, Lars Magne Ingebrigtsen, 2013/08/12
- Re: Determining whether a TCP connection is up,
Stefan Monnier <=