Welcome to WebmasterWorld Guest from 54.197.94.141

Forum Moderators: phranque

Message Too Old, No Replies

How do you access master IP for a few web files in a DNS Round Robin?

   
6:54 pm on Feb 26, 2014 (gmt 0)

5+ Year Member



I have a DNS round robin setup for my website (VPS). Slave IP is replicated nightly from the master IP. I have a few XML files on the master that are updated at random times on some days that need to be accessible via the website.

For example I need to get access to:
http://www.mydomain.tld/xml_files/file1.xml
http://www.mydomain.tld/xml_files/file2.xml

From www.mydomain.com which is round robin on 111.111.111.111 (master) and 222.222.222.222 (slave)

The issue is that if you happen to land on the slave, the file1.xml may not be accessible until after the nightly replication when it receives file1.xml from the master.

The IP is shared for several websites, so hard coding the IP is not possible (I don't think). I've thought of making an DNS A RECORD subdomain to point to only one IP (ie. ww2.mydomain.com = 111.111.111.111), but that would essentially create a duplicate of the entire site under the ww2 subdomain (which is bad for search indexing purposes).

I have access to DNS and httpd.conf (and the full root), and I know I am missing something. Can someone point me in the right direction?
9:24 pm on Feb 26, 2014 (gmt 0)

5+ Year Member



Okay - I found a solution.

Setup DNS A RECORD for a non-existant subdomain pointed to master IP. Set master server to 301 ww2 to www.

This seems to make DNS point to the correct server, but no duplicate issues because it is rewritten on the server.

This does set up another issue that - cross-domain ajax calls aren't allowed. Oh well.