6. Lee Robinson (@leerob): Practical Full-Stack Systems & Open Model Architectures
Pragmatic full-stack systems with Lee Robinson: Why edge compute can hurt database latency, how to self-host open models (Qwen/Llama), and sub-300ms voice AI pipelines.

6. Lee Robinson (@leerob): Practical Full-Stack Systems & Open Model Architectures
"Curious, was the model running in your infra or through the API directly?... In a call, you can tap the settings gear and change the speed to 2x!"
โ Lee Robinson, VP of Developer Experience
๐ก The Core Thesis
Lee Robinson is widely recognized as one of the most pragmatic educators and engineering leaders in modern web development. His content cuts through marketing hype to answer the questions production teams actually face:
- When should you use Edge compute vs. Regional Node.js serverless functions?
- When does it make financial and latency sense to self-host open-weights models (like Qwen, DeepSeek, or Llama) vs. calling closed SaaS APIs?
- How do you optimize real-time voice, streaming text, and bidirectional audio pipelines for sub-300ms responsiveness?
๐ ๏ธ Key Architectural Patterns
1. Edge vs. Regional Serverless: The Database Latency Trap
A frequent mistake engineers make is deploying compute to the Edge (nearest the user) while their database resides in a single US-East data center. The result is the "Edge Waterfall Penalty":
Client (London) โโ[10ms]โโ> Edge Function (London)
โ
โโโ[80ms]โโ> DB (US-East)
โ
โโโ[80ms]โโ> DB (US-East) (Query 2)
โ
โโโ[80ms]โโ> DB (US-East) (Query 3)
Total Latency: 250ms+ (Slower than running the function directly in US-East!)Lee's Rule of Thumb:
- Put compute next to your database (Regional Serverless) for data-heavy operations.
- Put compute at the Edge only for stateless transformations (A/B testing, header redirects, auth token validation, geolocation).
2. Multi-Provider LLM Gateway with Fallback
When building production AI features, relying on a single model endpoint invites downtime. Lee advocates for unified streaming gateways:
import { createOpenAI } from '@ai-sdk/openai';
import { streamText } from 'ai';
export async function generateStreamingResponse(prompt: string) {
try {
// 1. Primary: Self-hosted local vLLM / Ollama instance for sub-50ms TTFT
const localHost = createOpenAI({
baseURL: process.env.LOCAL_VLLM_ENDPOINT,
apiKey: 'none',
});
return await streamText({
model: localHost('qwen-2.5-coder'),
prompt,
});
} catch (err) {
console.warn('Local model cluster unavailable. Gracefully falling back to frontier cloud API...');
// 2. Fallback: Cloud API gateway
const cloudGateway = createOpenAI({
apiKey: process.env.CLOUD_AI_API_KEY,
});
return await streamText({
model: cloudGateway('gpt-4o-mini'),
prompt,
});
}
}๐งต Ready-to-Post Tweet Thread
1/4 ๐ ๏ธ Pragmatic web architecture from @leerob:
Don't fall into the "Edge Database Trap." Moving your serverless function to the Edge sounds fast, but if your database is in us-east-1, multi-query waterfalls across the Atlantic will kill your TTFB.
2/4 The Golden Rule:
Compute belongs next to data. Use Edge workers for auth verification, geo-routing, and static headers. Use regional serverless compute for database queries.
3/4 Open Models vs. Cloud APIs:
The frontier isn't just closed APIs anymore. Teams are running quantized Qwen and Llama models on their own bare-metal clusters to guarantee sub-100ms Time-To-First-Token (TTFT) and fixed cost structures.
4/4 Follow @leerob for hands-on, production-grade Next.js architectures, React tips, and developer experience insights.๐ How to Follow & Stay Current
- X Handle: @leerob
- Key Themes: Next.js, Developer Experience, AI SDK, Edge Computing, Production Best Practices.
- Top Hashtags:
#Nextjs#WebDev#React#DevRel
Discussion (0)
Continue Reading
More production-grade engineering deep dives and architectural guides

The Gemini Decisions API: Architecting a Deterministic Decision Service on a Probabilistic Model
A Hacker News thread argued about whether an LLM belongs on the critical path of a business decision. This is the production reference architecture that settles the argument: schema-bound structured output, bounded tool loops, deterministic policy gates, and a latency budget you can defend in a design review.

Brotli vs. Zstandard vs. Gzip at 1 PB/Month: Measured Ratios, CPU Seconds per GB, and the Real CDN Bill
At petabyte scale, compression is no longer a config flag โ it is a P&L line item. Here are the measured ratios, real CPU-seconds-per-GB numbers, and the break-even cache-hit math that decides whether Brotli q11 pays for itself or quietly bankrupts your origin.

Micro-Frontends at 5,000 Routes: Module Federation vs single-spa vs Web Components, Measured
We rebuilt the same 5,000-route enterprise shell three times โ Module Federation 2.0, single-spa, and native Web Components โ and measured p95 route transitions, marginal memory per mounted remote, duplicated vendor bytes, and the fully loaded cost of 1M deployments. The results invert most vendor claims: the fastest architecture on cold start is the one that duplicates the most code.