A developer encountered significant delays in Server-Sent Events (SSE) streaming from the Anthropic API when using nginx as a proxy. By default, nginx's `proxy_buffering` feature collects upstream data in chunks, which disrupts the token-by-token delivery characteristic of SSE streams. This resulted in a substantial increase in Time To First Token (TTFT), degrading the user experience from near-instantaneous responses to several seconds of delay. The issue was resolved by disabling `proxy_buffering` for the streaming route or by configuring the application to send an `X-Accel-Buffering: no` header, restoring the stream's responsiveness. AI
IMPACT Developers must configure nginx to disable proxy buffering for AI streaming services to ensure low latency.
RANK_REASON Technical troubleshooting guide for a specific infrastructure configuration impacting an AI service.
AI-generated summary · Google Gemini · from 1 sources. How we write summaries →