stechstudio / laravel-zipstream

Easily create Zip files on-the-fly and provide a streaming download
MIT License
413 stars 58 forks source link

Slow Download in Large Files Zipping #114

Closed mdrathik closed 4 months ago

mdrathik commented 4 months ago

I have hosted my web application on Hostinger VPS and stored files on AWS S3. When I try to download a folder by zipping it from AWS, the download speed is very slow. The folder contains 50-100 files and each file is 200-300 MB in size. However, when I download the zip file directly from AWS S3, I get my full internet bandwidth speed. What could be the reason for this? and any possible solution suggestions ?

jszobody commented 4 months ago

First, transferring data from S3 to Hostinger, and then from Hostinger to your browser, will always be slower than a direct S3 download. It's important to keep your web server as close to the S3 bucket as possible and minimize the data transfer speed and time for that first step.

Second, the CPU available to you on Hostinger plays a big role. I get much faster zipping performance with more powerful servers. An underpowered VPS might be creating the zip more slowly than you need.