Search code examples
phpamazon-s3amazon-web-servicestraffichigh-traffic

High traffic spikes on certain images, serve these from Amazon S3?


First: I'm very noob at this. Sorry. I want to learn.

My website sometimes got REALLY high traffic spikes (for certain images). (I'm at Linode btw.)
And therefore my website loading very slowly. (The cpu is low, IO rate is high). Again, not always, just sometimes.

So if I move these images to amazon S3 and serving from there solves the problem? So I don't need to pay more, just if I got a spike.

AND, even if my S3 storage got tens of thousands of downloads in a very short interval, it will not slow down, right?

Hope, the question was clear. Thanks very much for the answer.


Solution

  • Well, you could probably install varnish cache to prevent those traffic spikes from killing the server. Varnish will cache the image in memory and relieve the load from the web server (apache, nginx, etc).

    https://www.varnish-cache.org/