Load balancing and high availability configuration

Discussion in 'HOWTO-Related Questions' started by enid, Sep 16, 2010.

  1. enid

    enid New Member

    Hello to all,

    I'm planning to implement a HA and LB system with Linux.
    The idea is to have for example 2 dns servers (or maybe 2 mail servers), and they can be accessed from outside with a single virtual ip, so that the system can do the balancing of the load between the 2 servers and also the failover procedure , so that if one server (or the service running on it) goes down the system redirects the requests to the other server.

    Can you recommend any package or sw on how to implement this scenario?

    Thanks
     
  2. matty

    matty Member

    The two scenarios you mention, DNS and email, don't really need a special load balance or HA setup as they have it built in. Just build as many servers as you need and make them available via DNS entries.

    That is, for DNS, when you put your glue records in at your registrar, make sure you put all your servers in. Also include them in the NS entries for all your zones. When other servers attempt to query your name servers, if one isn't available, they will try and query the other/s automatically.

    For email, you can load balance by making your MX records have the same weight, which will create a round robin style system. If one of your servers becomes unavailable, SMTP is designed such that connecting servers will try all servers that have MX records defined for the domain. For an example of load balancing mail with DNS, have a look at the MX records for hotmail.com. They also take things further by having multiple IP addresses per A record.

    If you are after HA and LB for other types of services, I believe there's some how-tos around here if you try a search.
     
  3. enid

    enid New Member

    Hi matty,
    Thanks for you reply.

    For the mail server the configuration is quite understandable and clear, doing the configuration at the application level, with the MX/CNAME records and multiple A records.

    But what about the DNS servers, is there any way to do load balancing at the application level, because declaring only the NS at the registrar we achieve only the HA function, so when the primary NS is down the secondary resolves the records. How can LB be achieved for dns-server (e.g bind) the same way as the mail server round robin config with the multiple A records.

    Also is there another way to achieve HA and LB not only on the application level, but at some lower abstraction (e.g ip level)?

    Thanks again,
    Enid
     
  4. matty

    matty Member

    Really, you won't need to load balance bind. If you have an additional bind instance that you want to load balance with, treat it like the others and make it directly available. Most people only use two nameservers because that's the minimum allowed in the RFC. You can use more if you want to. :)

    The main thing with bind is to use server class hardware. Modern processors, a couple of gig of RAM, and a decent (ie. not Realtek) NIC will serve hundreds of zones at a very high rate of requests per second.
     

Share This Page