
Designing Idempotent APIs: Safely Retrying Failed Requests
Build idempotent API endpoints that retry safely using idempotency keys, database constraints and state machines — payments, orders and webhooks.
Tags
39 articles · Page 2 of 4

Build idempotent API endpoints that retry safely using idempotency keys, database constraints and state machines — payments, orders and webhooks.

API security layers beyond auth: rate limiting, request validation, output encoding, security headers and audit logging, with TypeScript middleware.

Configure and tune database connection pools for high-throughput Node.js: pool sizing, health checks, connection lifecycle and what exhausts a pool.

Design webhook delivery that handles retries with exponential backoff, signature verification, idempotency, delivery logging and endpoint health checks.

Compare offset, cursor and keyset pagination with practical implementations: performance characteristics, trade-offs and where each one fits your API.

A step-by-step tutorial for a GraphQL server in TypeScript: schema design, resolvers, dataloaders against N+1, authentication, errors and deployment.

How to scale WebSocket connections past a single server: sticky sessions, pub/sub fan-out with Redis, connection state and graceful reconnection at scale.

A step-by-step tutorial for rate limiters using token bucket, sliding window and fixed window — with TypeScript, Redis integration and production patterns.

A practical breakdown of read uncommitted, read committed, repeatable read and serializable: the anomalies each prevents and what they cost you.

A practical comparison of gRPC and REST for backend services: performance, developer experience, streaming, and the tradeoffs that decide between them.

Redis data structures beyond strings: sorted sets for leaderboards, streams for event logs, HyperLogLog for cardinality and bitmaps for feature flags.

A complete guide to understanding and preventing CSRF attacks: token-based protection, SameSite cookies, double-submit and framework implementations.