PostgreSQL keyset pagination: stop making deep pages expensive
Design deterministic cursor pagination with composite indexes, lossless boundaries and query-plan evidence.
Engineering notes
Practical writing about backend systems, databases, messaging, infrastructure, and interface reliability. The recurring theme is simple: measure first, then change the system.
Design deterministic cursor pagination with composite indexes, lossless boundaries and query-plan evidence.
Protect downstream services with bounded admission, explicit overload responses and measurable concurrency budgets.
Design bounded shutdown deadlines, HTTP draining and safe Kafka offset handling for Kubernetes deployments.
Use PostgreSQL transactions, SKIP LOCKED workers and idempotent consumers to close the database-to-Kafka dual-write gap.
Design partition keys, consumer concurrency, retries and replay so Kafka events remain correct under production load.
Connect Node.js HTTP spans to Kafka producers and consumers with context propagation, span links, sampling and production-safe telemetry.
Separate V8 heap pressure, native memory and container limits with Node.js metrics, Kubernetes evidence and controlled load tests.
Trace blocking transactions, bound lock waits and prevent migration queues from turning into production outages.
Bound request lifetimes across microservices with shared deadlines, AbortSignal, retry budgets and overload-aware observability.
Size PostgreSQL connection pools across Kubernetes replicas, reserve database capacity, measure queueing and prevent connection storms.
Prevent duplicate orders across retries and replicas with PostgreSQL transactions, fingerprints and outbox delivery.
Use TTL jitter, single-flight and safe cross-replica refreshes to stop cache stampedes.
Design startup, readiness and liveness probes for Node.js services without restart storms.
A practical playbook for safe schema changes: compatible releases, backfills, validation, indexes and rollback.
Measure event-loop delay, utilization and CPU profiles before scaling Node.js replicas.
A practical way to evaluate PostgreSQL 18 async I/O with real storage pressure, query evidence, I/O views, concurrency limits, and a rollback plan.
How to use in-place Pod resource resize safely: diagnose pressure, change deliberately, watch cluster headroom, and keep rollback boring.
A production-minded workflow for separating arrival rate, processing cost, partition skew, rebalances, and downstream pressure before scaling.
A production-minded upgrade plan covering runtime changes, native dependencies, load tests, canaries, observability, and rollback.
Why a successfully processed event can still arrive again, and how to design idempotent Kafka consumers around safe side effects.
Design Redis cache keys, expiry, invalidation, and cache-aside behavior around what a reader can safely see.
A practical way to investigate a slow PostgreSQL endpoint with EXPLAIN plans, cardinality, filters, joins, and evidence instead of guessing.
Design Vue interfaces around loading, empty results, failed requests, stale data, and changing user context.