Skip to main content

Streaming

Browse all articles, tutorials, and guides about Streaming

5posts

Posts

DevOps
|15 min read

Getting a Row Change Out of Postgres Without Dual-Writing

Your service writes to Postgres and publishes to Kafka, and one day those two disagree. The fix is to make the database the only writer and read changes from its log: the outbox pattern, logical decoding, and the replication-slot failure mode that quietly fills your primary's disk, demonstrated live with real numbers.

Networking
|17 min read

WebSockets Are the Easy Part

Opening a WebSocket takes twenty lines. Reconnection, resume-from-cursor, presence, fan-out and backpressure are the actual product, and they are why realtime systems fail in month two instead of day one. Here is each problem, what it looks like in production, and an honest build-vs-buy section.

DevOps
|14 min read

6 Apache Kafka Use Cases, and When You Do Not Need Kafka

Six patterns where Kafka genuinely earns its operational cost, what each one looks like in practice, and the failure mode nobody mentions until you are already running it in production.

DevOps
|12 min read

Streaming LLM Responses in Next.js: 1.3s to First Token, Not 15.7s

The same model, the same prompt, and the same DigitalOcean endpoint. One version shows the first words in 1.3 seconds, the other shows a blank screen for nearly 16. The difference is entirely in your route handler.

DevOps
|9 min read

Streaming an AI Agent Without a Function Timeout

Long agent loops and long token streams run into the same wall: a serverless function that hits its execution cap and cuts the connection. Neon Functions hold long-lived streaming connections by default. I deployed two endpoints to prove it: one streamed for 90 seconds, the other streamed an agent token by token starting at 466 ms.