Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

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

I currently have my web app on a single cloud server. Been doing this for a few months now and I have EVERYTHING on this instance (app, cron scripts, mysql, svn, dev environment, etc).

The site is getting bigger now and I'm going to open up a new server instance. What is the best way to utilize this? I have a few options:

  1. Move my development environment over to the new instance along with production cron scripts (the scripts will do operations on the database). The production app and the database itself would still stay in the old server. This option will help minimize any accidental crashes to the production server if I want to do anything on the development server. But it won't be a pure production/development separation because I will still be running cron scripts and maybe thinking of hosting some static assets on the new instance (trying to utilize the most out of this setup).

  2. Move database over to the new instance. This seems like a standard option from the research I've done. But a few questions come to mind: What should be done about the dev/prod separation (do I even need to separate the two)? Static assets--keep in app server or the db server?

I can only afford the total of two servers for now. I would love to get 3, but this is what I have to work with in the meantime.

Thanks for your feedback!

share|improve this question

I doubt my response is 'standard', but another opinion might not hurt.

I would suggest using the second instance to try and attain high-availability. Use HAProxy to load balance between the two servers, and have a distributed filesystem (Gluster) for replicating files between the instances. Have each server monitor the other (e.g. Corosync/Heartbeat/Keepalived), and if one goes down, have the other take over, and launch a new instance. If you have been getting along so far with a single instance, it seems a waste to simply move the databases to one server, as it will probably not be fully utilized.

Essentially, my suggestion is full redundancy - that will split the load between the two servers. You could set the weights such that the 'primary' machine handles more web requests, and the 'secondary' machine handles more database requests, or just leave them equal.

I think the end result of this would be more beneficial than just offloading one aspect of the processing to another server, disproportionately using your servers, and having multiple points of failure.

As for the dev environment, I might suggest that is trickier. A dev environment on a production machine could potentially go wrong. (On the other hand, just keeping an SVN repository on it might not be as risky, if it is well secured).

share|improve this answer
What about just using the new server as a backup and dev environment? If I need more resources I can just scale up on the 1st server. This could make room for more flexibility in the future. – lamp_scaler Jul 12 '11 at 5:24
If that 'backup' can function as a failover then I'd say go for it - otherwise, it seems like a bit of a waste. (Of course companies have dedicated backup servers, but '2' is the limitation here.) If your 'site is getting bigger', removing the backups and dev may not offer a lot in terms of performance/scalability (unless your dev is very processor/memory intensive - but I expect a lot is done on a workstation, although separation is always good). A failover solution would help minimize 'accidental crashes' - even if you took down one server, the other should seamlessly take over the load. – cyberx86 Jul 12 '11 at 6:12
i would need to setup a load balancer for that sort of stuff, right? and that means a 3rd server? how does one implement a 2-server failover process? – lamp_scaler Jul 12 '11 at 7:12
You can run a load balancer (e.g. HAProxy) on both of the servers, such that if the first server fails, the second one takes over - you don't need a 3rd server. Most articles online do have the load balancers separate, but the theory applies just fine to combining them with the rest of the server. – cyberx86 Jul 12 '11 at 16:31

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.