View Poll Results: Have you ever tried to host websites through many webservers

1. You may not vote on this poll
  • Yes I did!

    1 100.00%
  • No, useless...

    0 0%
  • Never tought of...

    0 0%
Results 1 to 4 of 4
  1. #1
    Join Date
    Jun 2005
    Sherbrooke, Quebec, Canada

    Question Multiple www hosts howto?

    Hello there!

    I am wondering how could I span some of my premium user's websites to two servers (DNS and WWW). We have two independent servers so here is the setup running both CentOS 3.4.

    apache 1.3.x
    DirectAdmin Control pannel

    I would like to configure my main server as the primary, and set the DNS that if my server goes down, the second takes the relay until my servers is working again.

    I am sure it is a simple configuration within the dns daemon, how do I?

    Any hints?

  2. If you're doing this through a particular control panel, I can't help with anything but the theory.

    One machine is designated as the primary nameserver, e.g. NS1
    The other machine is desingated as the secondary nameserver, e.g. NS2

    Set BIND (or whatever DNS server you're using) up on one machine as authoritative for your list of domains on NS1. Bind is the ``master'' here.

    On NS2, setup bind as a ``slave'' for all of the particular domains.

    Every time changes are made to Ns1, they are copied to Ns2 (practically immediately if the serial changes, otherwise it's a period up to the TTL)
    All changes are made to the domains in NS1.

    All domains should have two NS records, one pointing at NS1 and one pointing at NS2. These nameservers should appear in the domain's zone file, as well as being registered with the domain registrar's.

    It's pretty standard that two nameservers are available, in fact most registrars forbid having just the one.

    If you want more specific information on DNS or Bind, I'd recommend the DNS&Bind book by O'Reilly. If you're looking for a control panel solution, then you'll need to approach or ask someone savvy enough with your particular control panel. You will probably need _some_ grounding in how the DNS system works though.


    Philip Reynolds
    Value for money dedicated servers
    at Rack365 -

  3. #3
    Join Date
    Jun 2005
    Sherbrooke, Quebec, Canada

    The real matter....

    Thank you for the response about it.

    But the real matter is that i would like to have a slave web server ... is it as easy as adding like second MX server?

    Here is the named record
    PHP Code:
    <? /*
    $TTL 14400
    @       IN      SOA (
                                                    86400 )                 14400   IN      NS     14400   IN      NS        14400   IN      A        14400   IN      A
    ftp     14400   IN      A     14400   IN      A
    localhost       14400   IN      A
    mail    14400   IN      A
    mysql   14400   IN      A
    ns1     14400   IN      A
    ns2     14400   IN      A
    pop     14400   IN      A     14400   IN      MX      10 mail
    smtp    14400   IN      CNAME
    ssh     14400   IN      CNAME
    ssl     14400   IN      CNAME
    webmail 14400   IN      CNAME
    www     14400   IN      CNAME
    Do you have any hint of how i should put into this the configuration to specify the DNS server that it exists a mirror of the site in the other server (the one that does the secondary DNS already )

    any hints?

    PS: I use DirectAdmin only to facilitate administration else, i know enough of server administration too...

    Thank you...

  4. Layer-4 Load balancing (at the IP level) is really the only solution here. Although DNS tricks may work some, really all you're doing is a round robin.

    DNS works for mail, because server software is clever and because MX's are weighted, which means they get priorities.

    You can still of course use:

    Code:          IN A       ip.addr.of.first          IN A       ip.addr.of.second
    But there's probably still the same (if not greater) chance that your site becomes unavailable, because if one server goes down, the site goes down for 50% of your clients.

    Round robin DNS never solves these problems. If you'd like a detailed explanation, I can give one, but take it from me that it isn't reliable, nor does it actually solve your problem.

    What you _actually_ need is a third machine to do monitoring of the two machines, and failover if the master happens to go down.

    You can do the above at Layer-4 (i.e. at the IP address level, which is completely seamless once setup, but more complicated) with IPVS and something like mon to monitor the machines to tell you when one is down.

    The other option is something at Layer-7 like pound. You run it on a third machine, and it listens on port 80 like a normal server and sends requests to the backend servers.

    There are out-of-the-box solutions which are expensive, but simply plug into your network with minimal setup and configuration. Cisco, Alteon, Foundry ... the list goes on. I'm not sure what the cheapest versions of these are going for these days, but Google should turn up plenty.

    In summary, it's gonna take a bit of work or a bit of cash to do what you're looking to do. However, it's possible your hosting provider may be able to help you out here.

    Philip Reynolds
    Value for money dedicated servers
    at Rack365 -

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts