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;








0















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?










share|improve this question






















  • What do you mean by frontend, a service, appliance or server?

    – NickW
    Feb 7 '14 at 12:39

















0















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?










share|improve this question






















  • What do you mean by frontend, a service, appliance or server?

    – NickW
    Feb 7 '14 at 12:39













0












0








0








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?










share|improve this question














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






share|improve this question













share|improve this question











share|improve this question




share|improve this question










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

















  • 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










1 Answer
1






active

oldest

votes


















0















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.






share|improve this answer























    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
    );



    );













    draft saved

    draft discarded


















    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









    0















    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.






    share|improve this answer



























      0















      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.






      share|improve this answer

























        0












        0








        0








        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.






        share|improve this answer














        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.







        share|improve this answer












        share|improve this answer



        share|improve this answer










        answered Feb 7 '14 at 14:22









        walkeranwalkeran

        1865




        1865



























            draft saved

            draft discarded
















































            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.




            draft saved


            draft discarded














            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





















































            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







            Popular posts from this blog

            How to write a 12-bar blues melodyI-IV-V blues progressionHow to play the bridges in a standard blues progressionHow does Gdim7 fit in C# minor?question on a certain chord progressionMusicology of Melody12 bar blues, spread rhythm: alternative to 6th chord to avoid finger stretchChord progressions/ Root key/ MelodiesHow to put chords (POP-EDM) under a given lead vocal melody (starting from a good knowledge in music theory)Are there “rules” for improvising with the minor pentatonic scale over 12-bar shuffle?Confusion about blues scale and chords

            What if the end-user didn't have the required library?What is setup.py?What is a clean, pythonic way to have multiple constructors in Python?What does Ruby have that Python doesn't, and vice versa?What is the reason for having '//' in Python?How do I create a namespace package in Python?How to package shared objects that python modules depend on?setuptools vs. distutils: why is distutils still a thing?Navigation in Windows 10 vs code not going to virtualenv library when the same library is installed at user levelPython create package for local usePackaging a project that uses multiple python versionsWhy is permission denied on pip install except for when “--user” is included at end of command?

            Why did Thanos need his ship to help him in the battle scene?Which actor plays Thanos in the Avengers mid-credits scene?Are there economic implications portrayed in comics where the buildings and cities are ruined almost daily?Old X-Men comic where team travels to alien world with a ring-like sun that needs recharging?Why does Ego need help sleeping?Is there an objective answer to who “the strongest Avenger” is?How did Banner get unstuck?Why did Thanos get hit?How did Thanos (or anyone) know the Infinity Stones would give him this power?Did Thanos leave Eitri alive for his after-sales service?In Avengers 1, why does Thanos need Loki?