/Blog

Blog

Content about design, technology, and the weird stuff in between.

12 min readJohnny UnarJohnny Unar

Stop warming pools: adaptive CPU-bursting that actually saves money

Warm pools feel like a win until the AWS bill arrives. Here's a concrete pattern with Go worker pools, Redis token buckets, and KEDA that gets you sub-200ms p95 without paying for idle CPUs.

Read more
12 min readJohnny UnarJohnny Unar

Edge for delivery, Go for domain

A strict partitioning recipe for Next.js 15 and Go 1.22, with auth, SSR streaming, flags, observability, and none of the hand-wavy edge hype.

10 min readJohnny UnarJohnny Unar

One npm package nearly owned our Next.js 15 app

A postinstall hook, a remote loader, and a few ugly hours in CI. The fixes were simple once we stopped pretending JavaScript supply chain risk was theoretical.

10 min readJohnny UnarJohnny Unar

Stop Paginating in the Client, Let Next.js 16 Do It

Client-side pagination burns memory, inflates TTFB, and makes UX flaky. Cursor APIs plus route-segment caching fix the mess without a rewrite.

10 min readJohnny UnarJohnny Unar

A sane monorepo needs hard boundaries

Monorepos work fine in 2026, if you treat boundaries as code and automate enforcement. Our setup is boring on purpose, and that’s why it holds.

10 min readJohnny UnarJohnny Unar

Swap Encoders Without Torching Retrieval

Embedding model upgrades break search in quiet, expensive ways. This is the rollout playbook we use to ship encoder changes without wrecking retrieval.

11 min readJohnny UnarJohnny Unar

Edge observability is mostly a telemetry problem

Next.js 15 edge functions and Go 1.22 services need different observability than long-lived servers. Trace cold starts, collect sampled flamegraphs, and tail-sample hard.

10 min readJohnny UnarJohnny Unar

Don’t ship agent chains to SMB customers

Agentic tool orchestration looks clever in demos and turns ugly in production. Use typed function calls, deterministic proxies, and explicit fallbacks instead.

10 min readJohnny UnarJohnny Unar

Stop shipping business logic in Next.js edge

Use Edge for fast decisions, keep stateful work in Go. This split fixes correctness bugs, retries, and observability holes that keep showing up in SaaS systems.

10 min readJohnny UnarJohnny Unar

Kill the GraphQL gateway at 12 services

Federation adds a governance tax most mid-stage startups can't afford. Typed OpenAPI and consumer-driven contracts bring back speed and make failures obvious.

9 min readJohnny UnarJohnny Unar

Zero-Downtime Django Postgres Migrations Need Multi-Step Plans

Safe schema changes in a Django monolith come from staged rollouts, backfills, and boring operational discipline. Squashed migrations won't save you.

14 min readJohnny UnarJohnny Unar

Multi-tenant Postgres 16: pick RLS unless proven otherwise

Most SaaS teams should default to Row Level Security in Postgres 16. The hard part isn't SQL, it's pooling, migrations, and operational discipline.

10 min readJohnny UnarJohnny Unar

Stop Forcing Analytics Through Django ORM

Reporting code packed into chained QuerySets gets slow, fragile, and unreadable. Put heavy analytics back in SQL, where Postgres can actually help you.

9 min readJohnny UnarJohnny Unar

Ship prompts like code, or expect regressions

Production LLM features rot quietly. Version prompts, test them in CI, canary against shadow traffic, and make rollback boring.

9 min readJohnny UnarJohnny Unar

Ship one correct admin workflow

Config panels feel like product progress until they turn your SMB app into a support machine. Pick one strong admin path and defend it.

10 min readJohnny UnarJohnny Unar

Treat hallucinations like system failures

Hallucinations leave fingerprints. Instrument token probabilities, track evidence provenance, and gate actions with cheap verifiers before anything touches production.

9 min readJohnny UnarJohnny Unar

GPU, API, or CPU batching for AI inference

Most startup AI infra decisions get made on vibes. Use throughput, tail latency, token volume, and ops burden to pick the least painful option.

11 min readJohnny UnarJohnny Unar

Bill compute, kill per-request pricing

Per-request billing punishes automation and rewards waste. Meter compute instead, and your SaaS economics stop behaving like a bug.

11 min readJohnny UnarJohnny Unar

API rewrites are governance failures

Most API rewrites happen because teams skipped contracts, versioning, and deprecation discipline. A small amount of governance fixes that without slowing delivery.

10 min readJohnny UnarJohnny Unar

Embedding drift will quietly wreck your retrieval

Vector search degrades slowly, then all at once. Measure drift before recall collapses and model upgrades torch production.

9 min readJohnny UnarJohnny Unar

Messy PDFs will wreck your pipeline unless you pin every step

Naive OCR and embeddings pipelines fail quietly on real PDFs. A layout-aware, deterministic ingestion stack gives you drift detection and rollback.

10 min readJohnny UnarJohnny Unar

Deterministic Tests for RAG Pipelines or Don't Ship

LLM features fail quietly. A real test suite for RAG needs frozen snapshots, adversarial prompts, and contracts around retrieval and attribution.

10 min readJohnny UnarJohnny Unar

HTMX inside Next.js cut our frontend mess

For internal tools and B2B portals, HTMX inside Next.js ships faster, ships smaller, and breaks less than a full SPA stack.

9 min readJohnny UnarJohnny Unar

Stop trusting Lighthouse for product decisions

Lighthouse is fine for smoke tests. Revenue decisions need RUM, user journeys, and performance data tied to conversion.

11 min readJohnny UnarJohnny Unar

Stop Choosing Microservices for Your ERP

Most startup ERP teams don't need microservices. Django 4.2 and PostgreSQL 15 will carry you much further, with less pain and fewer 2am surprises.

10 min readJohnny UnarJohnny Unar

pgbouncer before more workers

Postgres connection limits usually point to bad app config, not a scaling crisis. Fix pooling first, then decide if you need more compute.

10 min readJohnny UnarJohnny Unar

Next.js Edge Functions Are a Bad Place for Real Backend Logic

Edge runtimes look fast in demos, then fall apart under real backend constraints. A hybrid edge plus regional model gives you speed without wrecking correctness.

10 min readJohnny UnarJohnny Unar

Modular Django without the circus

Most teams don't need microservices. They need Django apps with hard boundaries, versioning, and upgrade paths that won't wreck production.

9 min readJohnny UnarJohnny Unar

Most RAG systems fail because nobody designs for audit

RAG breaks in production for boring reasons: weak provenance, fuzzy retrieval, no evaluation. PostgreSQL plus pgvector fixes more than another vector DB ever will.