python - How to avoid packet loss on server application restart? -


a typical situation server/web application application needs shut down , restarted implement upgrade.

what possible/common schemes (and available software) avoid losing data clients sent server during short time application gone?

an example scheme work is: simple web server client connects port 80, rather client connecting directly web server application, there simple application in between listens port 80 , seamlessly forwards/returns data to/from "actual" web server application (on other port). when web server needs shut down , restarted, relay app detect , buffer incoming data until webserver comes life. way there always application listening port 80 , data never lost (within buffer-size , time reason, of course). such simple intermediate buffer-on-recipient-unavailable piece of software exist already?

i'm interested in solutions single application instance , not 1 there multiple instances (in case clever rolling update scheme used), in interests of having full answer set, response great!

to avoid this, have multiple application servers behind load balancer. before bringing 1 down, ensure load balancer not sending new clients. bring down, traffic go other applications servers, , when comes traffic begin getting sent again.

if have 1 application server, 'buffering' network traffic poor solution. when server comes up, has none of tcp state information anymore , old incoming connections have go anyway.


Comments

Popular posts from this blog

linux - Using a Cron Job to check if my mod_wsgi / apache server is running and restart -

actionscript 3 - TweenLite does not work with object -

jQuery Ajax Render Fragments OR Whole Page -