"Will this model fit on my GPU?" has one honest answer: do the arithmetic. It's three numbers added together, and you can pull every input from a model's config.json in about two minutes. This post turns a sizing spreadsheet into a method you can run by hand.
You can build a production RAG platform on your own hardware for the price of two years of API bills, and it fits in half a rack. The trick is sizing the GPUs to the models instead of buying the biggest card on the truck. This is the full design for a 100-user, highly available, hybrid-plus-graph RAG stack, with every GPU choice backed by the VRAM math.
LLM workloads are not "regular workloads that happen to need more RAM." They are memory-bandwidth-bound during decode, compute-bound during prefill, and topology-bound the moment a model can't fit on one GPU. The hardware spec sheet, the VM config, the container runtime, the Kubernetes device plugin, and the multi-GPU pattern you pick are all the same decision at different layers. Get one wrong and the others stop mattering.
This is a reference for the whole stack — from the HBM3e bandwidth of a Blackwell GPU to the nvidia.com/gpu resource advertised by a DaemonSet to the tensor-parallel group size that decides whether your 70B model serves or stalls. Every number is verified against a primary source, dated 2026-06-16.
A single Qwen3-Coder-30B-A3B instance on Kubernetes (vLLM 0.23.0, one H100 80GB, $6.88/GPU-hour on AWS) produces code at "results comparable to Claude Sonnet" on agentic coding benchmarks, at roughly one-quarter to one-sixth the all-in cost of the hosted Anthropic API at 100-engineer scale.1 Those numbers are real, and so are the trade-offs. The post rests on one bet: at scale the model is the cheap line on the invoice, and what decides whether you ship is everything around it. That means autoscaling, observability, the security review, the tool-calling schema, and network egress.
I wrote this as a reference, not a sales pitch. It covers what Claude Code costs in production, what the vLLM-on-Kubernetes stack looks like in mid-2026, what you give up when you cut the API cord, and the six things that break first.
Most AI apps in 2026 still ship as "browser → OpenAI" with an API key in the frontend bundle. This is broken in every dimension that matters: security, cost, observability, provider lock-in, and rate limiting. The fix is a Backend-for-Frontend (BFF) — a thin server between the browser and the LLM provider that owns auth, cost, streaming, and provider abstraction. The browser does UI. The BFF does everything else.
This is the pattern every serious AI product has converged on by 2026. Here's what it looks like, why each piece exists, and how to build it without over-engineering.
Every AI app needs to stream. Most teams pick the wrong transport and spend a week debugging why the first token takes 8 seconds. The LLM is fast — the network in front of it isn't. This post compares the three transports that actually work in production (SSE, WebSockets, gRPC streaming), shows the buffering traps that kill streaming, and gives you the decision framework to pick the right one in 30 seconds.
If you've ever shipped a "ChatGPT-style" streaming endpoint and watched it work in dev, then break in staging behind nginx, this is the post for you.
Theory is easy. Practice is where DDD gets real — and where most teams get stuck.
You've read about Bounded Contexts and Aggregates. You understand Ubiquitous Language. But when you sit down with your team in front of a real codebase and real business requirements, a critical question remains: how do you actually do this?
This guide takes you through the complete DDD journey on a concrete real-world system — an online bookstore — from the first collaborative workshop all the way to working production code. Every design decision is explained. Every mistake is shown before the fix. By the end, you'll have a repeatable playbook you can apply to your own system.
You've heard the term. Maybe you've read a chapter of the blue book. But every time you try to apply DDD, it feels like you're just renaming things and calling it architecture.
You've read the articles. You've seen the diagrams — the concentric circles, the hexagons, the boxes with arrows. You understand the concepts in theory. Then you open a blank IDE and stare at the folder structure trying to figure out where your UserService goes, and everything collapses into a pile of guesses.
Both Hexagonal Architecture and Clean Architecture promise the same thing: code that is testable, maintainable, and independent of frameworks. Both succeed. But they use different metaphors, different vocabulary, and different folder conventions — and the community uses both terms interchangeably, which adds to the confusion.
Every senior engineer you admire follows a set of principles — not rules written in a style guide, but instincts built from hard experience. They look at code and immediately feel whether something is wrong, even before they can articulate why.
Those instincts are learnable. They're codified in the principles this guide covers.
Software design principles are heuristics — guidelines, not laws. No principle applies in every situation. But together they form a vocabulary for talking about code quality and a compass for navigating trade-offs. Internalize them, and you'll spend less time untangling the past and more time building the future.