What is the best model for load balancing with multiple services in haproxy? The 2019 Stack Overflow Developer Survey Results Are In Unicorn Meta Zoo #1: Why another podcast? Announcing the arrival of Valued Associate #679: Cesar Manara Come Celebrate our 10 Year Anniversary!haproxy: adding tcplog parametersHAProxy, health checking multiple servers with different host namesKeepalive best practices for Nginx-Haproxy-Apache chainHaproxy load balancing for download hostHAProxy: multiple frontends, same bindhaproxy server check %[dst_port]DNS Load-Balancing with HAPROXYHAProxy in front of logstash broken pipeHAProxy multiple certificates error on first callhaproxy ACL - how to route traffic based on destination port or address
Is it ok to offer lower paid work as a trial period before negotiating for a full-time job?
Why not take a picture of a closer black hole?
Did the new image of black hole confirm the general theory of relativity?
Match Roman Numerals
How to handle characters who are more educated than the author?
How to politely respond to generic emails requesting a PhD/job in my lab? Without wasting too much time
How to make Illustrator type tool selection automatically adapt with text length
Would an alien lifeform be able to achieve space travel if lacking in vision?
Is it ethical to upload a automatically generated paper to a non peer-reviewed site as part of a larger research?
Student Loan from years ago pops up and is taking my salary
Is 'stolen' appropriate word?
What information about me do stores get via my credit card?
60's-70's movie: home appliances revolting against the owners
How did passengers keep warm on sail ships?
Circular reasoning in L'Hopital's rule
Sub-subscripts in strings cause different spacings than subscripts
Can each chord in a progression create its own key?
Store Dynamic-accessible hidden metadata in a cell
Are spiders unable to hurt humans, especially very small spiders?
Keeping a retro style to sci-fi spaceships?
Is there a way to generate uniformly distributed points on a sphere from a fixed amount of random real numbers per point?
Why doesn't shell automatically fix "useless use of cat"?
Can the Right Ascension and Argument of Perigee of a spacecraft's orbit keep varying by themselves with time?
What do I do when my TA workload is more than expected?
What is the best model for load balancing with multiple services in haproxy?
The 2019 Stack Overflow Developer Survey Results Are In
Unicorn Meta Zoo #1: Why another podcast?
Announcing the arrival of Valued Associate #679: Cesar Manara
Come Celebrate our 10 Year Anniversary!haproxy: adding tcplog parametersHAProxy, health checking multiple servers with different host namesKeepalive best practices for Nginx-Haproxy-Apache chainHaproxy load balancing for download hostHAProxy: multiple frontends, same bindhaproxy server check %[dst_port]DNS Load-Balancing with HAPROXYHAProxy in front of logstash broken pipeHAProxy multiple certificates error on first callhaproxy ACL - how to route traffic based on destination port or address
.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty height:90px;width:728px;box-sizing:border-box;
The options I can think of are:
1) Have multiple frontends each with a different port.
2) Have multiple frontends each with a different hostname but the same port.
3) Have a single frontend with the same hostname and same port using ACLs to route based on URI
We have currently got 12 distinct services (micro services) that we'd like to load balance. It may grow a bit.
What are the compelling reasons to choose any of these approaches?
haproxy
add a comment |
The options I can think of are:
1) Have multiple frontends each with a different port.
2) Have multiple frontends each with a different hostname but the same port.
3) Have a single frontend with the same hostname and same port using ACLs to route based on URI
We have currently got 12 distinct services (micro services) that we'd like to load balance. It may grow a bit.
What are the compelling reasons to choose any of these approaches?
haproxy
What do you mean by frontend, a service, appliance or server?
– NickW
Feb 7 '14 at 12:39
add a comment |
The options I can think of are:
1) Have multiple frontends each with a different port.
2) Have multiple frontends each with a different hostname but the same port.
3) Have a single frontend with the same hostname and same port using ACLs to route based on URI
We have currently got 12 distinct services (micro services) that we'd like to load balance. It may grow a bit.
What are the compelling reasons to choose any of these approaches?
haproxy
The options I can think of are:
1) Have multiple frontends each with a different port.
2) Have multiple frontends each with a different hostname but the same port.
3) Have a single frontend with the same hostname and same port using ACLs to route based on URI
We have currently got 12 distinct services (micro services) that we'd like to load balance. It may grow a bit.
What are the compelling reasons to choose any of these approaches?
haproxy
haproxy
asked Feb 7 '14 at 11:07
Tom DuckeringTom Duckering
19512
19512
What do you mean by frontend, a service, appliance or server?
– NickW
Feb 7 '14 at 12:39
add a comment |
What do you mean by frontend, a service, appliance or server?
– NickW
Feb 7 '14 at 12:39
What do you mean by frontend, a service, appliance or server?
– NickW
Feb 7 '14 at 12:39
What do you mean by frontend, a service, appliance or server?
– NickW
Feb 7 '14 at 12:39
add a comment |
1 Answer
1
active
oldest
votes
1) Have multiple frontends each with a different port.
To me, this just seems a little sloppy. Lumping multiple web services onto one IP address with different ports only seems useful to me if you don't have the IP addresses to spare (in which case you probably have other issues)
2) Have multiple frontends each with a different hostname but the same port.
This seems like the best choice to me. Have each frontend bind to a different IP address, and then each using the appropriate backend(s).
3) Have a single frontend with the same hostname and same port using ACLs to route based on URI
This would also work, but remember that if you have a single frontend, they'll end up sharing some resources. For instance, if you set a "maxconn" parameter on the frontend, and then there are many concurrent connections to one of the services, requests for the other services could end up getting queued.
Ultimately, I think it really comes down to how much in common the separate frontends have with each other, and if you want their connection limits to be shared. If the services are all tightly knit, and function nearly identically, you might choose #3, but if they aren't really related, I think #2 would be your best bet. At the very least, you can get them set up on individual IPs now, and have a frontend that binds to multiple IP addresses, so it's easy to split it into multiple frontends later on down the road.
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
);
);
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%2f573924%2fwhat-is-the-best-model-for-load-balancing-with-multiple-services-in-haproxy%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
1) Have multiple frontends each with a different port.
To me, this just seems a little sloppy. Lumping multiple web services onto one IP address with different ports only seems useful to me if you don't have the IP addresses to spare (in which case you probably have other issues)
2) Have multiple frontends each with a different hostname but the same port.
This seems like the best choice to me. Have each frontend bind to a different IP address, and then each using the appropriate backend(s).
3) Have a single frontend with the same hostname and same port using ACLs to route based on URI
This would also work, but remember that if you have a single frontend, they'll end up sharing some resources. For instance, if you set a "maxconn" parameter on the frontend, and then there are many concurrent connections to one of the services, requests for the other services could end up getting queued.
Ultimately, I think it really comes down to how much in common the separate frontends have with each other, and if you want their connection limits to be shared. If the services are all tightly knit, and function nearly identically, you might choose #3, but if they aren't really related, I think #2 would be your best bet. At the very least, you can get them set up on individual IPs now, and have a frontend that binds to multiple IP addresses, so it's easy to split it into multiple frontends later on down the road.
add a comment |
1) Have multiple frontends each with a different port.
To me, this just seems a little sloppy. Lumping multiple web services onto one IP address with different ports only seems useful to me if you don't have the IP addresses to spare (in which case you probably have other issues)
2) Have multiple frontends each with a different hostname but the same port.
This seems like the best choice to me. Have each frontend bind to a different IP address, and then each using the appropriate backend(s).
3) Have a single frontend with the same hostname and same port using ACLs to route based on URI
This would also work, but remember that if you have a single frontend, they'll end up sharing some resources. For instance, if you set a "maxconn" parameter on the frontend, and then there are many concurrent connections to one of the services, requests for the other services could end up getting queued.
Ultimately, I think it really comes down to how much in common the separate frontends have with each other, and if you want their connection limits to be shared. If the services are all tightly knit, and function nearly identically, you might choose #3, but if they aren't really related, I think #2 would be your best bet. At the very least, you can get them set up on individual IPs now, and have a frontend that binds to multiple IP addresses, so it's easy to split it into multiple frontends later on down the road.
add a comment |
1) Have multiple frontends each with a different port.
To me, this just seems a little sloppy. Lumping multiple web services onto one IP address with different ports only seems useful to me if you don't have the IP addresses to spare (in which case you probably have other issues)
2) Have multiple frontends each with a different hostname but the same port.
This seems like the best choice to me. Have each frontend bind to a different IP address, and then each using the appropriate backend(s).
3) Have a single frontend with the same hostname and same port using ACLs to route based on URI
This would also work, but remember that if you have a single frontend, they'll end up sharing some resources. For instance, if you set a "maxconn" parameter on the frontend, and then there are many concurrent connections to one of the services, requests for the other services could end up getting queued.
Ultimately, I think it really comes down to how much in common the separate frontends have with each other, and if you want their connection limits to be shared. If the services are all tightly knit, and function nearly identically, you might choose #3, but if they aren't really related, I think #2 would be your best bet. At the very least, you can get them set up on individual IPs now, and have a frontend that binds to multiple IP addresses, so it's easy to split it into multiple frontends later on down the road.
1) Have multiple frontends each with a different port.
To me, this just seems a little sloppy. Lumping multiple web services onto one IP address with different ports only seems useful to me if you don't have the IP addresses to spare (in which case you probably have other issues)
2) Have multiple frontends each with a different hostname but the same port.
This seems like the best choice to me. Have each frontend bind to a different IP address, and then each using the appropriate backend(s).
3) Have a single frontend with the same hostname and same port using ACLs to route based on URI
This would also work, but remember that if you have a single frontend, they'll end up sharing some resources. For instance, if you set a "maxconn" parameter on the frontend, and then there are many concurrent connections to one of the services, requests for the other services could end up getting queued.
Ultimately, I think it really comes down to how much in common the separate frontends have with each other, and if you want their connection limits to be shared. If the services are all tightly knit, and function nearly identically, you might choose #3, but if they aren't really related, I think #2 would be your best bet. At the very least, you can get them set up on individual IPs now, and have a frontend that binds to multiple IP addresses, so it's easy to split it into multiple frontends later on down the road.
answered Feb 7 '14 at 14:22
walkeranwalkeran
1865
1865
add a comment |
add a comment |
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%2f573924%2fwhat-is-the-best-model-for-load-balancing-with-multiple-services-in-haproxy%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
What do you mean by frontend, a service, appliance or server?
– NickW
Feb 7 '14 at 12:39