Turbo Charge your Website with a VPS Database
July 27, 2009 by Jason-Mulreany · Leave a Comment
In a previous post Is Shared Hosting killing your website? I talked about how shared hosting can damage your website mostly because of slow database response times.
We have devised a simple but effective solution to this problem – put your website database on a fast VPS (Virtual Private Server) which is configured as a database server. You can purchase an entry level VPS from €99 per anum which is a small price to pay to retain your customers and protect your investment in your website.
Why split my website over shared hosting and a VPS?
You may be tempted to run your entire website on your VPS since you are going to the expense of purchasing one anyway. Yes if you do this you could end up with an even faster website than if you split your website. However, it is a lot more complicated to setup and manage an entire web server than it is to manage a database server (which is set-and-forget once it is running). You will need to install a web server, mail server, FTP server, anti-spam software to name a few and manage all those resources.
If you leave your website on your shared hosting control panel you let the hosting company worry about all these things for you. They deal with the mail serving and the security and all those other problematic areas. With our split solution you get the benefits of a faster website without the headache of managing an entire web server.
Who can benefit from a VPS Database?
Here are just a few examples of web systems that will get a serious speed boost from setting up a VPS Database Server.
- Content Management Systems – WordPress, Drupal, Joomla etc.
- E-Commerce Systems – Magento, ZenCart, OSCommerce etc.
- Forums – PHPBB, bbPress, WP-Forum etc.
These systems mostly run on the LAMP architecture (Linux, Apache, MySQL, PHP) which accounts for a large proportion of the applications powering the web today. However, the VPS Database solution works just as well for Windows-based hosting with SQL Server databases but it is beyond the scope of this post.
Monitoring Your Database
One added bonus of a VPS Database Server is that you can monitor your database server and if you see utilisation is too high or response times are low you can take action to resolve it. On shared hosting you have no visibility into your database performance whatsoever. With a VPS Database you can also track your website traffic and analytics against your database utilisation to plan for when you need to upgrade your server. You are in control.
Shared Hosting and VPS with your existing hosting company
You probably want to know if you should purchase your VPS from your existing hosting provider or should you go elsewhere. It is important to have your shared hosting and your VPS with the same hosting company. There are a couple of reasons:
- Speed - it will be faster if your website can access its database locally rather than having to go across the Internet to access it. You are setting up this solution to speed up your website so don’t add unnecessary lag times by splitting your website across two service providers.
- Filters / firewalls – you have no control over your hosting providers’ networks. Should they decide to filter or firewall the database ports (i.e. block access to database from outside their network) your website will stop working. This is the main reason you need to keep your shared hosting and VPS with the one provider as both are on the same network and will be able to communicate.
- Accountability - anyone who has ever dealt with multiple service providers will know there is a tendency to ‘pass the buck’ if there is a problem. If you split your website over two providers, you may find that neither wishes to take responsibility if you are having a problem. If both shared hosting and VPS are with the one provider they are entirely accountable.
Of course if you are not happy with your hosting company or they do not provide the VPS solution you require you can move your shared hosting to a new provider that meets all of your needs.
Ordering Your VPS
Here are the things to consider when purchasing your VPS.
- Traffic - with your website have an even amount of traffic or will it experience massive traffic spikes as a result of promotions or email marketing campaigns. Some providers offer a ‘burst mode’ that gives you extra resources temporarily.
- Size - most web databases tend to be relatively small but if yours is large or contains a lot of legacy data you may want to factor that in when you are ordering your VPS.
- Growth - if you have plans to radically increase your website size or traffic volumes plan for that extra capacity.
- Upgrading - check if the hosting company allows you to easily upgrade your VPS to a larger/faster one if you need to. Some providers may not let you upgrade until your contract term expires so read the small print.
What To Install on your VPS Database Server
You want your VPS Database Server to be lean, fast and responsive. That means you should install the absolute bare minimum on the server and don’t be tempted to add a web server, FTP server or any other packages that you just don’t need. It will be faster and more secure if it is left as a pure database server.
Your VPS should be presented to you with nothing installed apart from the basic Operating System you have ordered – our preferred operating system is CentOS. We recommend you install the following only:
- MySQL Server – this is your database server.
- SNMP – this is a network management protocol that will enable you to monitor your server remotely (note: do not install server monitoring software on the VPS, run it remotely!!)
- Webmin – this is the web management console for your server. That allows you to manage your server and your databases via web browser.
That’s it! Nothing else is needed. You now have a lean, mean database server reading to turbo charge your website!
What Next?
That depends on the applications you are using. If you are using a content management system all you have to do is put your website in maintenance mode, back up your database, set up your database on your Virtual Database Server and point your site to the new database. It’s generally very straightforward. Just make sure to have a good backup of your database and a plan to restore your original website in case of any unforeseen difficulties.
Assistance Setting Up Your VPS Database Server
We can work with you to set up your VPS Database Server. We can advise you on what to buy, we can set up the server for you, assist you with your website database migration and provide ongoing support for your database server. Call Jason Mulreany on 087-6692719 or email jason@mulreany.ie to find out more.
