3 ms·
I don't think they literally mean "for immediate sending out to clients" right? Because that would block the worker thread for the duration of the download. It
by herpderperator 5y ago
I don't think they literally mean "for immediate sending out to clients" right? Because that would block the worker thread for the duration of the download. It makes more sense to write the output to disk and serve it out as normal static content.
- deleted 5y ago[deleted]
- thrashh 5y agoIt would only block if you did it synchronously. If I had to build an endpoint that generated ZIPs on the fly, I would explicitly build it to be asynchronous and efficient as possible. The only issue is that you might want to attach a buffer somewhere that might dump to disk past a certain amount, if the source of your data can’t be “paused.”