Skip to content

Hosting Options#

Now that we've had a taste for database engines, SQLite, SQL, and MySQL, let's explore the options available to use with regards to hosting a database.

The advice I give all my clients is: don't host the database yourself if you can help it. Get someone else to do it.

But why is that? And how can someone else host the database for you?

SaaS#

We will cover SaaS - "Software as a Service" - in the chapter on Cloud Computing, but for now, understand that SaaS simply means: someone else hosts, manages, updates, secures, backs up, and more, a single piece of software and then sells access to it.

There are SaaS providers of database engines. Many, many providers, in fact. We're going to be using just one later on in this book: AWS Relational Database Service, or more commonly, AWS RDS.

Relational Database Service#

Amazon Web Services (AWS) provides hosted database engines via RDS so that you don't have to host and manage them yourself. For a reasonable (depending on your use case) hourly fee, you can get a fully managed, replicated, automatically backed up MySQL, MariaDB, PostgreSQL, Oracle, and Microsoft SQL Server.

RDS also offers Aurora, a database engine compatible with MySQL or PostgreSQL (but not at the same time), which is, in essence, highly optimised versions of those database engines designed to run in the Cloud.

Advantages#

The advantages to using RDs include, but are certainly not limited to:

  • Next to zero management overhead for you
  • Automatic backups
  • Easy, always available data recovery
  • Security is taken care of at the engine level
  • Upgrades to the engine are handled for you
  • Engine level maintenance is done for you

And more.

All of the above are expensive to do yourself because they require two key things: skills and time. And when you're want to consume the time of an engineer who has expert level skills, then you're going to need a lot of money (hundreds of thousands, even millions, of dollars depending on your needs.)

Also, you don't want to handle all that workload, even if you enjoy it. And businesses don't want you doing that neither. If you can simply pay someone else to manage all of that, your time can be spent elsewhere, in areas that cannot or have not been automated (yet).

Disadvantages#

Of course, RDS isn't perfect. None of the managed, hosted database SaaS services you'll find are. This is primarily due to:

  • Region restrictions, as it might not be available everywhere
  • Price: this can be a big one
  • Features, as not every feature of the engine might be available
  • Speed can be an issue, depending on your workload
  • Data volume, as a lot of data might not be feasible

And so on.

RDS isn't perfect for all use cases.

Summary#

The reason I wanted to briefly cover this idea is because I never recommend anyone self-manages a database. They are, by definition, hyper-critical systems given they literally contain all of your data. With that in mind, what would happen if it should fail, get deleted, hacked, etc., because of a misconfiguration or a lack of backups you thought were working?

It's not worth it. Pay someone else to host it for you.

Next#

Next we have the section project work.