×
Community Blog Friday Blog - Week 21 - Choosing The Right RDS Or PolarDB Database Instance

Friday Blog - Week 21 - Choosing The Right RDS Or PolarDB Database Instance

Confused by all the different database instance choices when setting up RDS or PolarDB (but especially RDS)? Wondering when you should go "do-it-yours.

By Jeremy Pedersen

Welcome back! This is the 21st installment in our Friday blog series. This week, we take a look at how to choose the right database system on Alibaba Cloud.

We'll start by dealing with a few common complaints that architects and engineers have when considering running database workloads on the cloud.

One last thing before we jump in: this blog post is about choosing how to run your database, NOT how to choose the right type of database (Oracle? MySQL? PostgreSQL?). Sorry, but with more than 300 database systems in active use according to the DB-Engines Rankings, that's just too big a subject for one blog post!

We'll focus mostly on Alibaba Cloud's RDS and PolarDB services, which support common relational database engines like MySQL and Microsoft SQL Server. Ok, let's get started!

Common Complaints

My team is busy and we have a lot of ECS instances to set up already, why should we devote a lot of time to thinking about how we run our database workloads?

Because where and how you run your databases will become critical in the future, as the complexity of your applications increases and your user base grows.

Making the right database decisions today could save you hours, weeks, or even months of headaches in the future.

Using Alibaba Cloud's computing services like ECS or ECI is pretty easy. Why are Alibaba Cloud's database products so complex?

Because there are so many tradeoffs to consider when setting up a new database system on Alibaba Cloud. Is redundancy more important, or cost? What about performance? Do you need local SSD disks (better performance) or standard SSD disks (better redundancy)? The list goes on...

Ok, fine, so this is important...how do I choose?

You're in luck! I'll be breaking it down and providing you with a handy chart to help you make your decision!

Making The Choice

Ok, so you're sure you want to run your database on the cloud, but where do you start?

1. Self-managed, or Cloud Native?

The first and biggest choice you'll need to make is whether you want to use a managed service like RDS or PolarDB, or whether you want to build something yourself on ECS.

I want to do it all myself

OK! If you go this route, what are the pros and cons?

Pros:

  1. Full control over every aspect of your database: you can even tune your operating system to support your preferred database software better.
  2. Full control over what type of hardware your database is run on: need special hardware like FPGAs or GPUs to implement some complex, proprietary indexing scheme? No problem.

Cons:

  1. Expensive.
  2. You have to manage backup and recovery on your own.
  3. Higher maintenance workload (OS and database system patching, handling failover, redundancy, and more).

Bottom line: If you have special requirements and/or a dedicated DBA to help you with setup and tuning, then building your own database can make sense. If not, you're better off going Cloud Native. In either case, read on!

If you do decide to go the self-built route, check out my blog post on choosing the right ECS instance. It includes a nice flowchart that can get you pointed in the right direction.

Alternatively: If you want a managed database system and customizability, check out Alibaba Cloud MyBase. This combines some of the advantages of a managed database system with some of the advantages of doing it all yourself.

Cloud Native

When I say "Cloud Native" what I really mean is PaaS (Platform as a Service). This means database services that manage the underlying operating system and database engine for you, freeing you up to focus on managing your actual data. On Alibaba Cloud, that mostly means ApsaraDB for RDS and ApsaraDB for PolarDB.

There are major differences between RDS and PolarDB, but let's start with the general pros and cons.

Pros

  1. Lower operations & maintenance workload (no need to tune the DB engine, or apply OS upgrades or patches).
  2. Built-in High Availability (HA), with a strong Service Level Agreement (SLA).
  3. Built-in tools for automatic backup.
  4. Faster startup time (go from "zero" to "working database" in a few minutes).
  5. Easier scale up / scale down (especially with PolarDB).

Cons

  1. More limited hardware selection (no GPU or FPGA-equipped instances).
  2. Limited or no ability to tune database parameters or make OS-level changes.

Bottom line: Unless you need to run a database engine which Alibaba Cloud doesn't support with RDS or PolarDB, or you need strong customizability, you're usually better off with a Cloud Native database. This is especially true if your core business is about something other than managing database stuff! Why focus on database administration when you could be "wowing" your customers with your awesome products?

Good, Fast, Cheap: Pick Any Two

As with most system architecture decisions, you'll have to make tradeoffs between speed, price, and reliability when choosing a database system. Engineers sometimes sum this up with the phrase "good, fast, cheap, pick any two" and it's a personal favorite of mine, because it applies so consistently!

Rather than go into exhaustive detail, I have created this handy chart to help you out a little:

choosing_db

The Sum-up

I know this seems like a lot, so let me try to distill this down to just four key tradeoffs:

  1. Self-built (ECS / MyBase), or managed service (RDS/PolarDB)?
  2. Scalability (PolarDB), or cost (RDS)?
  3. Guaranteed CPU/disk performance (Dedicated Instance), or lower costs (General-purpose Instance)?
  4. Extreme disk performance (Local SSD), high performance (Enhanced SSD), or average performance (Standard SSD)?

Note that #4 only applies if you chose "RDS" at step #2.

That's it! Hopefully this chart speeds you on your way to choosing the right database system! See you next week. ^_^

I've Got A Question!

Great! Reach out to me at jierui.pjr@alibabacloud.com and I'll do my best to answer in a future Friday Q&A blog.

You can also follow the Alibaba Cloud Academy LinkedIn Page. We'll re-post these blogs there each Friday.

Not a LinkedIn person? We're also on Twitter and YouTube.

0 0 1
Share on

JDP

36 posts | 43 followers

You may also like

Comments