/ Zope / Apsis / Pound Mailing List / Archive / 2008 / 2008-12 / Session Preversation Script

[ << ] [ >> ]

[ Pound newbie / HTTPS url issue / ... ] [ Newbie question about URL stripping / ... ]

Session Preversation Script
"Cullin J. Wible" <cullin(at)emaildatasource.com>
2008-12-29 19:45:15 [ FULL ]
Hi Everyone,
 
We needed a way to preserve pound sessions. This way we could do a quick
pound restart and re-load the session data or, if necessary, do an
IP-takeover and move the session table to another server.
 
The script is quite simple, but I thought it was worth sharing. Here's
how to use it:
 
# poundctl -c /var/run/pound.ctl -X | pund-preserve >
/tmp/pound-sessions.sh
< restart pound, scp session list to other box, etc. >
# bash /tmp/pound-sessions.sh
 
As a side note, this script could be modified and combined with
something such as heartbeat or apinger to (
http://freshmeat.net/projects/apinger/)
to create a redundant Pound
system. We're not quite there yet, but it's not that far off.
 
Thanks,
 
Cullin J. Wible
Co-Founder & Chief Architect

Email Data Source, Inc. 
65 Broadway, Suite 601
New York, NY 10006
212-514-8900 | main
646-461-3775 | direct
212-514-8904 | fax

cullin(at)emaildatasource.com

www.EmailDataSource.com <http://www.emaildatasource.com/>

Monitoring the World of Email Marketing
Attachments:  
text.html text/html 4368 Bytes
pound-preserve application/octet-stream 441 Bytes

RE: [Pound Mailing List] Session Preversation Script
"Cullin J. Wible" <cullin(at)emaildatasource.com>
2008-12-29 19:55:37 [ FULL ]
I guess attachments don't come through to the list, so here it is.

------------- BEGIN SCRIPT --------------- 
#!/usr/bin/perl

$| = 1;

while(<STDIN>) {
    chomp;
    
    if (  $_ =~ m/^\<listener index=\"(\d+)/ ) {
        $listener = $1;
    }
    
    if ( $_ =~ m/^\<service index=\"(\d+)/ ) { 
        $service = $1;
    }
    
    if ( $_ =~ m/^\<session index=\"(\d+)\" key=\"([^\"]+)\"
backend=\"(\d+)\"/ ) {
        print "/opt/pound-2.4.3/sbin/poundctl -N " . $listener;
        print " " . $service . " " . $2 . " " . $3 . "\n"; 
    }
}
------------- END SCRIPT ---------------

Cullin

-----Original Message-----
From: Cullin J. Wible [mailto:cullin(at)emaildatasource.com] 
Sent: Monday, December 29, 2008 1:45 PM
To: pound(at)apsis.ch
Subject: [Pound Mailing List] Session Preversation Script

Hi Everyone,
 
We needed a way to preserve pound sessions. This way we could do a quick
pound restart and re-load the session data or, if necessary, do an
IP-takeover and move the session table to another server.
 
The script is quite simple, but I thought it was worth sharing. Here's
how to use it:
 
# poundctl -c /var/run/pound.ctl -X | pund-preserve >
/tmp/pound-sessions.sh
< restart pound, scp session list to other box, etc. >
# bash /tmp/pound-sessions.sh
 
As a side note, this script could be modified and combined with
something such as heartbeat or apinger to (
http://freshmeat.net/projects/apinger/)
to create a redundant Pound
system. We're not quite there yet, but it's not that far off.
 
Thanks,
 
Cullin J. Wible
Co-Founder & Chief Architect

Email Data Source, Inc. 
65 Broadway, Suite 601
New York, NY 10006
212-514-8900 | main
646-461-3775 | direct
212-514-8904 | fax

cullin(at)emaildatasource.com

www.EmailDataSource.com <http://www.emaildatasource.com/>

Monitoring the World of Email Marketing
 


--
To unsubscribe send an email with subject unsubscribe to pound(at)apsis.ch.
Please contact roseg(at)apsis.ch for questions.

MailBoxer