Giter Club home page Giter Club logo

Comments (18)

admoriarty avatar admoriarty commented on May 25, 2024

@spencergibb We're currently rewriting a gateway app in Spring Cloud Gateway which was previously implemented using Zuul, and its been fun to say the least! This issue though is one of interest to us as we near completion, because in zuul it was possible to prepend a "/zuul/" prefix to a route which caused a different servlet to be used, tailored for large file transfers. We're wondering if that's the intention here too, or similar, or should we not wait and go away and find our own solution for large file streaming outside our gateway app? Currently we're finding that large files are completely memory bound (which we assume is what this issue was raised to address? ), so any feedback would be appreciated.

from spring-cloud-gateway.

spencergibb avatar spencergibb commented on May 25, 2024

@admoriarty there should be no limitation here since this is not using servlets. This issue is to verify assumptions using a test.

from spring-cloud-gateway.

admoriarty avatar admoriarty commented on May 25, 2024

Thanks @spencergibb we'll have to have a closer look at what we're doing...will report back if we find anything specific malfunctioning :)

from spring-cloud-gateway.

admoriarty avatar admoriarty commented on May 25, 2024

@spencergibb We parked our work for a while, but just recently brought our app up to date with the latest milestone releases and everything works a charm except for large uploads. 10MB and 50MB pass though the gateway fine, a 200MB file resulted in an OOM - io.netty.util.internal.OutOfDirectMemoryError: failed to allocate 16777216 byte(s) of direct memory (used: 637534215, max: 643301376)

Obviously we could provide the app with more memory but clearly this approach isn't right, it shouldn't be buffering these files in memory at all, and as I said earlier in zuul we were able to use the /zuul prefix path to avoid this. Should we just not be passing such content through this gateway at all and find another handler for it?

from spring-cloud-gateway.

dkvasnicka avatar dkvasnicka commented on May 25, 2024

Is there any progress on this? We would like to update a legacy project to Spring Boot 2 , get rid of Zuul and use the Gateway but large file uploads are a big theme for us.
Any ETA or more details on outstanding issues? Is it just about waiting on reactor-netty to fix something?

from spring-cloud-gateway.

donrw avatar donrw commented on May 25, 2024

@spencergibb Is this the same issue? #171

from spring-cloud-gateway.

spencergibb avatar spencergibb commented on May 25, 2024

No

from spring-cloud-gateway.

donrw avatar donrw commented on May 25, 2024

@spencergibb Do you need someone to work on a test?

from spring-cloud-gateway.

spencergibb avatar spencergibb commented on May 25, 2024

Help is allways appreciated

from spring-cloud-gateway.

gavin-hu avatar gavin-hu commented on May 25, 2024

Is this issue has solution?

from spring-cloud-gateway.

ryanjbaxter avatar ryanjbaxter commented on May 25, 2024

If it did it would have been closed.

from spring-cloud-gateway.

novettaberin avatar novettaberin commented on May 25, 2024

If at any time you have a stacktrace similar to this:

    at java.io.ByteArrayOutputStream.write(ByteArrayOutputStream.java:140)
    at org.apache.commons.io.IOUtils.copyLarge(IOUtils.java:1793)
    at org.apache.commons.io.IOUtils.copyLarge(IOUtils.java:1769)
    at org.apache.commons.io.IOUtils.copy(IOUtils.java:1744)
    at com.netflix.zuul.http.HttpServletRequestWrapper.parseRequest(HttpServletRequestWrapper.java:151)

You know you are doing it wrong. The problem with copying the content of a request like that is the whole request is in memory. That's a problem for file uploads, and small files like 40-50MB can kill the the gateway if you get enough of those requests in a short period of time (i.e. during ETL). The gateway should only stream data from the incoming request straight to it's destination with only a handful of bytes in memory at a time for any given request.

Running into this issue with production right now.

from spring-cloud-gateway.

spencergibb avatar spencergibb commented on May 25, 2024

@bericoberin, this is not the repo for zuul

from spring-cloud-gateway.

Gspider7 avatar Gspider7 commented on May 25, 2024

do we have a sollution for large file upload now?

from spring-cloud-gateway.

yhilem avatar yhilem commented on May 25, 2024

Hi,
do we have a sollution for large file upload nd download ?
it seems that gateway's performance only influenced by response body size, with bigger than about 10kb size [https://github.com//issues/301]

Thanks
Youcef HILEM

from spring-cloud-gateway.

spencergibb avatar spencergibb commented on May 25, 2024

If anyone has a problem uploading large files, can you provide a complete, minimal, verifiable sample that reproduces the problem? It should be available as a GitHub (or similar) project or attached to this issue as a zip file.

from spring-cloud-gateway.

spring-projects-issues avatar spring-projects-issues commented on May 25, 2024

If you would like us to look at this issue, please provide the requested information. If the information is not provided within the next 7 days this issue will be closed.

from spring-cloud-gateway.

spring-projects-issues avatar spring-projects-issues commented on May 25, 2024

Closing due to lack of requested feedback. If you would like us to look at this issue, please provide the requested information and we will re-open the issue.

from spring-cloud-gateway.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.