~/talk

From Bytes to Brilliance : Optimizing Large File Delivery in REST APIs

Talkat JCON EUROPE 2026 · 2026-04-20..04-23· [java, web-performance]
links:none on file
slides:none on file

A Spring Boot REST API that initially loads entire zipped S3 objects into a byte[] causes OOM at ~1 GB and crashes under concurrent downloads; switching to StreamingResponseBody and streaming chunks with Deflater.BEST_COMPRESSION fixes memory spikes and shrinks heap use from ~5 GB to ~3 GB, but corrupted ZIPs appear until output streams are properly closed. Also align HTTP timeouts—use Tomcat idle timeout 3m and Spring async timeout 2m in this case—to avoid 503s and half-written downloads.

AI-written summary · about

  1. 0:00Introduction and context
  2. 1:34Speaker introduction
  3. 2:36Problem with REST for large files
  4. 4:24The memory bomb mistake
  5. 7:35Streaming as the solution
  6. 8:58Fixing corrupted zip files
  7. 10:00Adding compression
  8. 12:08HTTP headers for streaming
  9. 13:51Resource usage improvements
  10. 14:13Timeout alignment challenges
  11. 16:41Final timeout configuration
  12. 17:24Key takeaways and pitfalls
  13. 19:10Conclusion and Q&A
~/search
type to search 6,249 conferences, 138,987 speakers and 185,172 talks
~/help
cmdctrl k
search every conference, speaker and series
/
focus the filter search
h
home
c
conferences
s
speakers
e
series
t
light / dark — the status bar button does the same
?
this help
esc
close this, then clear every filter — or just the search, while you are typing in it

Ignored while you are typing. Pages without a filter rail have no search to focus.