Hey there! My name is Gunar. I’m a Software Development consultant from London. I’ve been a happy user of Hasura for many years now and I was happy to collaborate with Hasura for this blog post. We’ll be talking about managed Postgres cloud providers.
Hasura gives us instant realtime GraphQL & REST APIs on new and existing Postgres databases. While building a new application with Hasura, I have often had to go through the choices of which managed cloud provider to pick. This is a post that is meant to ease that decision making process where I compare some of the popular providers based on the vectors I have used for my clients.
That is, service providers that perform all maintenance tasks for us. These services allow us to have a reliable database on the cloud, without having to worry about applying updates, managing servers, and keeping a big infra team just to maintain our database layer.
We’re going to be looking at six cloud providers:
- Overall Comparison
- High Availability
- Postgres Versions
- Postgres Extensions
- Automated Backups
- Monitoring and Metrics
- Conclusion: Which provider should I pick?
Thought I’d start off with the comparison table right off the bat. And let you get a general overview before diving into the deets. As one might’ve expected, AWS is setting the bar, with GCloud and Azure tied for a close second. Then we have slightly simpler solutions like DigitalOcean, Heroku, and ElephantSQL—not too far behind either!
Databases are complex, multi-faceted creatures so we'll be looking at multiple characteristics. Which are auto-scaling, monitoring and metrics, costs, versions, extensions, backups, high availability, and security. If you really want to get a good picture of these services, I’d recommend diving in and reading each section.
I couldn't comment on the price as different providers offer different benefits. However, the costs section will give us an idea of how much a single server database might set us back with each of these providers.
- If you’re an indie hacker or small startup , a simpler solution like DigitalOcean, Heroku, or ElephantSQL might be a good fit. These providers have simpler cost structures and their offerings come in pre-defined packages.
- If you’re an enterprise company , you’ll want the stability and guarantees of big players such as AWS, GCloud, and Azure.
Might be good to remind you that Hasura and Hasura Cloud work with all providers.
|Monitoring and Metrics||✅||✅||✅||✅||⏺️||✅|
High Availability speaks to data redundancy, availability, and reliability. All providers offer this capability, through read-only followers and automatic failover.
As you can see below, most providers make the transition in the background so that you don’t have to tell the application layer to point to a new Postgres URL. All but Heroku. Heroku will update the environment variable DATABASE_URL for your Dynos automatically (which triggers a restart) but this obviously won’t work if you have services hosted on non-Heroku servers.
Also, quick shout out to the Azure team. They’ve taken High Availability one step further in simplifying and hiding the complexity away. For example, even the Single Server plan, in fact, stores “three copies of data within a region to ensure data redundancy, availability, and reliability.” So you get High Availability for the price of a single server and that’s pretty cool.
|Static IP/endpoint||Automatic failover|
Auto-scaling is a relatively new capability of managed databases. Currently AWS and Azure support auto-scaling of both the storage and server. Interestingly, Google Cloud doesn't support auto-scaling for Postgres yet.
- Auto-scaling storage means the provider will automatically provision more disk space as required by the database.
- Auto-scaling servers means the provider will automatically scale up the database, either vertically or horizontally. The most common operation is spinning up more read-only replicas, but beefing up the primary instance is possible too.
Auto-scaling is opt-in but make sure it's properly configured. Automatically-scaling capacity also automatically scales costs ;)
Head to https://hasura.io/blog/comparison-of-managed-postgresql-aws-rds-google-cloud-sql-azure-postgresql/ for the rest of the article!