Skip to main content
Version: 2.0.x

PostgreSQL Benchmark

We compared Namastack Outbox 1.11.1 and 2.0.0 while the application was writing orders and consumers were processing outbox records. A record counts as processed when its handler succeeds and PostgreSQL commits its deletion.

15-minute results​

Processed records per second
  • 1.11.1Direct completion7,283
  • 2.0.0Direct completion26,584
  • 2.0.0Completion batching66,755

Each bar averages one 15-minute run. Completion batching is opt-in in 2.0.0. In this comparison, enabling it brought throughput to 2.51× the 2.0.0 direct-completion rate.

ConfigurationCommitted orders/sInserted records/sPending at the end
1.11.1 direct25,57651,15139,482,608
2.0.0 direct22,25244,50316,127,892
2.0.0 batched33,38166,7636,833

The generator targeted 50,000 orders/s in every run. The committed rates show how many orders each configuration actually wrote while processing was active. Pending counts come from a database snapshot at the end of the window and include in-flight records whose deletion was still uncommitted.

What happened over time​

Grafana replay of 15-minute runs showing sampled completion rates, pending records, WAL generation, and database commit rate for all three configurations

1.11.1 began near 30,000 processed records/s, then slowed as its backlog grew. In the batched 2.0.0 run, processing stayed close to the achieved insert rate. Grafana replays the recorded samples. Backlog points between the boundary snapshots are estimates.

Configuration60 s mean processed/s5 min processed/s15 min processed/s
1.11.1 direct29,38014,5197,283
2.0.0 direct33,02928,31126,584
2.0.0 batched70,49362,02166,755

The 60-second figures average three reconciled runs per configuration. Each longer figure comes from one run. In a separate 60-second batched attempt, the end snapshot showed about 24,480 processed records/s and 2.89 million pending. Its follow-up reconciliation was interrupted.

What changed in 2.0​

  • Completion batching. JDBC can commit completions from several keys together. Each key worker waits for its record's commit before it starts the next record for that key. Completion batching configuration
  • Bulk reads. The outbox can load records for multiple keys together and deserialize a payload when a handler needs it.
  • Bounded key selection. The database applies the poll limit in SQL, and revised JDBC indexes support the new queries.

The release comparison measures the read-path and schema changes together. The two 2.0.0 configurations isolate the batching setting. See Performance Tuning for when to try it and what to measure.

Test setup and reproduction​

ComponentConfiguration
Host and Docker VMApple M5 Max, 18 logical CPUs, 64 GiB host RAM. Docker had 18 CPUs and 31.3 GiB RAM.
RuntimePostgreSQL 18.7 and Eclipse Temurin 25.0.5+8
PostgreSQLshared_buffers=512MB, max_connections=320, max_wal_size=16GB, checkpoint_timeout=5min, six autovacuum workers
Durabilitysynchronous_commit, fsync, and full_page_writes enabled
DispatchFour consumers, virtual threads, fixed 10 ms polling, up to 1,000 keys per poll, batch dispatch, delete on completion
Completion batchingUp to 1,024 actions, with a 1 ms collection window

Every order and its two outbox records shared one database transaction. The two handlers did lightweight work without a broker. Ten consecutive orders shared a key. Each run warmed up for 30 seconds, drained the warm-up records, and reset the tables before timing. Committed deletions were calculated from the inserts and the number of records still present in the snapshot window, then checked against database counters after the drain period.

Download the runner, raw measurements, Grafana replay, and full report.