hosted by liquidweb


Go Back   Web Hosting Talk : Web Hosting Main Forums : VPS Hosting : Separate your VPS website and database
Reply

VPS Hosting Virtual private server discussion and vps hosting solutions. Review VPS hosting providers and offer advice on virtual web hosting solutions. If your service is unavailable, please click here.
Forum Jump

Separate your VPS website and database

Reply Post New Thread In VPS Hosting Subscription
 
Send news tip View All Posts Thread Tools Search this Thread Display Modes
  #1  
Old 10-21-2011, 03:45 PM
markpringle markpringle is offline
Junior Guru Wannabe
 
Join Date: Jul 2011
Location: Atlanta Area
Posts: 99

Separate your VPS website and database


One of my websites is a well-established, eight year old community that has good traffic with 4+GB of bandwidth (no video – just data) a day, 8-9000 visits, and 110,000 page views a day (and growing). Just recently I purchased two VPS accounts for this website: one to host my very active MS SQL Server 2008 R2 Web Edition database, and another for my website. My new hosting provider (I’ll review them after a few months) created a private network for me between the two so that speed was not diminished.

By hosting your database on a different server you prevent your website from having to share its bandwidth, input/output, and other CPU resources. Also, you can keep the database server lean and mean (minimize the Windows junk services, control panels, etc) so the power is dedicated to SQL Server. There’s also a security benefit. If the website server is hacked, the database is not immediately in danger.

Now there is a drawback. Cost! You are paying for two VPS accounts. However, if the VPS hosting provider is good, they will consolidate some of the costs and setup fees, etc. For instance, if there is a management fee per VPS, they may only charge for one VPS while maintaining two.

Now, this is the first time I’ve taken this approach with a VPS (Shared hosting providers do this all the time). So, if you have any other insights, benefits, or drawbacks with this approach, I’d be interesting in hearing what they are.

__________________
I like to design and build websites, not admin servers. www.mpringle.com


Last edited by markpringle; 10-21-2011 at 03:56 PM.
Reply With Quote


Sponsored Links
  #2  
Old 10-21-2011, 04:12 PM
raindog308 raindog308 is offline
Web Hosting Master
 
Join Date: Jul 2010
Posts: 704
Quote:
Originally Posted by markpringle View Post
By hosting your database on a different server you prevent your website from having to share its bandwidth, input/output, and other CPU resources. Also, you can keep the database server lean and mean (minimize the Windows junk services, control panels, etc) so the power is dedicated to SQL Server. There’s also a security benefit. If the website server is hacked, the database is not immediately in danger.

Now there is a drawback. Cost!
This is commonly done. But there are other drawbacks:
  • now you have two VPSes to patch, backup, administer, etc.
  • in the case of Windows, you now have to pay for more licenses
  • you may need a big box for your database VPS box, and so you buy a same-sized or bigger package, but you don't need the bandwidth that goes with it (since that's all going out through your web server). That bandwidth goes to waste.

This is not to say it's a bad idea. Not at all. In larger environments it's very common to have a couple DB servers (which are kept in sync) and an array of web servers in front of them.

__________________
VPSadvice.com - my forum and advice on VPS companies

Reply With Quote
  #3  
Old 10-21-2011, 04:29 PM
markpringle markpringle is offline
Junior Guru Wannabe
 
Join Date: Jul 2011
Location: Atlanta Area
Posts: 99
Quote:
Originally Posted by raindog308 View Post
  • now you have two VPSes to patch, backup, administer, etc.
  • in the case of Windows, you now have to pay for more licenses
  • you may need a big box for your database VPS box, and so you buy a same-sized or bigger package, but you don't need the bandwidth that goes with it (since that's all going out through your web server). That bandwidth goes to waste.
Yeah, you do have to administer two boxes. As far as the "waste", this is an issue since many things that you are NOT going to use on the database box are usually already built into the price of the VPS; things like disk space, bandwidth, a web server, etc. I wish VPS providers would consider that and price database only boxes accordingly.

__________________
I like to design and build websites, not admin servers. www.mpringle.com

Reply With Quote
Sponsored Links
  #4  
Old 10-21-2011, 04:54 PM
kpmedia kpmedia is offline
Web Host Reviewer
 
Join Date: Feb 2006
Location: Kepler 62f
Posts: 9,515
Cost should be relative to the site.
A small blog is worth $5.
A huge site is worth $50 or even $500, if you're doing things properly.

__________________
|| Need a good host?
|| See my Suggested Hosts List || New Guide: How to Install fail2ban with CSF/LFD on cPanel
||

Reply With Quote
  #5  
Old 10-21-2011, 05:38 PM
markpringle markpringle is offline
Junior Guru Wannabe
 
Join Date: Jul 2011
Location: Atlanta Area
Posts: 99
Quote:
Originally Posted by kpmedia View Post
Cost should be relative to the site.
A small blog is worth $5.
A huge site is worth $50 or even $500, if you're doing things properly.
It is.
Small blog goes with shared hosting = $5 - 30
Big site goes with VPS = $90 - 200
Huge site goes with dedicated server = $300+

Reply With Quote
  #6  
Old 10-21-2011, 07:54 PM
gate2vn gate2vn is offline
Web Hosting Master
 
Join Date: Oct 2003
Location: Hanoi
Posts: 4,292
Yes, I see that all the time. Usually, a database server uses less space than a web server. However, a database server should have better disk speed than a normal web server. So, if you go that route, you might want to work out a customized plan with your provider (that we do for our customers when needed), not just ordering 2 VPS, then connect them together.

For management charge, even database vps is using less space, even no bandwidth, cause it's connected private only, your host still needs to manage 2 separate systems. Even with different tasks. Optimizing a web server is not the same with optimizing a database server

Quote:
Originally Posted by markpringle View Post
Yeah, you do have to administer two boxes. As far as the "waste", this is an issue since many things that you are NOT going to use on the database box are usually already built into the price of the VPS; things like disk space, bandwidth, a web server, etc. I wish VPS providers would consider that and price database only boxes accordingly.

__________________
Clustered CloudLinux Hosting | WordPress Hosting | Advanced Antispam | Managed Xen VPS
in US West coast and Asia datacenters with Asia-Pacific friendly networks

Free migration to our servers. Contact us now on Twitter @vietnap

Reply With Quote
  #7  
Old 01-05-2012, 08:07 AM
prim3geek prim3geek is offline
Junior Guru Wannabe
 
Join Date: Dec 2011
Posts: 42
great

i am very much interested in this setup, but i have a question. I have my own dedicated server.

1) Is it a good idea to create a vps for database only on the same server or its much better if its hosted on a different server.

2) Will it affect performance?

3) What about the resources, should it be equal to the website vps resources? lets say vps of my website is 100gb space, 2gb ram, 1000gb bandwidth how much should i put on the database only vps?

4) Do i need a panel for this database only vps? like lets say cpanel for easier installation and file management or i can do the installation of the mysql software via SSH alone?

5) Is it hard to setuo this database vps?

thanks i would be so much happier if someone could help me.

Reply With Quote
  #8  
Old 01-05-2012, 08:27 AM
gate2vn gate2vn is offline
Web Hosting Master
 
Join Date: Oct 2003
Location: Hanoi
Posts: 4,292
1. It depends on your server hardware. Is it strong enough for VPS?
2. Again, depends on your server hardware
3. As stated above, database vps is usually using less space than web, you can create smaller space
4. I prefer no-control panel model, but it depends on your skills
5. Not hard

__________________
Clustered CloudLinux Hosting | WordPress Hosting | Advanced Antispam | Managed Xen VPS
in US West coast and Asia datacenters with Asia-Pacific friendly networks

Free migration to our servers. Contact us now on Twitter @vietnap

Reply With Quote
  #9  
Old 01-05-2012, 08:40 AM
prim3geek prim3geek is offline
Junior Guru Wannabe
 
Join Date: Dec 2011
Posts: 42
@gate2vn

1) My server is xeon 8gb ram, what if its lower specs? is it a good idea if its in the same server or better if its in a separate server?

Reply With Quote
  #10  
Old 01-05-2012, 08:42 AM
gate2vn gate2vn is offline
Web Hosting Master
 
Join Date: Oct 2003
Location: Hanoi
Posts: 4,292
How many disk drives do you have? Any sort of raid? Depends on your websites, but 8GB is in low-side for VPS node. I usually create web, db vps on separate hardware, not on the same one.

__________________
Clustered CloudLinux Hosting | WordPress Hosting | Advanced Antispam | Managed Xen VPS
in US West coast and Asia datacenters with Asia-Pacific friendly networks

Free migration to our servers. Contact us now on Twitter @vietnap

Reply With Quote
  #11  
Old 01-05-2012, 08:56 AM
prim3geek prim3geek is offline
Junior Guru Wannabe
 
Join Date: Dec 2011
Posts: 42
i have 2x500gb raid 1 for data redundancy.

what do you mean by "8GB is in low-side for VPS node"

i only create 7 VPS on my server. 7 VPS is my maximum number.

Reply With Quote
  #12  
Old 01-05-2012, 08:58 AM
gate2vn gate2vn is offline
Web Hosting Master
 
Join Date: Oct 2003
Location: Hanoi
Posts: 4,292
raid1 will be not strong enough. For our VPS nodes, we use 8 HDDs in raid10. In your case, it would be better to install everything on it as a standalone server, not separating to multiple vps.

__________________
Clustered CloudLinux Hosting | WordPress Hosting | Advanced Antispam | Managed Xen VPS
in US West coast and Asia datacenters with Asia-Pacific friendly networks

Free migration to our servers. Contact us now on Twitter @vietnap

Reply With Quote
  #13  
Old 01-05-2012, 09:15 AM
Motiv Motiv is offline
Web Hosting Master
 
Join Date: Apr 2005
Location: US
Posts: 814
Quote:
Originally Posted by markpringle View Post
One of my websites is a well-established, eight year old community that has good traffic with 4+GB of bandwidth (no video – just data) a day, 8-9000 visits, and 110,000 page views a day (and growing). Just recently I purchased two VPS accounts for this website: one to host my very active MS SQL Server 2008 R2 Web Edition database, and another for my website. My new hosting provider (I’ll review them after a few months) created a private network for me between the two so that speed was not diminished.

By hosting your database on a different server you prevent your website from having to share its bandwidth, input/output, and other CPU resources. Also, you can keep the database server lean and mean (minimize the Windows junk services, control panels, etc) so the power is dedicated to SQL Server. There’s also a security benefit. If the website server is hacked, the database is not immediately in danger.

Now there is a drawback. Cost! You are paying for two VPS accounts. However, if the VPS hosting provider is good, they will consolidate some of the costs and setup fees, etc. For instance, if there is a management fee per VPS, they may only charge for one VPS while maintaining two.

Now, this is the first time I’ve taken this approach with a VPS (Shared hosting providers do this all the time). So, if you have any other insights, benefits, or drawbacks with this approach, I’d be interesting in hearing what they are.
This is a very standard approach in the Windows (and even Linux) hosting world. What you are doing is a cookie cutter type setup, but until your application grows more it will suit.

Your next step would be to introduce another web VM and then network load balancing to balance the load over those two VMs. Then you could also consider MS SQL replication or even an MS SQL cluster for redundancy on that end.

__________________
Expert Hosting Consultant - High Availability, FISMA, PCI, HIPAA
Windows / Linux / Managed Services
rjohnson@blackmesh.com
www.windowsconsultant.net

Reply With Quote
  #14  
Old 01-05-2012, 10:15 AM
Flapadar Flapadar is online now
Premium Member
 
Join Date: Jun 2011
Location: Aberdeen
Posts: 2,131
It's a common route for ensuring your data is kept online. For example, if the front-end VPS fails (Gets attacked, exploited, etc) you can simply hot-swap the frontend.

Reply With Quote
  #15  
Old 01-05-2012, 11:03 AM
Ivraatiems Ivraatiems is offline
Junior Guru Wannabe
 
Join Date: Nov 2011
Posts: 87
I run a small gaming group, and we've always kept our VPS/gameservers separate from our webhosting, which is just your standard reseller webhosting. I think it's definitely a good idea, because while we've had VPS issues in the past (and "slashdotted" effects from being linked to by websites more prominent than ours which have brought one or the other service down), we rarely go completely offline.

However, we don't have dedicated hardware - we just split services. Our overall costs per month are still pretty low, generally, though.

Reply With Quote
Reply

Similar Threads
Thread Thread Starter Forum Replies Last Post
Separate email and website hosting sblugh Web Hosting 7 01-01-2007 03:16 PM
Adding separate database server for WebPages Blueheaven Hosting Security and Technology 4 10-14-2005 01:06 AM
Help setting up a separate server for Vbulletin database (mysql) LucasVN Hosting Security and Technology 3 03-20-2005 06:51 PM
Need help with setting up accounts/database on separate hard drives ushkand Dedicated Server 0 08-28-2004 09:45 PM
Separate mySQL database server for hosting clients? RackNine Running a Web Hosting Business 13 12-09-2003 08:41 PM

Related posts from TheWhir.com
Title Type Date Posted
Samsung Ventures Backs Cloudant Database as a Service Web Hosting News 2013-02-08 14:10:26
Cloudant Reports Major Growth in Database as a Service Revenue Web Hosting News 2013-01-28 18:36:32
Amazon Adds RDS, DynamoDB Services to GovCloud Offering Web Hosting News 2012-12-24 12:18:51
Cloud Host Savvis Extends Cloud-Based Database Platform to European Customers Web Hosting News 2012-10-12 11:06:37
Website Tools Provider Zoho Launches Website Builder with Free Hosting Web Hosting News 2013-02-25 10:27:39


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes
Postbit Selector

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Forum Jump
Login:
Log in with your username and password
Username:
Password:



Forgot Password?
Advertisement:
Web Hosting News:



 

X

Welcome to WebHostingTalk.com

Create your username to jump into the discussion!

WebHostingTalk.com is the largest, most influentual web hosting community on the Internet. Join us by filling in the form below.


(4 digit year)

Already a member?