Which is faster: serving a static HTML file from the file system or from MemCache?

Which is faster: serving a static HTML file from the file system or from MemCache?

Also, are there any scaling and / or other issues that I should be aware of?

+2


source to share


3 answers


It depends on the site. I'm sure if you were comparing a simple little static web page that was not dynamic compared to a memcached site with a database, the former would be "faster", but this could be completely different depending on the variables at hand. there are too many factors to accept to give you a simple yes or no answer.



+1


source


As with any performance issue: benchmark. It is highly dependent on architecture, server setup, network, disk, etc. This question sounds simple enough to test in minutes with a load testing tool.



0


source


It depends on whether the file system is local or over a network. It also depends on the speed of your network connection.

The data will change depending on how the file is used and whether or not the web servers are in the cluster (and if the individual web servers have to generate the file once and then cache it).

I bet that serving a local file from the filesystem will be faster than using Memcache to work with the file (especially if it's a fast SATA drive) - simply because you're cutting out of the network layer of the equation.

Even if you are installing locally, your application will need to use the networking stack to access Memcache, and there will be some overhead involved.

0


source







All Articles