Networking Forums

Networking Forums > Computer Networking > Linux Networking > portforwarding to avoid downtime on apache-restart

Reply
Thread Tools Display Modes

portforwarding to avoid downtime on apache-restart

 
 
peter pilsl
Guest
Posts: n/a

 
      12-14-2004, 12:33 PM

the problem is that I have an application (mod_perl) that preloads huge
datastructures on serverstartup (500MB) to have it easily shared between
the forked apache-threads later. This is very efficient and convient,
cause all threads share the same datastructure and can access pretty fast.

Now the problem is, that a change in the datastructure means that I need
to restart apache to reload the datastructure. Shutting down and
restarting the server takes about 20seconds (the dataloading takes its
time) and in that time the server is offline which is something I would
like to avoid.

So how can I deal with this?

One solution would be to have apache listen on a different port and
portforward 80 to this port. On reload I first start a new apache on
another port. When its up I change the portforward to this port and then
I shut down the old apache. This would mean some swapping on the server,
cause 500MB are not taken that easily but it would work.

The other solution would be to have the clients "waiting" during the
20s-reboot of apache. They should merely timeout, but be disconnected.
How could I do this? As soon as apache is down, the client tell me that
there is no server instead of waiting and waiting ...

thnx for any idea, recommandation ...
peter




--
http://www2.goldfisch.at/know_list
 
Reply With Quote
 
 
 
 
Steve Wolfe
Guest
Posts: n/a

 
      12-14-2004, 04:10 PM
> the problem is that I have an application (mod_perl) that preloads huge
> datastructures on serverstartup (500MB) to have it easily shared between
> the forked apache-threads later. This is very efficient and convient,
> cause all threads share the same datastructure and can access pretty fast.
>
> Now the problem is, that a change in the datastructure means that I need
> to restart apache to reload the datastructure. Shutting down and
> restarting the server takes about 20seconds (the dataloading takes its
> time) and in that time the server is offline which is something I would
> like to avoid.
>
> So how can I deal with this?


We have an application which needs to pre-load, pre-process, and
pre-compute large amounts of data as well, and we made it a standalone
daemon which listens for requests on a unix socket. That way, restarts of
Apache don't affect it at all, and here's the good part: If we need to
restart the daemon, we can start a new one first, let it do the
pre-processing, then kill the old one.

steve



 
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
PlusNet - Upgrade - 4 days downtime... Gordon Henderson Broadband 6 04-09-2009 08:13 AM
Downtime when changing ISP via MAC R.Daneel Olivaw Broadband 6 08-04-2006 11:42 PM
Grrrr.... 7 days downtime!??! mike Broadband 5 05-19-2004 09:11 PM
Moving office - downtime and ADSL Paul Crisp Broadband 1 09-29-2003 05:17 PM
Q: Broadband migration without downtime Clive Smith Broadband 1 09-28-2003 11:11 AM



1 2 3 4 5 6 7 8 9 10 11