QA
Intermediate LevelREST APIs & Web Services

How does HTTP/2 Flow Control handle Backpressure between client and server?

❓ Interview Prompt: Explain HTTP/2 stream flow control, `WINDOW_UPDATE` frames, backpressure handling, and preventing fast producers from overflowing slow consumer buffers.

When streaming high-volume data over HTTP/2, a fast server (producer) can easily overwhelm a slow client (consumer) network buffer (Backpressure):

HTTP/2 Flow Control Solution:

HTTP/2 implements credit-based flow control at both connection and stream levels:

1
The receiving client specifies a receive window size.
2
As the client reads data from its buffer, it sends 'WINDOW_UPDATE' frames back to the server, granting additional bytes.
3
If the client buffer fills up, it stops sending 'WINDOW_UPDATE' frames. The server detects 0 available window size and pauses streaming until the client catches up!

Code Implementation Example

http
// HTTP/2 Frame Sequence:
[DATA Frame: Stream 1, 16384 bytes] -> Client Buffer fills up
[WINDOW_UPDATE Frame: Stream 1, 65535 bytes] -> Client signals buffer capacity ready
💡HTTP/2 WINDOW_UPDATE frames managing receiver buffer flow control.
🎯 Interview Key Takeaway

HTTP/2 credit-based flow control uses WINDOW_UPDATE frames to handle backpressure and prevent buffer overflow.

#HTTP/2#Flow Control#Backpressure#Intermediate
Back to all REST APIs & Web Services Questions→

More REST APIs & Web Services Interview Questions

Beginner LevelREST APIs & Web Services

What is HTTP Method Idempotency and how do you implement Idempotency Keys for REST APIs?

Beginner LevelREST APIs & Web Services

What are standard HTTP Status Codes (200, 201, 204, 400, 401, 403, 404, 409, 429, 500, 503)?

Beginner LevelREST APIs & Web Services

What are HTTP Verbs (GET, POST, PUT, PATCH, DELETE) and when to use PUT vs PATCH?