Instead of downloading files to disk, computing checksums, and building a ZIP before serving it, we use nginx + mod_zip to stream archives directly to the client. PHP returns a short manifest listing file URLs and sizes — nginx fetches each file via internal subrequests and pumps them into a ZIP stream in real time. No temp files, no buffering, no waiting. The main gotcha: file sizes are required upfront (ZIP format constraint), which is trivial for local files and requires a HEAD request for remote ones. We hit a production incident caused by zero sizes in metadata from an external team — silent broken archives, hard to debug because mod_zip subrequests don't surface in normal log pipelines.
Podden och tillhörande omslagsbild på den här sidan tillhör
HackerNoon. Innehållet i podden är skapat av HackerNoon och inte av,
eller tillsammans med, Poddtoppen.