Run Postgres replicas next to your users

Reads from the nearest region, writes kept consistent, and one setting to turn it on.

Most apps read far more than they write. A product page, a feed, a dashboard: each one is dozens of reads for every write. Sending every one of those reads to a single primary region means most users wait on a distance they cannot see and you cannot fix with a faster query.

With replicas on, Lattice keeps a copy of your database in each region you choose. Reads go to the closest copy automatically. Writes go to the primary and reach every replica in well under a second, so a user who saves something and refreshes sees their own change.

You choose how fresh a read must be. Most queries are happy with the nearest replica. A few, like a balance right after a payment, can ask for the primary with one option on the query, and pay the round trip only when it matters.

Turn it on per database in lattice.toml, list the regions you want, and deploy. Your queries do not change, your connection string does not change, and replicas are included in the storage price. Start with the regions where most of your users are and add more when the traffic shows up.

The dashboard shows lag for each replica next to its read count, so you can see at a glance which regions are earning their place and which ones you could drop without anyone noticing.

Back to stories

This is a demo

Explore the website. Payments, registrations, bookings, and form submissions are turned off.