7/ Full benchmark โ setup, raw data, summary stats:
www.lirbank.com/liberate-you...
7/ Full benchmark โ setup, raw data, summary stats:
www.lirbank.com/liberate-you...
6/ The cross-provider penalty is effectively zero when both providers have data centers in the same metro.
Provider boundaries and geographic proximity are not the same constraint.
5/ The thing that doesn't matter: provider boundaries.
Near Cloudflare Workers (internet) vs Vercel on AWS (internal network), same region:
node-postgres: 31ms vs 32ms
Postgres.js: 38ms vs 36ms
In some configurations, crossing the internet was faster.
4/ The thing that actually matters: geographic distance.
Same Cloudflare infrastructure, same database, different regions:
Far (San Jose โ Virginia): 742ms
Near (Ashburn โ Virginia): 31ms
That's 23x. Distance is real.
3/ I was working on a Cloudflare Workers deployment with Postgres on AWS. No managed Postgres on Cloudflare โ cross-provider was the only option.
So I benchmarked it: 4 Postgres drivers ร 3 connection strategies ร 3 deployment targets, 25 iterations each.
2/ Conventional wisdom: your database and application need to be on the same cloud provider. Cross-provider means crossing the internet, and crossing the internet means slow.
It's the kind of thing that drives platform choices.
1/ Some constraints are real. Some are assumptions that sound plausible and never get tested. It's worth knowing which is which before they shape your decisions.
I had one recently. ๐งต
6. I wrote the full walkthrough with runnable code examples and a pattern for injecting barriers into our tests without touching production code. If you've ever worried about sneaky race conditions in your code, give it a read.
www.lirbank.com/harnessing-p...
5b Lock present - test passes. Lock removed - test fails. That's proof.
5a. Synchronization barriers let us test for this. A barrier is a coordination point - each task runs until it hits the barrier, then waits. When the last task arrives, all are released at once. We get the exact race condition interleaving we need for our tests, manufactured on demand.
4. What we actually need is a write lock. The second transaction blocks until the first one commits, then reads the updated value. Race condition gone. But now we have a new problem - how do we prove the lock is actually doing its job?
3. Wrapping it in a transaction doesn't help. Postgres's default isolation level is read committed, which guarantees each statement sees only committed data - that's a read guarantee, not a write guarantee. Both transactions can still read the stale value before either writes.
2. Here's what that looks like. Two $50 credits hit an account with $100 at the same time. Both operations read the balance as 100. Both write 150. Final balance: $150 instead of $200. One credit vanished. No error. No rollback. Nothing in the logs.
Good test coverage gives us confidence and prevents regressions. But testing for race conditions is hard. Even when tests run concurrently, the timing almost never lines up to trigger the bug. The test passes whether our code handles concurrency correctly or not.
Neon Testing v2.4.0 is out! ๐
A Vitest utility for integration tests with Neon Postgres, now with:
- Multi-role support for testing row-level security (RLS)
- Multi-database project support
github.com/starmode-bas...
Big thanks to francesco-carrella for the contribution!
I knew I've been pretty productive this year, but yeah, this is more than I expected... while the stats are kind of exciting, it may be time for a day off...
305 Cursor days this year so far
I'm using the tab completion in Cursor so much they are sending me a Cursor tab key! ๐
...when test runs crash, stale branches can linger. The new 10-minute TTL safety net ensures automatic cleanup. Profit!
๐ฆ www.npmjs.com/package/neon...
๐ github.com/starmode-bas...
๐ Black Friday special: 100% off Neon Testing - grab your copy today!
Just released v2.3.0 with support for Neon's expiring branches.
Neon Testing tears down branches immediately after tests complete. But...
๐ My guest post for the Neon blog just went live!
Want to make Postgres integration testing dead simple? Read on:
neon.com/blog/neon-te...
Big thanks to @andrelandgraf.com, Carlota Soto and Neon for the support!
New neon-testing release!
www.npmjs.com/package/neon...
Just release neon-testing v1.1.0 with better support for WebSocket drivers, retries with exponential backoff, and more.
A @vitest.dev utility for seamless integration tests with Neon Postgres
www.npmjs.com/package/neon...
github.com/starmode-bas...
I just launched a new NPM package - a @vitest.dev utility for automated integration tests with Neon! It's really sweet. Check it out.
www.npmjs.com/package/neon...
@vercel.com my dashboard looks like this, but www.vercel-status.com say all is dandy
Just started working magically! ๐ค
Hey @leerob.com is Bun 1.2 support something that needs to be done on the Vercel side?
Let's gooo!
This is pretty exciting!
vercel.fyi/nextjs-spa
bsky.app/profile/lirb...
Let's goooo!