Mason

Open sourceApache-2.0

A lightweight drop-in replacement for your Postgres read replica.

Same SQL, same answers. But 10–50× faster for analytical queries.

Try it out locally, run it anywhere

$ npm i -g @mason-data/cli
$ cd my-app

# tell Mason which Postgres database to sync from
$ echo "MASON_DATABASE_URL=postgres://me:secret@localhost:5432/my_db" >> .env
$ mason init

# choose the tables to sync
$ mason add orders customers

# start Mason and wait for the first sync to finish
$ mason start && mason wait

# get a connection URL for your favourite Postgres client
$ mason user add me

# get results 10–50× faster
$ psql "postgres://me:<password>@localhost:5433/mason" -c "SELECT country, sum(amount) FROM orders JOIN customers ON customers.id = customer_id GROUP BY country"

Read the docs on GitHub →Try Mason Cloud →

Why Mason

Where Mason is fast, and where it isn't

Fast

Queries that read lots of rows, like counts, sums and group-bys over big tables. The kind dashboards, reports and AI agents run.

Not fast

Queries that fetch a few rows, like looking up one order by its ID. Keep those on Postgres. Writes stay there too, because Mason is read-only.

MeasuredPostgres p95 (s)Mason p95 (s)Mason is
Dashboard queries 1 M rows, 8 concurrent clients2.060.1415× faster
Dashboard queries 30 M rows, 8 concurrent clients258.004.5357× faster
Dashboard queries 10 M rows, 32 concurrent clients96.603.5128× faster
Lookup by ID 30 M rows, 8 concurrent clients0.022.0991× slower
How it was measuredAWS m7g.xlarge · 4 vCPU · 15 GiB RAM · EBS gp3