[prev in list] [next in list] [prev in thread] [next in thread] 

List:       haproxy
Subject:    Re: disable backend through socket
From:       Patrick Hemmer <haproxy () stormcloud9 ! net>
Date:       2013-12-26 17:18:46
Message-ID: 52BC64F6.90208 () stormcloud9 ! net
[Download RAW message or body]

*From: *Gabriel Sosa <sosagabriel@gmail.com>
*Sent: * 2013-12-26 09:41:21 E
*To: *Patrick Hemmer <haproxy@stormcloud9.net>
*CC: *haproxy@formilux.org
*Subject: *Re: disable backend through socket

> 
> 
> 
> On Mon, Dec 23, 2013 at 12:21 PM, Patrick Hemmer
> <haproxy@stormcloud9.net <mailto:haproxy@stormcloud9.net>> wrote:
> 
> > On Sun, Dec 22, 2013 at 05:05:16PM -0500, Patrick Hemmer wrote:
> > > No. As I said, I want to disable the backend.
> > > http://cbonte.github.io/haproxy-dconv/configuration-1.5.html#4.2-disabled
> > That doesn't really work for backends since they don't decide to get
> > traffic. At least if a config accepts to start with the "disabled"
> > keyword in a backend and this backend is referenced in a frontend, I
> > have no idea what it does behind the scenes. I'm not even sure the
> > backend is completely initialized.
> 
> Ah, ok. I can live with that :-)
> 
> 
> > What do you want to do exactly ? Do you just want to disable the
> > health checks ? It's unclear what result you're seeking in fact.
> 
> I was just looking to disable backends without restarting the
> service. Nothing more. Nothing less.
> Currenly when I want to disable a backend I just update the config
> and reload haproxy. Not a big deal. Was just hoping that since
> frontends and servers could both be enabled/disabled through the
> socket, that backends could too.
> 
> The reason why I don't want to disable individual servers is that
> we have an automated process which enables & disables servers. If
> a backend is disabled, then I don't want a server to automatically
> get enabled and start taking traffic. By disabling the backend, we
> prevent this scenario.
> 
> > Willy
> 
> Thank you
> 
> -Patrick
> 
> 
> 
> Patrick,
> 
> did you take a look to the load balancer feedback feature? [1] I think
> this might help you.
> 
> Saludos
> 
> [1]
> http://blog.loadbalancer.org/open-source-windows-service-for-reporting-server-load-back-to-haproxy-load-balancer-feedback-agent/
>  

I have seen this yes, but unfortunately it still operates on a
per-server basis. I would have to reach out to every server and tell the
feedback agent to advertise itself as "in maintenance". The goal is to
be able to put the entire backend in maintenance, regardless of what the
status of the individual servers are.

This isn't that big of a deal. I currently have a haproxy controller
daemon which adjusts the haproxy.cfg (sets backend disable) and reloads.
I just like to avoid reloading as much as possible.

-Patrick


[Attachment #3 (text/html)]

<html>
  <head>
    <meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
  </head>
  <body smarttemplateinserted="true" bgcolor="#FFFFFF" text="#000000">
    <b>From: </b>Gabriel Sosa <a class="moz-txt-link-rfc2396E" \
href="mailto:sosagabriel@gmail.com">&lt;sosagabriel@gmail.com&gt;</a>  <div \
id="smartTemplate4-quoteHeader">  <div><b>Sent: </b> 2013-12-26 09:41:21 E</div>
      <div><b>To: </b>Patrick Hemmer <a class="moz-txt-link-rfc2396E" \
                href="mailto:haproxy@stormcloud9.net">&lt;haproxy@stormcloud9.net&gt;</a></div>
                
      <div><b>CC: </b><a class="moz-txt-link-abbreviated" \
href="mailto:haproxy@formilux.org">haproxy@formilux.org</a></div>  <div><b>Subject: \
</b>Re: disable backend through socket</div>  <br>
    </div>
    <blockquote
cite="mid:CABTgo4Zt=+QZw_9003_hdaDVbWyzPTzHEZajsWKg-4KkHHACZQ@mail.gmail.com"
      type="cite">
      <div dir="ltr"><br>
        <div class="gmail_extra"><br>
          <br>
          <div class="gmail_quote">On Mon, Dec 23, 2013 at 12:21 PM,
            Patrick Hemmer <span dir="ltr">&lt;<a
                moz-do-not-send="true"
                href="mailto:haproxy@stormcloud9.net" \
target="_blank">haproxy@stormcloud9.net</a>&gt;</span>  wrote:<br>
            <blockquote class="gmail_quote" style="margin:0px 0px 0px
              0.8ex;border-left:1px solid
              rgb(204,204,204);padding-left:1ex">
              <div bgcolor="#FFFFFF" text="#000000">
                <div class="im">
                  <blockquote type="cite">
                    <pre>On Sun, Dec 22, 2013 at 05:05:16PM -0500, Patrick Hemmer \
wrote: </pre>
                    <blockquote type="cite">
                      <pre>No. As I said, I want to disable the backend.
<a moz-do-not-send="true" \
href="http://cbonte.github.io/haproxy-dconv/configuration-1.5.html#4.2-disabled" \
target="_blank">http://cbonte.github.io/haproxy-dconv/configuration-1.5.html#4.2-disabled</a>
 </pre>
                    </blockquote>
                    <pre>That doesn't really work for backends since they don't \
decide to get traffic. At least if a config accepts to start with the "disabled"
keyword in a backend and this backend is referenced in a frontend, I
have no idea what it does behind the scenes. I'm not even sure the
backend is completely initialized.
</pre>
                  </blockquote>
                  <br>
                </div>
                Ah, ok. I can live with that :-)
                <div class="im"><br>
                  <br>
                  <blockquote type="cite">
                    <pre>What do you want to do exactly ? Do you just want to disable \
the health checks ? It's unclear what result you're seeking in fact.
</pre>
                  </blockquote>
                  <br>
                </div>
                I was just looking to disable backends without
                restarting the service. Nothing more. Nothing less.<br>
                Currenly when I want to disable a backend I just update
                the config and reload haproxy. Not a big deal. Was just
                hoping that since frontends and servers could both be
                enabled/disabled through the socket, that backends could
                too.<br>
                <br>
                The reason why I don't want to disable individual
                servers is that we have an automated process which
                enables &amp; disables servers. If a backend is
                disabled, then I don't want a server to automatically
                get enabled and start taking traffic. By disabling the
                backend, we prevent this scenario.<br>
                <br>
                <blockquote type="cite">
                  <pre>Willy
</pre>
                </blockquote>
                <br>
                Thank you<span class=""><font color="#888888"><br>
                    <br>
                    -Patrick<br>
                  </font></span></div>
            </blockquote>
          </div>
          <br>
          <br>
          Patrick,<br>
          <br>
          did you take a look to the load balancer feedback feature? [1]
          I think this might help you.<br>
          <br>
        </div>
        <div class="gmail_extra">Saludos<br>
        </div>
        <div class="gmail_extra"><br>
          [1] <a moz-do-not-send="true"
href="http://blog.loadbalancer.org/open-source-windows-service-for-reporting-server-lo \
ad-back-to-haproxy-load-balancer-feedback-agent/">http://blog.loadbalancer.org/open-so \
urce-windows-service-for-reporting-server-load-back-to-haproxy-load-balancer-feedback-agent/</a><br>
  <br>
        </div>
      </div>
    </blockquote>
    <br>
    I have seen this yes, but unfortunately it still operates on a
    per-server basis. I would have to reach out to every server and tell
    the feedback agent to advertise itself as "in maintenance". The goal
    is to be able to put the entire backend in maintenance, regardless
    of what the status of the individual servers are.<br>
    <br>
    This isn't that big of a deal. I currently have a haproxy controller
    daemon which adjusts the haproxy.cfg (sets backend disable) and
    reloads. I just like to avoid reloading as much as possible.<br>
    <br>
    -Patrick<br>
  </body>
</html>



[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic