Jump to content

Nameservers


The Little Guy

Recommended Posts

If I want to run a website from more than one server, so if I have one web host, and someone else has another host, can I add that to the name servers?

 

Say his are:

ns57.1and1.com

ns58.1and1.com

 

and mine are:

NS1.DREAMHOST.COM

NS2.DREAMHOST.COM

NS3.DREAMHOST.COM

 

Will that work, so we can split the traffic? Or, how can we spit traffic what will be the best way to do that?

Link to comment
Share on other sites

To be honest I don't think you are going to be able to do that with a shared hosting account.  This can be done via apache but not dns. About the only thing you can do with dns is have a nameserver located in a different location but it wouldn't split traffic as the master would only update the slave with the A records and cnames.

 

You may want to look into mod_proxy and mod_proxy_balancer for load balancing. Here is a simple example.

 

vhost

<VirtualHost *:80>
  ServerAdmin you@yourdomain.com
  ServerName www.domain.com
  ServerAlias domain.com
  ProxyPass / balancer://domaincluster/
  ProxyPassReverse / balancer://domaincluster/
  ErrorLog /path/to/apache_error_log
  CustomLog /path/to/apache_access_log combined
  <Location /balancer-manager>
    SetHandler balancer-manager
    #make sure to protect this
  </Location>
</VirtualHost>

 

simple cluster

 

<Proxy balancer://domaincluster>
  BalancerMember http://member1.domain.com 
  BalancerMember http://member2.domain.com
  BalancerMember http://member3.domain.com
</Proxy>

 

Now in your zone file you would want A records for memeber1,2 and  3 with them pointing to different machines. Also you could tell the load balancer to double the load on one or more by adding loadfactor=2 after the BalancerMemeber domain.

 

 

 

Link to comment
Share on other sites

The Proxy balancer which tom suggested is the easiest way - however the proxy will have to handle ALL the traffic.

 

Little Guy: As you initially suggested, you can use nameservers to give you a "round robin" effect when serving a website. Typically you will see:

www.website.com can have 2 A addresses. I.e.:

 

www.website.com    A    ip.address.of.server1

www.website.com    A    ip.address.of.server2

 

This record will have to be added to all of the nameservers where www.website.com is currently held.

 

-steve

 

 

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.