Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I am looking for good practices for using load balancer haproxy.

There are few DNS records to the same haproxy server, haproxy has few backends with bunch of servers.

The question is what the best practice to manage few backend clusters:

  • 1st approach. On DNS server transfer all request to haproxy server IP port 80, and then on single common frontend routing traffic by using cal. This approach might became very complicated with even few backends, because for every backend we need to set acl.

  • 2st approach. On every single DNS record set the same haproxy server IP and different port for specific backend, then on haproxy set fronted for every IP:port interface. This approach seems like more simpler approach, but if there are any drawbacks.

What is the preferable solution for managing many backends on haproxy?

share|improve this question
    
There are a few DNS records ... ? What type of records? SRV? AAAA? see:en.wikipedia.org/wiki/List_of_DNS_record_types Second problem/personal peeve: You use the pronoun it, bad idea in "IP port 80 and then it" –  ArrowInTree Dec 25 '12 at 15:16
    
there are A records –  com Dec 25 '12 at 16:08
    
IP Port 80 is an application layer service aka Layer 7 in 7 layer network model. DNS is layer 3. Keeping these layers separate is VERY important. see this image:google.com/imgres?imgurl=http://www.lensenet.com/OSI_Model/… –  ArrowInTree Dec 25 '12 at 18:21
    
@ArrowInTree, Thank you very much for the comment, what does it mean in context of my problem, should I separate it by assigned port and make dedicated frontend for each backend? –  com Dec 25 '12 at 18:58
    
What I am trying to say is http is dependent on dns, unless you give an explicit address: eg <code>"127.0.0.1 "</code>. DNS is typically configured with a primary and a secondary server (google's eg 8.8.8.8 and 8.8.4.4). This should not require a failover on your part. What you do seem to need is forwarding or tunneling. Tunneling can be done with ssh. –  ArrowInTree Dec 25 '12 at 19:34

1 Answer 1

HAProxy is about the application layer, #7 in the 7 layer OSI model. DNS is below this level. DNS has its own scale up model: secondary servers. Google's DNS has a primary at 8.8.8.8 and a secondary at 8.8.4.4 . These addresses are very well know on the internet, so they do not need resolving. DNS for the record operates at level 4, Transport see this diagram: here

But HAProxy's documentation does mention bind, a DNS Server implementation, here.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.