Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Here is the current set up (in a nutshell).

The site is set up with a wildcard subdomain, so * is accessible. Clients can then domain map their own domains with an A record to the server IP address and it will translate the to appropriate * with re directions and env variables in htaccess.

Everything is working perfect... but now comes the problem.

The site has grown larger than a single DQC Xeon server can handle at peak times. Looking at cloud options seems tempting, but clients are pointing their domains to a single IP address with the A record (our server).

Now, this was probably bad planing from the start, but the question is, if this was to be done today, how would we set it up so that clients use a CNAME perhaps to point their domains to our server rather than an A record. And, if that is not possible for the root domain, how can we then use multiple IP addresses on our side to translate the incoming http request?

Complex enough? Hope I've explained it well!

share|improve this question
up vote 0 down vote accepted

Without getting into too much detail, why not off-set that common IP to a load-balancer and then put your work-horses behind it? That'll help you scale a bit without losing that traffic. Let me know if you need more explanation.

Edit: If your clients are always typing in that IP from memory, there won't be a lot you can do to switch them to a domain. As I mentioned, your best bet will to be to incorporate that IP into a load-balancer. Should be the 'easiest' way.

share|improve this answer
No one is typing in the IP from memory, just setting the A record in the zone file ... so that's okay. Now for the load balancer, I have no experience with those... I know there are many options out there. Right now our setup is standard LAMP on Centos 5.5 64-bit. Any suggestions? – Joe Jan 9 '11 at 19:02
My apologies for the confusion. Not sure where I got that idea from. Your best bet would be to explore HAProxy I've used it a couple of times. Your mileage may very. You'll probably need at least 2 load-balancers, lest one go down and render your work-horses inaccessible. – Publiccert Jan 9 '11 at 19:05
I found a better link(that incorporates HAProxy) at (Howtoforge)[… – Publiccert Jan 9 '11 at 19:09
How would you handle sessions? Our site is a photo purchasing site which does not require people to login. So what we do is keep track of cart details using php sessions. I could move all that to memcache or some other distributed system (since we use memcache extensively already). That way when a person adds an item to their cart, if they are moved to another worker box, they will still maintain the same items if they look in their cart again. Would that work with HA Proxy? – Joe Jan 9 '11 at 19:09
To accomplish that, you're going to probably want replicated/redundant DB servers. – Publiccert Jan 9 '11 at 19:11

How about putting a load balancer in front? One IP, multiple servers sharing load, and allows you to easily add more servers? Could be some as simple as a server running ipvs to dedicated load balancer hardware.

share|improve this answer
Looks like two answers with the same suggestion... I think I like this .. I can then just have those clients update the zone file once the move happens. Really to be honest, the site is very easy to split up... so a machine that does x and one that does y and another for z makes total sense for the site. It's just getting from where we are now to that ... – Joe Jan 9 '11 at 19:05
The advantages with the load balancer over messing with DNS are: 1. You can keep the same ip, move the current server to a new ip and have the load balancer listen to on it's ip. 2. You get a certain amount of redundancy, if one server fails, the others should be able to take the load automagically. Don't forget that the Load Balancer could still be a single point of failure though! – Niall Donegan Jan 9 '11 at 19:10
Of course! Always got to think of the failure points! Another reason to go this route... currently, one large server.. when it's down, the whole show closes! – Joe Jan 9 '11 at 19:26

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.