Bidirectional Streaming

Bidirectional Streaming

gRPC, WebSocket, HTTP/2, HTTP/3, SSE, reconnect strategies, HOL blocking.

72Articles
72Topics covered
Articles in this category

All 72 articles, sorted alphabetically

Advertisement
ARTICLE · 01

Backpressure in Bidirectional Streams

What backpressure means in bidi protocols and how to handle a slow consumer without crashing.

Read article
ARTICLE · 02

Backpressure in Streaming Systems

When the consumer can't keep up.

Read article
ARTICLE · 03

Backpressure in Streaming

How backpressure signals slow consumers to fast producers, preventing memory blowup in streaming systems.

Read article
ARTICLE · 04

Backpressure architecture in bidirectional streams

Deep-dive on end-to-end backpressure: TCP/HTTP2/QUIC flow-control windows, gRPC readiness, Reactive Streams demand, WebSocket&#x27…

Read article
ARTICLE · 05

QUIC connection migration architecture

Deep-dive on QUIC connection migration: Connection IDs decoupling identity from the four-tuple, path validation and anti-amplification limits, congest…

Read article
ARTICLE · 06

Delivery and read receipts architecture

Deep-dive on delivery and read receipts in real-time messaging: server-assigned message identity, delivered and read acknowledgements flowing back ove…

Read article
ARTICLE · 07

Real-time fanout -- delivering messages to many connections

Deep-dive on real-time fanout: the broadcast-to-many problem, the stateful connection layer (sharded WebSocket servers), the pub/sub backplane distrib…

Read article
ARTICLE · 08

gRPC bidi streaming architecture

Deep-dive on gRPC bidirectional streaming: HTTP/2 framing, multiplexing, flow control, backpressure, deadlines, keepalive, and reconnect.

Read article
ARTICLE · 09

gRPC Streaming

How gRPC's four communication modes (unary, server-stream, client-stream, bidi-stream) enable rich RPC patterns.

Read article
ARTICLE · 10

gRPC server streaming architecture

Deep-dive on gRPC server streaming: unary vs stream, HTTP/2 frames, flow control, deadlines, cancellation, backpressure, trailers.

Read article
ARTICLE · 11

Heartbeats / keepalive -- detecting dead connections

Deep-dive on heartbeats/keepalive for long-lived bidirectional connections: the silent-death problem, periodic ping/pong, timeout detection, reconnect…

Read article
ARTICLE · 12

HTTP/2 architecture

Deep-dive on HTTP/2: TCP + TLS, multiplexed streams, frames, HPACK, priorities, flow control, server push, HoL blocking, interop.

Read article
ARTICLE · 13

Load Balancing WebSockets

How to load balance WebSocket traffic: sticky sessions, layer 4 vs 7, and health check gotchas.

Read article
ARTICLE · 14

Load shedding on bidirectional streams

Deep-dive on load shedding for long-lived bidirectional streams (WebSocket, gRPC, WebTransport): deliberately dropping work the server cannot serve so…

Read article
ARTICLE · 15

Load Testing Bidi Servers with k6

Measuring p99 latency and concurrent connection limits.

Read article
ARTICLE · 16

Long polling

Deep-dive on long polling: the hold-and-respond cycle, cursors for reliable gap-free delivery, timeout tuning against intermediaries, scaling held con…

Read article
ARTICLE · 17

Long-polling fallback

Deep-dive on transport negotiation with long-polling fallback: the WebSocket-to-SSE-to-long-poll ladder, the server hub that presents one transport-ag…

Read article
ARTICLE · 18

Bidi message ordering architecture

Deep-dive on ordered delivery over bidirectional streams: sequence numbers and send buffers, receive-side reorder windows, gap detection with NACK, de…

Read article
ARTICLE · 19

MQTT architecture

Deep-dive on MQTT: the broker-and-topic publish/subscribe model, wildcard topic filters, the three QoS levels (at-most/at-least/exactly once), retaine…

Read article
ARTICLE · 20

Stream multiplexing -- many logical streams over one connection

Deep-dive on stream multiplexing: the HTTP/1.1 connection-per-request problem, many concurrent streams over one connection, frames and stream ids inte…

Read article
ARTICLE · 21

Offline message queue architecture

Deep-dive on the store-and-forward offline queue that keeps bidirectional clients gap-free across disconnects: a fanout writer that appends each messa…

Read article
ARTICLE · 22

WebSocket compression architecture

Deep-dive on permessage-deflate: the offer/response extension negotiation, server_max_window_bits and client_max_window_bits sizing, context takeover …

Read article
ARTICLE · 23

Real-time presence tracking architecture

Deep-dive on presence systems: heartbeat/TTL truth that eliminates ghosts, multi-session aggregation into a user status, state machines with grace win…

Read article
ARTICLE · 24

QUIC bidi streams architecture

Deep-dive on QUIC streams: bidi + uni types, per-stream flow control, priority, STOP_SENDING/RESET, 0-RTT, migration, H3 mapping.

Read article
ARTICLE · 25

WebRTC bidi architecture

Deep-dive on WebRTC bidirectional streaming: signaling, ICE, STUN/TURN, DTLS, SRTP, DataChannel, codecs, SFU.

Read article
ARTICLE · 26

Bidi Security

How to secure WebSocket connections: auth at handshake, authz per message, and rate limiting.

Read article
ARTICLE · 27

WebRTC Signaling

How WebRTC signaling works (SDP offer/answer + ICE candidates) and how to implement it over WebSocket.

Read article
ARTICLE · 28

Signaling architecture for real-time apps

Deep-dive on the signaling plane: stateless WebSocket workers, session stores and pub/sub routing, SDP offer/answer with trickle ICE, perfect negotiat…

Read article
ARTICLE · 29

Socket.IO at scale

Deep-dive on scaling Socket.IO: polling-to-WebSocket upgrade, sticky sessions, namespaces and rooms, Redis adapter broadcast, reconnection storms, slo…

Read article
ARTICLE · 30

Server-Sent Events Architecture in Depth

A 2500-word walkthrough of SSE: browser EventSource, server text/event-stream, event format, reconnect, Last-Event-ID, HTTP/2, auth, LLM streaming.

Read article
ARTICLE · 31

Server-Sent Events (SSE)

How SSE provides one-way streaming from server to client over HTTP, when to use it vs WebSockets.

Read article
ARTICLE · 32

Typing indicators architecture

Deep-dive on typing indicators in real-time chat: how to fan out ephemeral 'X is typing…' presence s…

Read article
ARTICLE · 33

WebRTC

How WebRTC enables peer-to-peer audio, video, and data in browsers, and the signaling and NAT traversal challenges.

Read article
ARTICLE · 34

WebRTC architecture

Deep-dive on WebRTC: signaling, ICE, STUN/TURN, DTLS + SRTP, media pipeline, data channels, bandwidth adaptation, SFU.

Read article
ARTICLE · 35

WebSocket architecture

Deep-dive on WebSocket: HTTP upgrade, framing, subprotocols, heartbeat, backpressure, reconnect, TLS/origin, LB, observability.

Read article
ARTICLE · 36

WebSockets Introduction

How WebSockets provide full-duplex communication over a single TCP connection, upgrading from HTTP.

Read article
ARTICLE · 37

WebSocket Scaling

How to scale WebSocket servers horizontally: sticky routing, cross-server messaging, and pub/sub backbones.

Read article
ARTICLE · 38

WebTransport Architecture in Depth

A 2500-word walkthrough of WebTransport: browser API, QUIC transport, reliable streams, unreliable datagrams, session, auth, connection migration.

Read article
ARTICLE · 39

WebSocket subprotocols architecture

Deep-dive on WebSocket subprotocols: Sec-WebSocket-Protocol negotiation, framing layer, versioning, interop tests, deprecation.

Read article
ARTICLE · 40

gRPC Bidirectional Streaming Explained

How gRPC bi-directional streaming works under the hood + a runnable Python server/client.

Read article
ARTICLE · 41

gRPC Streaming Patterns

Unary, server, client, bidi — when each one fits.

Read article
ARTICLE · 42

Heartbeat and Keep-Alive Strategies

Detecting half-open connections in long-lived bidi streams.

Read article
ARTICLE · 43

HTTP/2 vs HTTP/3 Streams

Multiplexing under TCP vs QUIC.

Read article
ARTICLE · 44

NATS JetStream for IoT

Lightweight pub/sub with at-least-once and persistence.

Read article
ARTICLE · 45

QUIC Streams for Real-Time Apps

Why HTTP/3's QUIC transport beats TCP for bidi over lossy networks.

Read article
ARTICLE · 46

Server-Sent Events Deep Dive

How SSE compares to WebSocket and gRPC bidi for one-way streaming.

Read article
ARTICLE · 47

SignalR-Style Connection Patterns

WebSocket-with-fallback that doesn't suck.

Read article
ARTICLE · 48

Socket.IO vs Native WebSocket

When the abstraction is worth the overhead.

Read article
ARTICLE · 49

SSE Authentication Challenges

Why EventSource doesn't send custom headers and how to authenticate anyway.

Read article
ARTICLE · 50

SSE Client Lifecycle

How browsers throttle SSE connections when tabs go background — and how to design around it.

Read article
ARTICLE · 51

SSE Error Handling Patterns

How to communicate errors over SSE and how clients should react.

Read article
ARTICLE · 52

SSE for LLM Streaming Responses

The pattern for streaming token-by-token responses from an LLM through SSE to a browser.

Read article
ARTICLE · 53

SSE Through Proxies, CDNs, and Middleboxes

How proxies buffer or drop SSE, and how to fight back.

Read article
ARTICLE · 54

SSE Observability

The specific metrics + logs that make SSE production-supportable.

Read article
ARTICLE · 55

Server-Sent Events (SSE)

The full SSE wire format, event types, retry, last-event-id, and the reconnect algorithm.

Read article
ARTICLE · 56

SSE Reconnection + Last-Event-ID Server Design

How to make server-side event ID assignment work with reconnect for at-least-once delivery.

Read article
ARTICLE · 57

Scaling SSE

Delivering the same events to N clients spread across M servers efficiently.

Read article
ARTICLE · 58

SSE vs WebSocket

The tradeoffs that actually matter: direction, complexity, infra, browser support, message rate.

Read article
ARTICLE · 59

WebSocket Authentication Patterns

How to authenticate WebSocket connections — cookies, tokens, first-message auth — with tradeoffs.

Read article
ARTICLE · 60

WebSocket Backpressure and Slow Consumers

What happens when the sender produces messages faster than the receiver can process — and how to prevent memory blowup.

Read article
ARTICLE · 61

WebSocket Debugging Tools + Techniques

Chrome DevTools, wscat, tcpdump, and structured logging for finding what broke.

Read article
ARTICLE · 62

WebSocket Frame Format

The actual bytes of a WebSocket frame: FIN, opcode, mask, length encoding, payload — with worked examples.

Read article
ARTICLE · 63

The WebSocket Handshake

The HTTP Upgrade handshake for WebSocket: exact bytes, headers, computation of Sec-WebSocket-Accept, and what fails.

Read article
ARTICLE · 64

WebSockets Through Load Balancers

Getting long-lived WebSocket connections through ALBs, ELBs, HAProxy, and NGINX without silent drops.

Read article
ARTICLE · 65

WebSocket Ping/Pong Keepalive

Why ping/pong exists, how to configure intervals, and the failure modes it doesn't catch.

Read article
ARTICLE · 66

WebSocket Reconnection Strategies

Client-side reconnect logic that handles transient drops without hammering the server.

Read article
ARTICLE · 67

Scaling WebSocket Servers Horizontally

The three problems: connection distribution, cross-instance message delivery, and state sharing.

Read article
ARTICLE · 68

Scaling WebSocket Servers

Sticky sessions, pub/sub, and the connection limit.

Read article
ARTICLE · 69

WebSocket Subprotocols and Extensions Explained

How Sec-WebSocket-Protocol and Sec-WebSocket-Extensions negotiate what runs on top of the WebSocket transport.

Read article
ARTICLE · 70

WebSocket vs gRPC Bidi

Practical tradeoffs between browser-friendly WebSockets and HTTP/2-native gRPC bidi.

Read article