// Articles

Guides and deep dives

Guides, tutorials, and comparisons to help you build better backend applications.

Filter by category: All (965)
How to Test Event-Driven Systems Locally

Test publishers, subscribers, retries and the full flow of an event-driven backend on your laptop: what each layer proves, where cloud emulators drift from production, and a Go example with a publisher test, an idempotent subscriber test and a local end-to-end run.

9 Min Read
Preview Databases: A Fresh Database for Every Pull Request

Why preview environments that share a staging database break each other, how database-per-PR, schema-per-PR and copy-on-write clones compare, how to seed and clean up preview databases, and a Go example where every preview environment gets its own migrated, seeded Postgres database.

8 Min Read
Should You Mock the Database in Backend Tests?

What a database mock verifies, which bugs only show up against real Postgres, why SQLite is a poor stand-in, and how to make real-database tests fast enough to run on every change, with a Go example that tests a unique index against an isolated test database.

7 Min Read
How to Build Preview Environments with GitHub Actions

A GitHub Actions workflow that deploys every pull request to its own Cloud Run service with its own Cloud SQL database, comments the URL, and tears everything down when the pull request closes, plus the fork, cost and config pitfalls to plan for.

8 Min Read
Claude Code Hooks: Run Backend Checks After Every Agent Edit

Set up Claude Code hooks for a backend repo: a type check after every edit, a Stop hook that runs the tests against local infrastructure before Claude finishes, and a PreToolUse hook that keeps cloud CLIs out of the session, with an Encore example.

9 Min Read
UUID vs Bigint Primary Keys in Postgres

How bigint identity columns and UUIDs compare as Postgres primary keys: storage, index locality, insert performance, exposing IDs in URLs, generating IDs in the application, and why UUIDv7 changed the trade-off.

5 Min Read
SQS vs Redis as a Job Queue

How Amazon SQS and Redis compare for background jobs: durability, delivery guarantees, retries and dead letters, delayed jobs, throughput, operations and cost shape, and which one fits which workload.

6 Min Read
The Sidecar Pattern: When to Use It and When Not To

What the sidecar pattern is, the jobs sidecars usually do in Kubernetes, native sidecar containers, the costs in memory, startup ordering and upgrades, and the alternatives: libraries in the process, node agents and sidecar-less meshes.

5 Min Read
S3 Bucket Versioning: How It Works and What It Costs

What S3 versioning does on upload and delete, delete markers, why a versioned bucket keeps growing, lifecycle rules for noncurrent versions, restoring an old version, and when versioning is worth turning on.

5 Min Read
How to Find Slow Queries on RDS Postgres

Three ways to find the queries that slow down an RDS for PostgreSQL database: the slow query log in CloudWatch, pg_stat_statements for totals, and Performance Insights for load by wait event, plus how to confirm a fix.

5 Min Read
RDS Postgres Parameter Groups: What to Change and How

How RDS parameter groups work, why the default group cannot be edited, static vs dynamic parameters, the Postgres settings worth changing first, and which settings belong in your migrations instead.

6 Min Read
Postgres statement_timeout, lock_timeout and Idle Transaction Timeouts

What each Postgres timeout limits, the error codes they raise, where to set them so migrations and reports are not caught by limits meant for API queries, and how lock_timeout keeps a schema change from stalling every request.

5 Min Read