-
Notifications
You must be signed in to change notification settings - Fork 172
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
How to run PostgreSQL on VPS with High Availability? #58
Comments
I'm bumping this up to |
At the time of writing, Linode (the hosting service we are using for Hits) does not have a managed database product. But the minimum we would pay is $50/month given how much data ( As for the AWS RDS pricing you practically need a PhD to understand it! https://aws.amazon.com/rds/aurora/pricing The cheapest instance that can be used AWS RDS Postgres is And don't even get me started on the "Serverless" option: https://aws.amazon.com/rds/aurora/serverless
|
Thinking of using the Block Storage: https://www.linode.com/products/block-storage The storage is independent of the instance(s) so we can use a 1GB ($5/month) Linode instance and unlimited storage! "You can also increase the size of a block storage volume at any time. This gives you the flexibility to update your storage capacity as your needs change with a few easy steps." This is exactly what I want for a DB! According to this thread: https://www.linode.com/community/questions/18893/how-do-i-move-my-database-files-to-a-block-storage-volume it's possible to use Block Storage as the data directory in Postgres. It's going to require a couple of hours of DevOps (documenting the setup) but I think it will be worth it! |
AWS has a Amazon Elastic Block Store which we have used in the past, it was one of their earliest products. But it does not have replication or high availability by default. You need to pay extra for that: https://aws.amazon.com/ebs/pricing
Then we would still need to use an AWS EC2 instance where the price for a comparable instance ( We could attempt to run it on a Basically you will get an "unexpected bill for additional virtual CPU" when you go over the measly 2 VCPU baseline and it's charged at Going to proceed with my exploration of Linode Block storage. 🔍 |
On further reading, it turns out that DigitalOcean Block storage is based on SSDs and they have at-rest encryption: And they have a tutorial for migrating the Postgres data directory to their Block storage: I think the performance and reliability benefits of SSD are worth it. Considering reviving my DigitialOcean account and try to run a Postgres instance with Block Storage. |
Briefly considered using this Supabase Postgres marketplace image: But while Supabase looks sick! see: https://github.com/supabase/supabase So I think I'm just going to do a manual / first principals setup of Postgres on Ubuntu 18.04 and document it. |
No other Postgres available in the DigitalOcean Marketplace: https://marketplace.digitalocean.com Going to install Postgres and do writeup. 📝 |
Select the instance Operating System and Plan: Scroll down to the "Add Block Storage" section and enter 1gb into the field: We're going to increase the size in a later step, so keep it low for now just to set it up. Select |
Progress update:This morning I created a new DO droplet (VPS instance) with attached block storage.
My next step is to install NGINX on the droplet and open port 80/443. |
Fly.io have made this a lot simpler: https://fly.io/docs/reference/postgres/ |
Closing as for now we are using Fly.io 🚀 |
Linode has a Postgres App in the "Marketplace":
https://www.linode.com/marketplace/apps/linode/postgresql
It runs on Debian which is fine to start with.
I would definitely prefer to run it on OpenBSD: dwyl/learn-security#73
Requirements
The text was updated successfully, but these errors were encountered: