file-download

This POC demonstrates the capability of allowing large file downloads without the service having to load the whole file into memory.

Instead, the FileInputStream hooked to the resource is buffered-read into a StreamingResponseBody.

Running

  1. Add files under ./files directory.
  2. Run: mvn clean install -DskipTests && docker build -t test/file-download . && docker-compose up.
  3. Test the application by opening localhost:8080/spring/file-name.ext.
  4. To test passing through Feign (ie: Frontend -> Backend -> Backend) to retrieve the file, open: http://localhost:8080/spring/bridged/file-name.ext.

Running using WebFlux

  1. Repeat the above, but replace /spring/ with /webflux/.