News for hackers. Stuff that matters.
Re:Neon – Serverless Postgres by ed25519FUUU on Saturday May 28, 2022 @09:48AM (#31540294)
Sounds neat. What’s the weak link here though?
Re:Neon – Serverless Postgres by skrtskrt on Saturday May 28, 2022 @10:31AM (#31540618)
No read replicas that can be promoted to master in an outage?
Re:Neon – Serverless Postgres by davidzweig on Saturday May 28, 2022 @05:16PM (#31543937)
Ah, nop. If it goes down, we'll figure it out.. 24hrs outage wouldn't be the end of the world. Would have been nice to have a second (read replica) machine in East Asia, to reduce latency for users there, but didn't find a provider like Hetzner.. maybe could take a server in a suitcase and install it in a collocation center there. Bit of a hassle though.
Re:Neon – Serverless Postgres by alduin32 on Saturday May 28, 2022 @12:09PM (#31541434)
I have a similar setup as OP, and I use ZFS snapshots to be able to quickly rebuild the whole machine on another host. Of course, it still requires manual intervention in an outage (it could be automated, theoretically), and I may lose up to 5 minutes of data due to my snapshot schedule.
Re:Neon – Serverless Postgres by szundi on Saturday May 28, 2022 @10:20AM (#31540528)
Maybe that zfs snaphot under a running database? Is that ok?
Re:Neon – Serverless Postgres by alduin32 on Saturday May 28, 2022 @12:06PM (#31541407)
Yes, ZFS snapshots are atomic, so as long as the database use sane semantics to do disk I/O, you're fine (AFAIK, PostgreSQL and MySQL/InnoDB are ok, MySQL/MyISAM is not though).

A snapshot is effectively identical to a killed database server (due to OOM, or power outage), and database servers should be crash-resistant.

With PostgreSQL, checkpointing the database before taking the snapshot may make the crash recovery quicker when loading the snapshotted database.