Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow streaming of multipart requests/response in Zuul proxy #414

Open
amitabhprasad opened this issue Mar 12, 2018 · 2 comments
Open

Allow streaming of multipart requests/response in Zuul proxy #414

amitabhprasad opened this issue Mar 12, 2018 · 2 comments
Labels

Comments

@amitabhprasad
Copy link

When calling the service directly, the download streams fine, however when calling through Zuul it seems to download the file to zuul first and then stream it from there.
This becomes for large file downloads especially when running in GB's, file download starts only after entire file is read in Zuul filter, this frces us to use really large heap size and other performance issues.
We debugged the code and looks like problem happens during

private void writeResponse(InputStream zin, OutputStream out) throws Exception {
byte[] bytes = buffers.get();
int bytesRead = -1;
while ((bytesRead = zin.read(bytes)) != -1) {
out.write(bytes, 0, bytesRead);
}
}
in org.springframework.cloud.netflix.zuul.filters.post.SendResponseFilter

That loops over untill entire file is read. I tried sending the request as /zuul/...
but nothing helped, please let me know if there is a way out ? we are totally stuck.

@spencergibb
Copy link

No need to cross post. Already discussing in the proper place here spring-cloud/spring-cloud-netflix#2773

Copy link

This issue is stale because it has been open 60 days with no activity. Remove stale label or comment or this will be closed in 7 days.

@github-actions github-actions bot added the Stale label Nov 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants