News for hackers. Stuff that matters.
Re:Our Journey to PostgreSQL 12 by outworlder on Monday January 25, 2021 @08:22PM (#25911262)
> As I mentioned earlier we run Postgres on i3.8xlarge instances in EC2, which come with about 7.6TB of NVMe storage.

Wait a second. You run your production database on ephemeral storage? Wow.

I see the replication setup and the S3 WAL archiving and whatnot but still... that's brave.

Re:Our Journey to PostgreSQL 12 by craigkerstiens on Monday January 25, 2021 @09:37PM (#25911767)
It's really a question of how many replicas you have, if you're running with sync rep or not, and what your DR story is like. We've tested it before a few times at previous employers and are exploring it rolling it out for Crunchy Bridge currently. The NVMe storage is really nice it's great performance and the price balance of it is good as well. But it does come with nuances... I wouldn't let a user provision without HA for example. In cases for a standard app without crazy uptime requirements having a standby or 2 is wasted cash. So it isn't for everyone, but can be for some people.
Re:Our Journey to PostgreSQL 12 by snissn on Tuesday January 26, 2021 @01:12AM (#25913093)
hi! Can you share how you do HA on postgres? Master/slave with monitoring and manual fall over or is that automatic? If so reliable? What tooling do you use? Thanks!
Re:Our Journey to PostgreSQL 12 by tommyzli on Monday January 25, 2021 @08:42PM (#25911403)
We are living life on the edge to an extent, but we have 5 hot standbys across AZs and regular backups + WAL archives to S3.

May not be as durable as EBS, but it's enough for me to sleep soundly at night. And with a highly concurrent WAL-G download, it takes like an hour to catch up a new replica from scratch.

Re:Our Journey to PostgreSQL 12 by throwdbaaway on Tuesday January 26, 2021 @01:03AM (#25913057)
Fine, with enough replicas, you can sleep well at night. But how about the 3 years uptime without reboot? Can you really enjoy your morning coffee without thinking about it? :)

Netflix went full ephemeral storage for their Cassandra clusters since the beginning, at the time when they were just spinning disks. Years later, they still insist on doing this, and had to come up with creative solution to fix the uptime issue: https://netflixtechblog.medium.com/datastore-flash-upgrades-...

Re:Our Journey to PostgreSQL 12 by matharmin on Tuesday January 26, 2021 @02:12AM (#25913346)
From the parent comment:

> it takes like an hour to catch up a new replica from scratch

That means it should be pretty easy to replace an instance - just create a new replica from scratch, then fail over (if you're replacing the current master/primary instance), and remove the old one.

Re:Our Journey to PostgreSQL 12 by phonon on Tuesday January 26, 2021 @01:21AM (#25913131)
Why can't you reboot? NVMe storage is local, not ephemeral.
Re:Our Journey to PostgreSQL 12 by throwdbaaway on Tuesday January 26, 2021 @01:44AM (#25913230)
Yes, you can reboot, but you have to update in-place, instead of rolling out a new OS image. Or you adopt the Netflix approach. There are also some additional restrictions, e.g. you can't change the machine type.

Anyway, from the other comment here, I think tommyzli might not have realized that a reboot is still possible, which would partially explain the 3 years uptime.

Re:Our Journey to PostgreSQL 12 by bcrosby95 on Tuesday January 26, 2021 @12:44AM (#25912963)
This was pretty common in AWS back in the late 00s. Performance usually sucked too much otherwise.
Re:Our Journey to PostgreSQL 12 by paulryanrogers on Tuesday January 26, 2021 @08:40AM (#25915632)
Even with prioritized IOPS I once had to resort to RAID0 and replicas to get needed performance under budget on EBS. Probably should have just bumped instance size and used local storage.
Re:Our Journey to PostgreSQL 12 by eropple on Monday January 25, 2021 @08:39PM (#25911376)
It's funny--we used to run Vertica on ephemeral nodes and actually found a performance improvement going to EBS, but that was pre-NVMe in AWS.

I wonder how big the delta was for CMB between EBS and ephemeral?