spring-cloud / spring-cloud/spring-cloud-gateway
Clarification on HTTP-Based Streaming Support in Spring Cloud Gateway
Nobody has claimed this yet.
- Dominant language
- Java
- Stars
- 4.9k
- Forks
- 3.5k
- Avg merge
- 20h 57m
- Merged PRs (30d)
- 8
Description
I'm currently working on a production use case involving Spring Cloud Gateway (SCG) and had a question regarding its support for HTTP-based streaming.
We are using:
Spring Boot: 2.2.9.RELEASE
Spring Cloud Gateway: 2.2.2.RELEASE
In our setup, SCG is configured to route requests to a downstream HTTP service (e.g., http://downstream-service/stream/data) that returns a reactive stream, typically via Flux with the response header "Content-Type: text/event-stream".
My understanding is:
SCG internally uses Spring WebClient with Reactor Netty.
When the downstream responds with a streaming content type like "Content-Type: text/event-stream", SCG does not buffer the full response, and instead streams it reactively and directly to the client.
This behavior is achieved entirely over HTTP, without involving WebSockets.
SCG’s reactive foundation allows this model to scale efficiently, supporting many parallel, long-lived connections — assuming non-blocking behavior throughout the chain.
Could you kindly confirm if this understanding is accurate?
Additionally, assuming the downstream service is reactive and non-blocking as well, could you please share any insights or guidance on how much this model can scale — for example, how many concurrent streaming clients can SCG realistically support under such conditions? Any best practices, system limits, or tuning tips would be greatly appreciated.
If possible, I would also be thankful for any official documentation or internal class references (e.g., GitHub files) that validate this behavior and performance model.
Thank you for your continued work on Spring Cloud Gateway
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
No source file, test, or entry point is identified. Start by reviewing Spring Cloud Gateway documentation for the stated versions and the HTTP streaming behavior; done would require documented guidance on streaming support, scalability limits, and tuning.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java, spring, spring-boot
- Domain
- api, backend
- Issue type
- Documentation
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100