Catalogue / gusto-2018-selections-table-migration

Gusto's benefits team moved unprocessed subscriptions and waivers into a new selections table by double write, single read and single write

Gusto. Health benefits data model (subscriptions, waivers and selections tables).

Organisation
Gusto
Evidence
Reported from production
Source
Zero Downtime Table Migrations using a Double Write Methodology

Gusto Engineering blog, published 2018-08-14

Records

Decision#d1

Move data to a new table in three phases, double write, single read, single write, with no downtime

Decision#d2

Check the double write with a scheduled differ job that posts mismatches to Slack

Decision#d3

Catch remaining reads of the old tables by overriding their attributes to raise in tests and report in production

Decision#d4

Audit that new-table writes do not depend on the old tables before deleting old rows and code

Sign in to read what was chosen, what was rejected and what it cost, each with its place in the source. An account is free. The job-queue cards are open without one.