On Tue, Mar 14, 2017 at 6:39 AM Willy Tarreau <w...@1wt.eu> wrote:

> Hi Robinho,
>
> On Tue, Mar 14, 2017 at 01:12:45AM +0000, Robson Roberto Souza Peixoto
> wrote:
> > Hi!
> >
> > I'm using HaProxy as a reverse proxy to my applications running on
> Marathon.
> >
> > The Marathon-lb(https://github.com/mesosphere/marathon-lb) is the
> > responsabel to create the configuration file and reload the HaProxy.
> >
> > But there are a lot of thrift and another tcp services and because of
> that
> > the backend is configured as layer 4. All clients of these services are
> > using persistent connection and because of that we have a lot of process
> > waiting for all connections close to finish the process after a reload.
> >
> > But sometimes it take days or weeks to hapen a new deploy of the software
> > and release the connection.
> >
> > I'd like to know if is possible to force the connection close if the
> > process if waiting the connection to die.
>
> In fact in HTTP it's already the case. In TCP however there's no way to
> know when to close because by definition we're just forwarding bytes
> between two sides without any interpretation of the transported protocol.
> If you want to close such connections upon reload, you have two
> possibilities :
>   - shorten the timeouts (but how short is enough solely depends on your
>     workload and what works today may not work tomorrow) ;
>
>   - reload with -st instead of -sf : it will instruct the old process to
>     terminate all connections and quit instead of letting them close first.
>
>
But will `-st` mode wait for current http requests finish? Or will
interrupt all connections without waiting for the responses?


> Given your description I think the latter is exactly what you're looking
> for.
>
> Cheers,
> Willy
>
-- 
Robson Roberto Souza Peixoto
Robinho
Master in Computer Science, University of Campinas
IRC: robsonpeixoto
Twitter: http://twitter.com/robinhopeixoto
github: https://github.com/robsonpeixoto

Reply via email to