Stalin Pereira

Stalin Pereira

Writes about backend engineering, distributed systems, databases and AI. Street photographer when away from the keyboard.
02
Dec
Street photograph by Stalin Pereira

The Distributed Nightmare of Auto-Numbers

Why auto-increment fails when you try to shard a database or merge data from multiple regions
1 min read
01
Dec
Street photograph by Stalin Pereira

Optimistic UI Requires Client-Side IDs (CUID)

Why you cannot implement instant UI updates if you have to wait for the Database to assign an ID
1 min read
30
Nov
Street photograph by Stalin Pereira

UUIDv4 is Killing Your Database Performance

Random UUIDv4 primary keys scatter inserts across your B-tree index, bloating it, thrashing the cache and inflating WAL. Here's how to measure the damage, and how UUIDv7 (RFC 9562, native in PostgreSQL 18) fixes it without giving up what made UUIDs useful.
8 min read
30
Nov
Street photograph by Stalin Pereira

Stop Using Auto-Increment IDs: The Security Risk

Why sequential IDs (1, 2, 3) leak business intelligence to competitors (enumeration attacks)
1 min read
29
Nov
Street photograph by Stalin Pereira

ArgoCD vs Jenkins: Why GitOps is Winning

Using ArgoCD to ensure cluster state matches git repo (no kubectl apply)
1 min read
29
Nov
Street photograph by Stalin Pereira

Architecting 'AI Wrapper' Apps for Defensibility

Validating wrappers as MVPs vs defensible businesses
1 min read
29
Nov
Street photograph by Stalin Pereira

Adopting JSON Logging Standards for Easier Querying

Why JSON logs with context are superior to plain text logs
1 min read
29
Nov
Street photograph by Stalin Pereira

When to Choose gRPC Over REST: A Performance-First Approach

Where gRPC's speed actually comes from (HTTP/2, Protocol Buffers, streaming), what a typed contract buys you, and the costs tutorials skip: load balancing, debugging, browser support, and schema evolution. Ends with a clear guide on when to choose gRPC and when REST is better.
7 min read
28
Nov
Street photograph by Stalin Pereira

Kafka vs. NATS: Why Your Team Is Probably Better Off With the Underdog

Challenging the default enterprise choice of Kafka by arguing that for most modern, real-time applications, NATS provides a simpler, more performant, and cost-effective solution without the operational overhead.
1 min read
24
Nov
Street photograph by Stalin Pereira

Stop Paying for OpenAI: How to Self-Host an Enterprise-Grade RAG on Your Laptop with Ollama

Build a fully local RAG pipeline with Ollama, open embedding models, and Chroma: working Python for ingestion, retrieval, and a FastAPI service, plus the tuning, security, and cost trade-offs that decide whether self-hosting is right for you.
9 min read