Streamable HTTP Interaction Flowchart
1 Report
Streamable HTTP is a bidirectional streaming communication protocol based on standard HTTP chunked transmission. It can achieve low-latency real-time data push without WebSocket and is the mainstream solution for streaming output of large-scale APIs.
Related Recommendations
Other works by the author
Outline/Content
See more
application/json (Standard Response)
Transmission format
HTTP/2MultiplexingServer Push
HTTP/1.1Keep-AlivePipeline
TRANSPORT
Error HandlingNetwork Error | Timeout | Reconnect
Streaming ParserNDJSON Parsing | SSE ParsingIncremental UI Rendering
Mode B: Streaming Responseresponse.body.getReader()Reads in chunks
Pattern A: Standard ResponseJSON.parse() processes in one go
Business Logic LayerTool Execution | Resource Acquisition | Prompt Rendering
MCP Controller Protocol Version Negotiation Authentication and Authorization
Smart RouterAnalyzes Accept HeaderDetermines Streaming/Standard
POST /mcpUnified endpoint entry
SERVER LAYER
— Solid line: Synchronous process | — Dashed line: Optional/Asynchronous process
■ Client Layer | ■ Transport Layer | ■ Server Layer | ■ Infrastructure Layer
Connection ManagementCreate on DemandClose When Not in UseConnection Pool Reuse
■ Streaming Response Path (Cheap Transfer)
Encoding methodTransfer-Encoding: chunkedContent-Encoding: gzip/br
■ Standard Response Path (Immediate Return)
text/event-stream (Compatibility Mode)
Legend
application/x-ndjson (streaming response)
ServerlessAWS Lambda / Cloud RunBilling based on request
Auto-scalingHPA / KEDACPU/Memory/Request metrics
CDNEdge Caching(Static Resources)
Load balancerNginx / ALB / EnvoyRound-Robin / Least-Conn
INFRASTRUCTURE
State storage (optional)Redis | DatabaseSession state | Resume token
Flow responseReadableStreamasync generatorchunked encode
Standard ResponseJSON.stringify()Content-Length
Response Builder
Standard response HTTP 200 OK Content-Type: application/json
Streamable HTTP Architecture Flowchart
Deployment Modes: Containerization (Docker/Kubernetes) | Serverless | Edge Nodes
Performance BenchmarksLatency: 7.5ms @ 1000 concurrent requestsMemory: <5KB/requestSuccess Rate: ~100%Scalability: Linear horizontal scaling
Rate LimitQuota
CLIENT LAYER
TLS 1.3mTLS
HTTP ClientFetch / Axios / HTTP/1.1
OAuth 2.0JWT Token
Session Management (Optional)Header: Mcp-Session-IdResume: Last-Event-IDRestore: Resumption Token
Response processor
Security Mechanism
Tracing(Jaeger)
Logging(ELK/Loki)
Metrics(Prometheus)
Observability
Collect
Collect
Collect
Collect
0 Comments
Next Page