A business intelligence dashboard displays Claude-generated summaries that update as new data arrives. Users expect to see the summary begin appearing within 2 seconds of triggering an update. Full generation takes 15–25 seconds. The backend is a Node.js server. Which streaming architecture is correct?
Select an answer to reveal the explanation.
Short Explanation and Infographic
Here's the deal — b is correct because the streaming API with SSE passthrough is the correct architecture for real-time display: Claude streams tokens to the Node.js server, which forwards them immediately to the client via SSE or WebSocket. The client renders tokens as they arrive, achieving first-token display within seconds.
Full explanation below image
Full Explanation
B is correct because the streaming API with SSE passthrough is the correct architecture for real-time display: Claude streams tokens to the Node.js server, which forwards them immediately to the client via SSE or WebSocket. The client renders tokens as they arrive, achieving first-token display within seconds. This pipeline adds minimal latency. A is wrong because waiting for full generation before sending defeats the requirement — users would wait the full 15–25 seconds with no feedback, experiencing the exact problem the requirement is trying to solve. C is wrong because the Claude API does not support chunked generation via multiple calls — each call starts generation from scratch, making concatenation produce incoherent output; and max_tokens limits output length, not generation chunks. D is wrong because server-side buffering of the full streaming response before forwarding is functionally identical to non-streaming (A) — it buffers the entire response before the user sees anything.