Should your web site database have its own dedicated server?

Published: March 15th, 2017

It comes down to security and reliability.  Should your web site be on one server (or a cluster of servers) and your database be on its own dedicated server (or servers)?  What are the pros and cons?  Is it worth the expense?  We shall delve into these business-critical questions in this article.

Dedicated Databases for Secure Web hosting

Lets look at the security and reliability impact of the various common configuration choices.

Shared Hosting

In a shared hosting environment, generally, your web site and database are hosted on the same server as the web sites and databases of many other businesses (and hackers…?) unknown to you and outside of your control.

Pros

  • Price: Very inexpensive!

Cons

  • Performance 1:  The resources of your server can be consumed by other organizations in a way that you can not control.  If other organizations are using the server hard, then there will be fewer resources available for you. Your site will run much slower than it otherwise would.  And, as we all know, slower site speed means fewer sales and more dissatisfied users.
  • Performance 2: As your own web site and database share the same server resources (disk usage, memory, CPU), your database and web site will run slower than they would if they did not share resources with each other.  Again, this leads to slower performance … especially if your site is busy or complex.
  • Security 1: As your server is shared with other organizations, there is a greatly increased risk of unauthorized access to the server.  This could be from employees of other organizations or from hackers targeting other organizations.  It could also be due to poor (security) choices made by anyone of these other organizations … choices that permit attackers to access or exploit system vulnerabilities and gain full access to your code, credentials, and data.
  • Security 2: If there should be unauthorized access to your server, that also provides direct access to your entire database, as it is also located on the compromised server.  All of your data will be there for the taking.  Furthermore, since your web site code is also there, attackers can often get all of the credentials they need to defeat database encryption or protections that you may have set up.
  • Traffic: Shared hosting is not good for sites that receive a lot of traffic for the performance reasons given above.

Dedicated Hosting: 1 Server

Putting your web site and database on a single dedicated server is the next level up after shared hosting.  Dedicated web hosting is vastly better than shared; however as we shall see, it is not the ideal for security or reliability.

Pros

  • Price: Moderate price point compared to the other non-shared options discussed below.
  • Performance 1:  Your resources are dedicated to you.  You are not sharing with other organizations and thus your performance is not going to vary by factors unrelated to your own site.
  • Security 1: Similarly, being dedicated insulates your site and data from being impacted by intrusions or breaches though other organizations’ web sites or due to other peoples’ poor security choices.   Isolation of your resources is critical for compliance. It is absolutely required PCI compliance, and it goes a long way to helping you meet HIPAA-compliance requirements.
  • Traffic: You can choose a dedicated sever powerful enough to handle your expected web site traffic.

Cons

  • Performance 2: As your own web site and database share the same server resources (disk usage, memory, CPU), your database and web site will run slower than they would if they did not share resources with each other.  Again, this leads to slower performance … especially if your site is busy or complex.
  • Security 2: If there should be unauthorized access to your server, that also provides direct access to your entire database, as it is also located on the compromised server.  All of your data will be there for the taking.  Furthermore, since your web site code is also there, attackers can often get all of the credentials they need to defeat database encryption or protections that you may have set up.

Dedicated Hosting: Separate Web and Database Servers

Putting your web site and database on a separate dedicated server is provides much better security and performance.

Pros

  • Performance 1:  Your resources are dedicated to you.  You are not sharing with other organizations and thus your performance is not going to vary by factors unrelated to your own site.
  • Performance: 2: Now that your web site and database use independent resource pools, everything can be faster.  Complex, disk and CPU-intensive database queries will not slow independent web site requests.  Hard-hitting web site accesses and downloads will not slow your database operations.  You will likely have more resources and much less resource contention.
  • Security 1: Similarly, being dedicated insulates your site and data from being impacted by intrusions or breaches though other organizations’ web sites or due to other peoples’ poor security choices.   Isolation of your resources is critical for compliance. It is absolutely required PCI compliance, and it goes a long way to helping you meet HIPAA-compliance requirements.
  • Security 2: You can have your database server locked down so that access to it is extremely limited.  Your most vulnerable point is your web server.  Should your web server be compromised, the information in your database is much safer.  Unless the attacker gleans your database access credentials from the web server and then seeks to access and exfiltrate data from there,  that server will generally remain uncompromised, even if your web site itself is hacked, malware is installed, or data exfiltrated.  It is extremely difficult to completely protected your data, but though segregation, you achieve a much higher level of safety.

Cons

  • Price: This generally costs 50-100% more than just getting a dedicated web plus database server.
  • Reliability: You still have single points of failure.

Dedicated Clusters

When uptime, security, and performance are paramount, the next levels is a dedicated cluster.  In this scenario:

  1. You have 2+ web servers setup with load balancing.
  2. You have a separate main database server that these web servers use.
  3. You optionally set up additional database servers to distribute query load or to provide master/slave failover if needed.

Once you start thinking about clusters, everything is custom and a function of what resources your application needs, what traffic levels you anticipate, what your tolerance for down time is, and what your budget is.  Things can grow in expense quickly.  Setting up a few failover load-balanced web servers plus one database server is not very expensive and it does provide a higher level or load and fault tolerance.  Failover databases, geographic replication, dedicated hardware load balancers, etc., … these can cause the price to quickly rise.

Which solution is right for you?

To figure out the best solution for your web site, you should ask the following questions:

  1. Do I have specific compliance requirements?
  2. How much traffic will by site receive?  What resources do I really need to handle that?
  3. What sensitive information will be stored?  E.g. usernames, passwords, personal information, confidential information, corporate secrets, protected health information (PHI), etc.
  4. How important is it that my site be always up and performing well?  E.g., if being offline will cost you lots of money in sales … then it is worth it to invest in a solution that will be very resilient.
  5. If I have a choice of dedicated server types … should I invest in more expensive ones that have built-in hardware redundancy (e.g. so that they are unlikely to be offline due to hardware issues)?
  6. What can I afford to spend?

Once you have answers to these questions, review the above pros and cons and contact your preferred hosting vendor to find your optimal solution and price point.

Leave a Comment


You must be connected or logged in to post a comment. This is to reduce spam comments.

If you have not previously commented, you can connect using existing social media account, or register with a new username and password.