Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

To host web sites currently we are using dedicated linux boxes hosted in the UK. But managing them is a nightmare, backups, massive loads, downtime etc...

I was looking into OpenStack which was developed by RackSpace. Would it be possible to use a cloud platform that we host on our servers to host websites?

I understand that the a cloud platform allows you to expand your infrastructure, which is exactly what we need. But how do we use it to run MySQL and Apache? For mostly Wordpress sites?

Edit: The sites are just normal Wordpress sites using a standard LAMP stack.

share|improve this question
1  
This entirely depends on how your websites are architected. It can't be answered as you currently have it worded other than saying "Maybe." –  Bart Silverstrim Oct 3 '11 at 12:36
    
If you want to host all the sites in one server, you will have to use virtual hosts in your apache configuration in order to route the content properly, or use another server like nginx. I don't really get your question though, everything that you put under /var/www will be served by your servers ip address or mapped domain name. Can you elaborate? –  Chris-Top Oct 3 '11 at 13:34
    
@Chris-Top virtual hosts has got nothing to do with Cloud computing... Using virtual hosts is what I'm doing at the moment on 20 different dedicated servers running over 200 websites. I'm talking about a scalable system where new machines can be added with no configuration to the "cloud" and then add to the redundancy and load for the websites. –  David Maitland Oct 3 '11 at 14:47

3 Answers 3

up vote 4 down vote accepted

Most 'cloud' providers give you IaaS. That means that you get a set of virtual machines that you're free to manage at will. In short, these are just VPS services, with the added facility of an API to create new servers when you want. Sometimes you can tie that API to some simple metrics (CPU load, traffic, etc), making it a little easier.

But it's not magic. It won't make your site scalable without work on your part. What you have to do is to design your system so that you can add more (similar) machines to distribute load and that it can survive the loss of some of those machines.

The first steps are:

  • a 'shared nothing' web app: make sure all pages are as stateless as possible. Any persistency between HTTP requests must be stored non-locally. Initially, that means everything 'critical' must go to a database, and anything non-critical to something like memcached.

  • a load balancer, fault-tolerant distributor. Either provided by the hosting, or your own (HAProxy, varnish, NginX) running in front of your apps (be sure to make it redundant too).

  • a replicated database. for example, MySQL in a master/slave and some failover mechanism that migrates a 'floating' IP number to the slave if the master fails. or a master/master, that can also give you some extra throughput at the expense of latency. Amazon also gives you a MySQL-compatible database with all the redundancy you're likely to need. Or go to something completely different, like riak, cassandra... in fact, this is the most difficult part; but just replicating MySQL on two bigger instances goes a long way; especially if you're smart on the cache layer.

share|improve this answer
    
Thats exactly the answer I was looking for, I think I'm going to group websites in which they have their own mysql master/slave. I have used HAProxy before, so that as well and apache web server instances to serve the content. –  David Maitland Oct 3 '11 at 14:52

It sounds like what you are looking for is Platform as a service, or PaaS. With PaaS, the provider takes care of all the operational details. Deploying your application can be as simple as providing the provider a URL to your source code repository.

Some that support PHP are

Here is a comparison of the three products, written by the developers of each.

share|improve this answer
    
no, I have the infrastructure (servers, networks), I just need ideas on how to manage the infrastructure then use it to reliably host websites. –  David Maitland Oct 5 '11 at 9:36
    
Sorry, somehow I missed when you said "that we host on our servers". –  sciurus Oct 5 '11 at 15:43

You can do quite a few things in the cloud. I'll go into specifics about what my provider supports. I use Linode (http://www.linode.com/) which has six datacenters around the globe (including one in London). They're great, afforably priced, have a large set of features, and are very fast on the support ticket turnaround time. A "Linode" is virtual machine you purchase (their terminology).

Linode's cloud-based infrastructure supports provisioning and deprovisioning "Linodes" on the fly. This means if you need a machine to play around with for an hour/day/week/month/year you pay for just what you use.

Linode supports what are called StackScripts which allow you to automate the process by which you can provision a server. I don't know the details but AFAIk you can specify the OS, disk layout, swap in config files, etc.

Linode also has an extensive API for billing, provisioning etc.

Linode also support load balancing in the form of a NodeBalancer.

These four features linked together can allow you to setup something like the following:

You have say a Linode for Web "stuff" such as Apache/PHP and a Linode for MySQL. If you have everything set up correctly you could have scripts that monitor the resource usage on your machines and automatically purchase, provision, boot, and add it to your MySQL cluster or NodeBalancer automatically. This means that if you get a huge spike in traffic (say you're slashdotted) you'll automatically scale to whatever you need to meet the traffic/processing/bandwidth/whatever requirements. You would have a MySQL cluster replicating back and forth keeping however many MySQL servers in sync, then you'd have a bunch of web servers balancing the PHP load.

Linode also provides quite a bit of redundancy as far as IP failover, as well as bandwidth pooling, IPv6, etc. I'd also like to say I'm in no way affiliated with Linode, just a happy customer.

share|improve this answer

Your Answer

 
discard

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.