RE: [Released] [Contains offensive content] RE: Building Network Redundancy into a Perl Client

From: Graeme St. Clair (Graeme.St.Clair_at_hds.com)
Date: 12/07/04


To: "'Joshua Berry'" <jberry@PENSON.COM>, Jim <jkipp5@comcast.net>
Date: Mon, 6 Dec 2004 15:09:50 -0800 

Does anyone know why or where the phrase [Contains o f f e n s i v e
content] is being inserted into these headers? I wouldn't care, except my
employer's spam filter is holding them up for whatever reason, as it might
be, use of the said phrase...

Rgds, G.

-----Original Message-----
From: Joshua Berry [mailto:jberry@PENSON.COM]
Sent: Monday, December 06, 2004 10:01 AM
To: Jim
Cc: beginners@perl.org
Subject: [Released] [Contains offensive content] RE: Building Network
Redundancy into a Perl Client

I don't think that it is possible to do within perl so I had to enable these
options:

echo 1 >> /proc/sys/net/ipv4/tcp_tw_reuse echo 1 >>
/proc/sys/net/ipv4/tcp_tw_recycle

-----Original Message-----
From: Jim [mailto:jkipp5@comcast.net]
Sent: Saturday, December 04, 2004 8:27 PM
To: Joshua Berry
Cc: beginners@perl.org
Subject: RE: Building Network Redundancy into a Perl Client

> I am trying to implement redundancy in a client application that I am
> writing so that I can have a primary server and a backup server. The
> client is tailing a logfile and sends results to a server for
> processing, at the end of the tail loop it sends data to a function
> that tries to establish a connection to the primary server and send
> the data, if that fails then the data is sent to the backup (failover)
> server.
> The way the function works, if the primary comes back online then it
> automatically knows and starts sending data back to the primary.
>
> The only problem with the way this is implemented is that every
> connection remains for a couple of minutes in the TIME_WAIT stage:
>
> tcp 0 0 xxx.xxx.xxx.xxx:xxx xxx.xxx.xxx.xxx:xxx
> TIME_WAIT
> tcp 0 0 xxx.xxx.xxx.xxx:xxx xxx.xxx.xxx.xxx:xxx
> TIME_WAIT
>
> Which adds up if I am sending several connections per minute or
> possibly per second. My question is, is there a way to bypass the
> TIME_WAIT stage or at least reduce the time it is in this stage from
> within the program? Below is the subroutine and how it is called. If
> there is another way of doing this please let me know.

I took a look at socket options ( setsockopt() ) but I don't see anyting
that would change the time_wait timer ,but I didn't look that hard :).
What
OS are you using? You may have tomodify some kernel settings if you are
using UNIX/LINUX. With windows, here are a few links that may help

http://www.winguides.com/registry/display.php/878/

http://www.windowsitpro.com/Web/Article/ArticleID/23276/23276.html

---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.802 / Virus Database: 545 - Release Date: 11/26/2004
 
--
To unsubscribe, e-mail: beginners-unsubscribe@perl.org For additional
commands, e-mail: beginners-help@perl.org <http://learn.perl.org/>
<http://learn.perl.org/first-response>
-- 
To unsubscribe, e-mail: beginners-unsubscribe@perl.org
For additional commands, e-mail: beginners-help@perl.org
<http://learn.perl.org/> <http://learn.perl.org/first-response>


Relevant Pages

  • RE: Building Network Redundancy into a Perl Client
    ... Building Network Redundancy into a Perl Client ... > that I am writing so that I can have a primary server and a ... > backup server. ... > every connection remains for a couple of minutes in the ...
    (perl.beginners)
  • RE: Best Practices for Log Shipping
    ... do the Full Database backup which do not disturb your tlog backup on primary. ... log-shipping secondary server. ... Now that the primary server database is set as "full recovery" mode, ... the tran logs are being shipped successfully to the secondary server, ...
    (microsoft.public.sqlserver.replication)
  • Re: Primary + Secondary DNS
    ... obtain the zone data from the primary server. ... I don't however like to see ANY inconstencies in the DNS zones. ...
    (microsoft.public.windows.server.dns)
  • Re: Primary + Secondary DNS
    ... Also, Within MS DNS on the secondary server, we've used an Internal IP to ... obtain the zone data from the primary server. ...
    (microsoft.public.windows.server.dns)
  • Re: Least Invasive Way to Test SCR
    ... SCR that one and use it for testing. ... server and you're ready to revert back to your primary server, ... either have to reverse the SCR back to the primary server and then recover ... the primary via Windows Backup and then restore it to the secondary and use ...
    (microsoft.public.exchange.setup)