// Articles

Guides and deep dives

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

Filter by category: All (965)
Postgres Materialized Views: Refresh Strategies for APIs

When a materialized view beats a cache or a summary table, how REFRESH and REFRESH CONCURRENTLY differ, the unique index requirement, scheduling refreshes, and permission details that trip up application roles.

5 Min Read
Postgres JSONB Indexing with GIN and Expression Indexes

How to index JSONB columns in Postgres: GIN with jsonb_ops vs jsonb_path_ops, which operators each index supports, expression indexes for single keys, generated columns for hot fields, and the query shapes that silently skip the index.

5 Min Read
How to Read Postgres EXPLAIN ANALYZE

What each line of an EXPLAIN ANALYZE plan means, how to spot bad row estimates, sequential scans that should be index scans, sorts that spill to disk and loops that multiply cost, with a worked example of fixing one query.

5 Min Read
Postgres Deadlocks: Why They Happen and How to Fix Them

How to read a deadlock detected error, the access patterns that cause most Postgres deadlocks, lock ordering and smaller transactions as fixes, foreign key and batch upsert surprises, and retrying safely when one still happens.

5 Min Read
Postgres Autovacuum Tuning for Busy Tables

Why the default autovacuum settings fall behind on large and frequently updated tables, how the thresholds and cost limits work, per-table settings that fix it, and the long-running transactions that stop vacuum regardless of tuning.

5 Min Read
The N+1 Query Problem in Backend APIs

What the N+1 query problem is, why ORMs and GraphQL resolvers create it, how to spot it in traces and pg_stat_statements, and the three fixes: joins, batched ANY queries and DataLoader-style batching.

5 Min Read
Patient Consent Management Backend: Records, Revocation and Enforcement

How to build the backend that records patient consent and authorizations, versions consent documents, handles expiry and revocation, and enforces consent at the moment data is used or shared, with an audit trail for every decision.

6 Min Read
Account Statements Backend: Period Close, PDF Generation and Delivery

How to build the backend that produces monthly account statements for a fintech product: period cutoffs, balance snapshots from the ledger, idempotent generation per account, PDF storage, customer notification and the record retention questions regulators ask.

6 Min Read
Product Reviews Backend: Verified Purchases, Moderation and Ratings

How to build the backend behind product reviews in an online store: verified purchase checks, one review per customer, moderation rules that apply regardless of rating, rating aggregates that do not need a full scan, sorting by confidence and review requests after delivery.

6 Min Read
Cron Job Monitoring: Catching Jobs That Fail or Never Run

The four ways scheduled jobs fail, why error alerts miss the worst one, heartbeat and last-success metrics, run history tables, and the alert rules that catch a job that silently stopped running.

5 Min Read
CloudWatch Alarms for ECS and RDS: A Practical Setup

Which CloudWatch alarms a backend on ECS and RDS needs, how periods, datapoints and missing data decide when an alarm fires, how to route alarms through SNS, and where application metrics fit.

5 Min Read
Change Data Capture with Postgres: Logical Decoding vs the Outbox

How change data capture works on Postgres with logical decoding, publications and replication slots, what it takes to run on RDS and Cloud SQL, the WAL retention risk of a stuck slot, and when a transactional outbox is the simpler way to publish events.

5 Min Read