spring-cloud / spring-cloud/spring-cloud-gateway

[Question] Routing of the requests with multipart file upload limitations

Open
#3,360 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

waiting-for-triage
Dominant language
Java
Stars
4.9k
Forks
3.5k
Avg merge
20h 57m
Merged PRs (30d)
8

Description

Describe the bug
Please provide details of the problem, including the version of Spring Cloud that you are using.

I've encountered multiple issues with file uploads in my own project. There are numerous open issues within different components, such as netty, reactor-netty, and within this repository, related to memory leaks and Direct Buffers OOMs, I've also faced with few but it is a another topic.

So the fundamental question is: Could Spring Cloud Gateway theoretically handle routing a request with multipart files when the total size at some point exceeds the RAM of the container? Or does it require storing data in memory until the upload to the gateway completes, after which the data will be downstreamed to service B?

In my current scenario, I am assuming that the handling of file uploads operates in a buffering manner rather than streaming. It is interested how to achieve streaming.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reviewing Spring Cloud Gateway's multipart request handling and the Reactor Netty and Netty concerns named in the report. Determine whether uploads are buffered or streamed when they exceed container RAM, then document the supported behavior and any established streaming approach.

Written by the indexing model from the issue text.

Assessment

Tech stack
java, spring, spring-boot
Domain
api, backend
Issue type
Documentation
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
20/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.