Choosing a web hosting database and determining how and where you’ll manage it are among the most important decisions any company can make. An open source strategy like Postgres is the first choice for many developers for reasons that we’ve blogged about before. But when it comes to hosting Postgres, there are a number of different paths to take. We’ll go over some of the options here.
What is database hosting?
Database hosting can refer to the environment where your database resides, and it can also refer to the provider managing it.
Self-hosting sounds like what it is–you install, configure, and manage your database yourself. It’s self-supported, so you’re 100% responsible.
A self-hosted database can be a good choice for small companies. Especially when combined with technical support like EDB Community 360 and enhanced open source tools. But managing Postgres on your own can be time consuming and can be a drain on your resources.
When it comes to managed service vs self service databases, managed services, or database-as-a-service (DBaaS), is when you purchase your web hosting database from a hosting provider and let the provider manage it. You don’t have to worry about the Postgres software or the hardware, which can be a huge plus.
Why is database hosting important?
Your database needs a place to live and room to grow, and the data on your database needs to be secured, managed and optimized. Hosting takes all these factors into account.
Where and how you host your database is important because it determines who is responsible for the administration and maintenance of your database and what happens in the event of a failure. In other words, will you get a call at 3 am when your database is down, or will someone else work to ensure that doesn’t happen?
Questions to consider for hosting databases
As you determine where to host your database, you’ll want to establish the following:
- If you want to run Postgres on one computer
- The size of your database(s)
- If you plan to scale your database
- If you’ll be sharing the data in Postgres with others
- What type of roles will you need in Postgres
- If your data needs to be available 24/7
- How distributed will the database be
- If you’re ok with managing your database and performing upgrades
- How you’ll handle data security
- What your budget can support
- If you want to leverage the cloud
Scalability, cost, performance, management complexity… you’ll want to thoroughly review all of these factors to determine the best solution for your needs.
Read more about hosting your database on prem vs cloud.
5 ways to host PostgreSQL
There are a number of different ways to host an open-relational database management system like Postgres. You can:
- Install and configure it on your local development computer
- Install and configure it on a separate dedicated server(s)
- Install, configure, and run Postgres with Docker (though this is more development and trial focused) or with Kubernetes: CloudNativePG or Postgres for Kubernetes
- Purchase and have it managed by a third-party cloud hosting provider
- Have it managed by a third party (in or out of the cloud)
Let’s review the different options:
Local Development Computer
While installing your database on your local development computer is a simple and reliable solution that gives you full control, there are certain limitations. If you plan on enabling other users to access your database or increasing the size of it, you may be stuck. You’re also 100% responsible for maintenance and upgrades.
Installing Postgres on a dedicated database server requires purchasing or renting server space on premises or in the cloud. There’s no question that deploying Postgres on separate and multiple database servers can increase performance and enable scalability. Though there’s also more hands-on management required.
Postgres within Docker or Kubernetes
You can also use PostgreSQL in a Docker container. Docker containers exist and run independently from whatever else is running on a given machine.
Like any other option, there are pros and cons to using containers. They can ease deployment and simplify other aspects of running Postgres, but backups, upgrades and production workloads may be more complex.
Ideally you’ll want to use Docker with a container management framework like Kubernetes.
Third-party cloud hosting provider
How does cloud computing work? You can purchase Postgres from a cloud service provider (CSP) like Amazon AWS or Microsoft Azure and configure and scale as needed. The CSP delivers the cloud service and manages the database server, freeing up valuable time and resources. However, cloud hosting service providers can require commitments, so before you choose a CSP, you’ll want to be sure that you’re not locked into using that vendor’s solutions or tools only.
Third-party managed database
Instead of purchasing Postgres from a cloud hosting provider, you can purchase it through a third-party provider, like EDB. With our fully managed Postgres cloud solution EDB BigAnimal, you can gradually shift workloads from on-premises to the cloud, and you’re free to choose which cloud provider (or providers) you want to use. We handle database management, monitoring, backup, recovery and more.
Benefits of hosting databases
Along with relieving worries about large database maintenance, high availability, and who to call for expert help, having a third party host your database can:
- Increase reliability, scalability and enable your database to grow with your business
- Enhance data security by actively monitoring traffic and encrypting data
- Improve productivity with apps not available in self-supported environments
- Eliminate the need to buy and manage your own multiple database servers and hardware
- Optimize database performance with in-depth diagnostics and dashboards
So ultimately, when it comes to Postgres, and where you’re going to host it, you’ve got options. Lots of them. As you weigh various hosting solutions, you’ll want to consider where your business is now, and where you see it going.
The best option will be as flexible, powerful and future forward as Postgres is.