Menu

Snapshotting a DigitalOcean Droplet while it's running
πŸ“°

Snapshotting a DigitalOcean Droplet while it's running

DEV Community: postgresΒ·RemdoreΒ·2 days ago
#m4If2710
#devtopostgresql#devto#dev#snapshot#droplet
Reading 0:00
15s threshold

DigitalOcean lets you snapshot a Droplet while it's running, and its docs are careful about it. They say a live snapshot "may result in performance degradation and compromise data consistency", and that many databases only guarantee a consistent disk if you stop them or power the Droplet off first. That's sensible advice. I wanted to know what it means in practice: what a snapshot of a busy Droplet contains when you restore it, whether the Droplet slows down while it's taken, and what powering off first actually costs you.

The setup

One Droplet in Frankfurt, the 2 GB / 1 vCPU size with a 50 GB disk, running Ubuntu 24.04 and Postgres 16 with its default settings. On it, two writers ran the whole time:

Postgres. One numbered row per transaction, about 100 a second. Every insert logged when it was sent and how long the commit took.

Files. The same fixed-width numbered line, about 100 a second, appended to two files. One file got an fsync after every line.…

Continue reading β€” create a free account

Join HashtagPLUS to read full articles, follow hashtags, vote, and join the conversation.