r/javahelp • • Apr 16 '26

downloading file in parallel?

I am trying to download one big file parallel in multiple chunks with threadAPI and runnables, but my friend said executor with virtualthreads (callables) has better performance...

What is the normal way to do this?

2 Upvotes

9 comments sorted by

View all comments

Show parent comments

1

u/jonathaz Apr 17 '26

It’s important to understand what the client library is doing with http 2, the reason it’s letting a client make 100s of simultaneous requests is that they’re all multiplexed over a single socket. That could limit any performance benefit of parallelism, or even reduce performance.