DNS Clustering

hddweb

Verified User
Joined
Dec 2, 2004
Messages
27
Does anyone know how to setup a DNS cluster so that one website can access multiple servers which have different information (not load balancing)? Its kind of like an ImageStation site in that users can upload photos via the web. I have a rough idea but I'm not sure if its 100% accurate.

Based on what I've read, can someone tell me if this is all I need to do?

Theoretical Server 1 IP: 111.111.111.111
Theoretical Server 2 IP: 222.222.222.222

Go to my domain registrar, setup:
NS1.mydomain.com with 111.111.111.111
NS2.mydomain.com with 222.222.222.222

Login to my server's DirectAdmin, go to DNS Management -> mydomain.com:
Add A record:
NAME: ns2.mydomain.com | IP: 222.222.222.2222

-------------------------------------------------
Few questions that come to mind:
1) Do I need to do anything else with server 1 ?
2) Do I need to make any changes to server 2's configurations?
3) Do I need to install DirectAdmin on server 2?
4) Do I need to edit my upload script so that the server uploads files to the correct server based on their account #?

Thanks!
 
I'm not sure yet what you want to do.

DNS is run on the same physical server as your webhosting but it's a completely different service.

DA will automatically set up basic DNS services for your website, but that doesn't change the fact that the two services are completly independent.

Do you want to have each nameserver point to a different web server for the same domain name?

Do you want each of those webservers to have different content?
hddweb said:
Few questions that come to mind:
1) Do I need to do anything else with server 1 ?
That depends on what you want server1 to do.

You may also need to add an NS record, and or other records depending on your purpose.
2) Do I need to make any changes to server 2's configurations?
That depends on what you want server2 to do. At the very least it has to have A recorrds matching those of server1, including NS records and A records for for both ns1 and ns2.
3) Do I need to install DirectAdmin on server 2?
Again, that depends on what you want it to do. If all you want it to do is host DNS, then no. If you want it to host a website, then perhaps, depending on whether or not it's easier for you to setup your server yourself or use a control panel, and depending on whether or not you want to offer control panel services to your clients on server2.
4) Do I need to edit my upload script so that the server uploads files to the correct server based on their account #?
What uplload script? Of course you have to have your upload script upload content wherever you want that content. How you do that will depend entirely on what you're doing.

I'm sorry but I just don't have enough information to be able to even begin to figure out how to respond.

Jeff
 
Hey Jeff

Thanks for the quick reply. Let me try to clarify my situation:

Users login to our site, can see a list of their files and can upload files using their browser from their computer onto our server. However we're running out of HD space so we're looking to get a new one (cheaper then upgrading network + adding new HD). This new one is pretty much just a storage server for additional users and their files.

What I need is a solution so that this second server just acts like an expanded HD from server 1. The site will be hosted on server 1, but their file may be on server 1 or server 2. So I need to make it so when they login to our site their files will show up and when they upload, their file will go into the users folder which may be on either server depending on their account #.

In addition, when they share their photos with their friends, they'll give them a URL like "ourdomain.com/account#/filename.jpg". So basically I need ourdomain.com to be able to access both servers to display the users files correctly.
 
Two ways to do it; neither have anything at all to do with DNS, except that for method 2 you'll have to have DNS somewhere for the new domains/subdomains.

1) NFS. If it's installed on your first server you can find the manual at "man nfs". If it's not you'll have to do some googling. Note that NFS can be very insecure and you should only run it on private IP space with a second NIC on server #1. Probably easy to manage as drives/directories on server #2 can appear to be local as server #1.

2) Create a new webserver with it's own set of domains/subdomains (with or without DA, depending on your expertise). Then refer users (for upload or download) to those domains/subdomains.

Neither method is transparent; both will require a lot of rewriting of your site. My guess is that #1 will be a lot easier to implement.

Jeff
 
Back
Top