Writing

Notes on backend engineering, distributed systems, databases and AI.

07
Jan
Street photograph by Stalin Pereira

Instrumenting a Node.js Service with OpenTelemetry Auto-Instrumentation

Get traces and metrics from a Node.js service without vendor lock-in: zero-code setup, the ESM loader trap that silently drops spans, a production-ready SDK config, surprising defaults, and a Collector pipeline that keeps your backend a config choice.
8 min read
05
Jan
Street photograph by Stalin Pereira

Injecting Secrets at Runtime: Vault vs Environment Variables

Proper use of Vault/AWS Secrets vs committing keys to Git
2 min read
03
Jan
Street photograph by Stalin Pereira

Implementing W3C Trace Context across Distributed Services

Why you cannot debug without a Trace ID spanning all services
2 min read
02
Jan
Street photograph by Stalin Pereira

Implementing Unit Tests for LLM Outputs using DeepEval

Systematic testing of LLM outputs with DeepEval/Ragas
2 min read
02
Jan
Street photograph by Stalin Pereira

Implementing the BFF Pattern to Reduce Mobile Latency

Why you need a Backend for Frontend (BFF) to aggregate microservices
2 min read
30
Dec
Street photograph by Stalin Pereira

Implementing Pact to Prevent Breaking API Changes

Preventing frontend breaks when backend APIs change
2 min read
28
Dec
Street photograph by Stalin Pereira

Implementing Exponential Backoff to Prevent Thundering Herds

Immediate retries turn a brief blip into a self-inflicted outage. How exponential backoff with full jitter works, a production-ready retry helper in TypeScript, Envoy and gRPC configs, and where retries should and should not live.
8 min read
26
Dec
Street photograph by Stalin Pereira

Implementing Circuit Breakers with Resilience4j/Polly

Implementing patterns to stop cascading failures in services
1 min read
24
Dec
Street photograph by Stalin Pereira

Handling Duplicate Messages in Kafka Consumers

Kafka delivers at least once, and its exactly-once features stop at the edge of Kafka. Where duplicates come from, and how to build idempotent consumers with an inbox table, sane offset commits, and dead letter topics for poison pills.
8 min read
24
Dec
Street photograph by Stalin Pereira

Fixing Hydration Errors: A Guide to the 'use client' Directive

Practical guide on separating server/client components to avoid hydration errors
1 min read