Hi David, On Wed, Oct 01, 2014 at 08:07:30AM -0400, David Pollak wrote: > Howdy, > > I'm using HAProxy to choose among a series of dynamically allocated HTTP > backends. Basically, a user goes to URL A and clicks on the "start my > service" link. A new browser window/tab is popped up and they get the new > service/URL in the tab. > > Basically, got to /service click on a link, get a new browser window at > /special/xxxxx where the xxxx piece is routed to the dynamically created > service for that user. > > On the back end, the service is created in my cluster and I update > haproxy.cfg and do a "service haproxy reload". > > The issue I seem to be facing is that the browser has a keep-alive'd > connection to my server so the http request goes to the old HAProxy > instance. > > Is there a way to selectively force close the keep-alive for just the > browser that connects to the /special/xxxxx URL? Or maybe insert an > intermediate redirect URL that forces the close so the browser is forced to > re-establish a connection to the new HAProxy instance?
There's something I've wanted to implement for a long time, which should not be hard. The idea was to disable keep-alive in responses when the process is stopping. That would get rid of all connections after one request. The next step could be to be able to kill all idle connections after some time but that's getting trickier. None of this was implemented to date however. Best regards, Willy

