Haproxy 1.8 : Drain or Set Weight 0 - Layer 4 & layer 7 The 2019 Stack Overflow Developer Survey Results Are In Announcing the arrival of Valued Associate #679: Cesar Manara Planned maintenance scheduled April 17/18, 2019 at 00:00UTC (8:00pm US/Eastern) Come Celebrate our 10 Year Anniversary!Mitigate DDoS attack with HAProxyHAProxy - HTTP Server error detectionShould I use an ssl terminator or just haproxy?HAProxy URI balancing isn't very balancedhigh traffic websocket/haproxy tuningTransparent Proxy Issues w/ HAProxy Centos 7Haproxy 1.5x reload configuration without terminating layer 7 sessions?haproxy with SSL in front of apache for local developmentWhy is Haproxy hitting (variable) connection limits?Managing stage and live webapps (apache, haproxy, https redirection)
Keeping a retro style to sci-fi spaceships?
How does this infinite series simplify to an integral?
What was the last x86 CPU that did not have the x87 floating-point unit built in?
Mortgage adviser recommends a longer term than necessary combined with overpayments
Derivation tree not rendering
What can I do if neighbor is blocking my solar panels intentionally?
Did the UK government pay "millions and millions of dollars" to try to snag Julian Assange?
Is every episode of "Where are my Pants?" identical?
Typeface like Times New Roman but with "tied" percent sign
What information about me do stores get via my credit card?
Can withdrawing asylum be illegal?
Is it ok to offer lower paid work as a trial period before negotiating for a full-time job?
What's the point in a preamp?
Would it be possible to rearrange a dragon's flight muscle to somewhat circumvent the square-cube law?
Hopping to infinity along a string of digits
Create an outline of font
Is a pteranodon too powerful as a beast companion for a beast master?
RT6224D-based step down circuit yields 0V - why?
The following signatures were invalid: EXPKEYSIG 1397BC53640DB551
University's motivation for having tenure-track positions
How many people can fit inside Mordenkainen's Magnificent Mansion?
Who or what is the being for whom Being is a question for Heidegger?
Why can't devices on different VLANs, but on the same subnet, communicate?
Do working physicists consider Newtonian mechanics to be "falsified"?
Haproxy 1.8 : Drain or Set Weight 0 - Layer 4 & layer 7
The 2019 Stack Overflow Developer Survey Results Are In
Announcing the arrival of Valued Associate #679: Cesar Manara
Planned maintenance scheduled April 17/18, 2019 at 00:00UTC (8:00pm US/Eastern)
Come Celebrate our 10 Year Anniversary!Mitigate DDoS attack with HAProxyHAProxy - HTTP Server error detectionShould I use an ssl terminator or just haproxy?HAProxy URI balancing isn't very balancedhigh traffic websocket/haproxy tuningTransparent Proxy Issues w/ HAProxy Centos 7Haproxy 1.5x reload configuration without terminating layer 7 sessions?haproxy with SSL in front of apache for local developmentWhy is Haproxy hitting (variable) connection limits?Managing stage and live webapps (apache, haproxy, https redirection)
.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty height:90px;width:728px;box-sizing:border-box;
We have deployed multiple Haproxys TCP mode haproxy for the DB front and layer 7 haproxy for app front in production. I am looking for which is the best option to take one backend node out of traffic and do update/release/maintenance on applications. either I use Set server state Drain or set weight 0 which one will be effective and useful to slowly redirect all the clients connection to the other backends for app with out breaking and redirect all tcp connections as well ?
also let me know whats meant by persistent connections ?
haproxy
New contributor
SAGAR Nair is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
add a comment |
We have deployed multiple Haproxys TCP mode haproxy for the DB front and layer 7 haproxy for app front in production. I am looking for which is the best option to take one backend node out of traffic and do update/release/maintenance on applications. either I use Set server state Drain or set weight 0 which one will be effective and useful to slowly redirect all the clients connection to the other backends for app with out breaking and redirect all tcp connections as well ?
also let me know whats meant by persistent connections ?
haproxy
New contributor
SAGAR Nair is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
add a comment |
We have deployed multiple Haproxys TCP mode haproxy for the DB front and layer 7 haproxy for app front in production. I am looking for which is the best option to take one backend node out of traffic and do update/release/maintenance on applications. either I use Set server state Drain or set weight 0 which one will be effective and useful to slowly redirect all the clients connection to the other backends for app with out breaking and redirect all tcp connections as well ?
also let me know whats meant by persistent connections ?
haproxy
New contributor
SAGAR Nair is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
We have deployed multiple Haproxys TCP mode haproxy for the DB front and layer 7 haproxy for app front in production. I am looking for which is the best option to take one backend node out of traffic and do update/release/maintenance on applications. either I use Set server state Drain or set weight 0 which one will be effective and useful to slowly redirect all the clients connection to the other backends for app with out breaking and redirect all tcp connections as well ?
also let me know whats meant by persistent connections ?
haproxy
haproxy
New contributor
SAGAR Nair is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
New contributor
SAGAR Nair is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
New contributor
SAGAR Nair is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
asked Apr 9 at 4:22
SAGAR NairSAGAR Nair
1084
1084
New contributor
SAGAR Nair is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
New contributor
SAGAR Nair is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
SAGAR Nair is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
add a comment |
add a comment |
1 Answer
1
active
oldest
votes
Use Drain.
That prevents new sessions being directed to the backend in question, however existing sessions will still be directed to that backend. Hence you should wait a reasonable amount of time for users to end their session (depending on the type of workload this could be a couple of minutes up to a day).
This of course is assuming that you have sticky sessions configured in haproxy, so that a user will always be directed to the same backend. If this is not the case, then it makes no difference if you use weight 0 or drain.
Persistent connections are connections that stay open. If you want to use those, then ensure that haproxy timeouts are long enough to cater to those connections; otherwise haproxy may close a connection that is still in use (but idle).
thanks for the excellent answer, btw do u have any links to official documentation to backup your answer so I can make document for my team with that link too. Moreover, I am using the admin page GUI of the haproxy to set drain, and use socket to set weight 0 since its unavailable in GUI. so is there any way we can add our custom commands like "set weight 0" to the haproxy admin GUI page ? please share if u know how to do this.
– SAGAR Nair
Apr 10 at 4:29
add a comment |
Your Answer
StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "2"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);
else
createEditor();
);
function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader:
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
,
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);
);
SAGAR Nair is a new contributor. Be nice, and check out our Code of Conduct.
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fserverfault.com%2fquestions%2f962132%2fhaproxy-1-8-drain-or-set-weight-0-layer-4-layer-7%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
Use Drain.
That prevents new sessions being directed to the backend in question, however existing sessions will still be directed to that backend. Hence you should wait a reasonable amount of time for users to end their session (depending on the type of workload this could be a couple of minutes up to a day).
This of course is assuming that you have sticky sessions configured in haproxy, so that a user will always be directed to the same backend. If this is not the case, then it makes no difference if you use weight 0 or drain.
Persistent connections are connections that stay open. If you want to use those, then ensure that haproxy timeouts are long enough to cater to those connections; otherwise haproxy may close a connection that is still in use (but idle).
thanks for the excellent answer, btw do u have any links to official documentation to backup your answer so I can make document for my team with that link too. Moreover, I am using the admin page GUI of the haproxy to set drain, and use socket to set weight 0 since its unavailable in GUI. so is there any way we can add our custom commands like "set weight 0" to the haproxy admin GUI page ? please share if u know how to do this.
– SAGAR Nair
Apr 10 at 4:29
add a comment |
Use Drain.
That prevents new sessions being directed to the backend in question, however existing sessions will still be directed to that backend. Hence you should wait a reasonable amount of time for users to end their session (depending on the type of workload this could be a couple of minutes up to a day).
This of course is assuming that you have sticky sessions configured in haproxy, so that a user will always be directed to the same backend. If this is not the case, then it makes no difference if you use weight 0 or drain.
Persistent connections are connections that stay open. If you want to use those, then ensure that haproxy timeouts are long enough to cater to those connections; otherwise haproxy may close a connection that is still in use (but idle).
thanks for the excellent answer, btw do u have any links to official documentation to backup your answer so I can make document for my team with that link too. Moreover, I am using the admin page GUI of the haproxy to set drain, and use socket to set weight 0 since its unavailable in GUI. so is there any way we can add our custom commands like "set weight 0" to the haproxy admin GUI page ? please share if u know how to do this.
– SAGAR Nair
Apr 10 at 4:29
add a comment |
Use Drain.
That prevents new sessions being directed to the backend in question, however existing sessions will still be directed to that backend. Hence you should wait a reasonable amount of time for users to end their session (depending on the type of workload this could be a couple of minutes up to a day).
This of course is assuming that you have sticky sessions configured in haproxy, so that a user will always be directed to the same backend. If this is not the case, then it makes no difference if you use weight 0 or drain.
Persistent connections are connections that stay open. If you want to use those, then ensure that haproxy timeouts are long enough to cater to those connections; otherwise haproxy may close a connection that is still in use (but idle).
Use Drain.
That prevents new sessions being directed to the backend in question, however existing sessions will still be directed to that backend. Hence you should wait a reasonable amount of time for users to end their session (depending on the type of workload this could be a couple of minutes up to a day).
This of course is assuming that you have sticky sessions configured in haproxy, so that a user will always be directed to the same backend. If this is not the case, then it makes no difference if you use weight 0 or drain.
Persistent connections are connections that stay open. If you want to use those, then ensure that haproxy timeouts are long enough to cater to those connections; otherwise haproxy may close a connection that is still in use (but idle).
answered Apr 9 at 8:55
wurtelwurtel
2,923512
2,923512
thanks for the excellent answer, btw do u have any links to official documentation to backup your answer so I can make document for my team with that link too. Moreover, I am using the admin page GUI of the haproxy to set drain, and use socket to set weight 0 since its unavailable in GUI. so is there any way we can add our custom commands like "set weight 0" to the haproxy admin GUI page ? please share if u know how to do this.
– SAGAR Nair
Apr 10 at 4:29
add a comment |
thanks for the excellent answer, btw do u have any links to official documentation to backup your answer so I can make document for my team with that link too. Moreover, I am using the admin page GUI of the haproxy to set drain, and use socket to set weight 0 since its unavailable in GUI. so is there any way we can add our custom commands like "set weight 0" to the haproxy admin GUI page ? please share if u know how to do this.
– SAGAR Nair
Apr 10 at 4:29
thanks for the excellent answer, btw do u have any links to official documentation to backup your answer so I can make document for my team with that link too. Moreover, I am using the admin page GUI of the haproxy to set drain, and use socket to set weight 0 since its unavailable in GUI. so is there any way we can add our custom commands like "set weight 0" to the haproxy admin GUI page ? please share if u know how to do this.
– SAGAR Nair
Apr 10 at 4:29
thanks for the excellent answer, btw do u have any links to official documentation to backup your answer so I can make document for my team with that link too. Moreover, I am using the admin page GUI of the haproxy to set drain, and use socket to set weight 0 since its unavailable in GUI. so is there any way we can add our custom commands like "set weight 0" to the haproxy admin GUI page ? please share if u know how to do this.
– SAGAR Nair
Apr 10 at 4:29
add a comment |
SAGAR Nair is a new contributor. Be nice, and check out our Code of Conduct.
SAGAR Nair is a new contributor. Be nice, and check out our Code of Conduct.
SAGAR Nair is a new contributor. Be nice, and check out our Code of Conduct.
SAGAR Nair is a new contributor. Be nice, and check out our Code of Conduct.
Thanks for contributing an answer to Server Fault!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fserverfault.com%2fquestions%2f962132%2fhaproxy-1-8-drain-or-set-weight-0-layer-4-layer-7%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown