Open main menu
Home
Random
Recent changes
Special pages
Community portal
Preferences
About Wikipedia
Disclaimers
Incubator escapee wiki
Search
User menu
Talk
Dark mode
Contributions
Create account
Log in
Editing
Web server
(section)
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
=== Content cache === In order to speed up web server responses by lowering average HTTP response times and hardware resources used, many popular web servers implement one or more content [[Cache (computing)|cache]]s, each one specialized in a content category.<ref name="ws-content-cache-apache">{{Cite web|url=https://httpd.apache.org/docs/2.4/caching.html|title=Caching Guide|publisher=Apache: HTTPd server project|year=2021|access-date=2021-12-09|language=en|archive-date=9 December 2021|archive-url=https://web.archive.org/web/20211209211243/https://httpd.apache.org/docs/2.4/caching.html|url-status=live}}</ref> <ref name="ws-content-cache-nginx">{{Cite web|url=https://docs.nginx.com/nginx/admin-guide/content-cache/content-caching/|title=NGINX Content Caching|publisher=F5 NGINX|year=2021|access-date=2021-12-09|language=en|archive-date=9 December 2021|archive-url=https://web.archive.org/web/20211209211246/https://docs.nginx.com/nginx/admin-guide/content-cache/content-caching/|url-status=live}}</ref> Content is usually cached by its origin, e.g.: * static content: ** [[#File cache|file cache]]; * dynamic content: ** [[#Dynamic cache|dynamic cache]] (module / program output). ==== File cache ==== Historically, static contents found in [[Computer file|file]]s which had to be accessed frequently, randomly and quickly, have been stored mostly on electro-mechanical [[Hard disk drive|disk]]s since mid-late 1960s / 1970s; regrettably reads from and writes to those kind of [[Peripheral|device]]s have always been considered very slow operations when compared to [[RAM]] speed and so, since early [[Operative system|OS]]s, first disk caches and then also [[Operating system|OS]] file [[Cache (computing)|cache]] sub-systems were developed to speed up [[Input/output|I/O]] operations of frequently accessed data / files. Even with the aid of an OS file cache, the relative / occasional slowness of I/O operations involving directories and files stored on disks became soon a [[Bottleneck (software)|bottleneck]] in the increase of [[#Performances|performances]] expected from top level web servers, specially since mid-late 1990s, when web Internet traffic started to grow exponentially along with the constant increase of speed of Internet / network lines. The problem about how to further efficiently speed-up the serving of static files, thus increasing the maximum number of requests/responses per second ([[#requests per second|RPS]]), started to be studied / researched since mid 1990s, with the aim to propose useful cache models that could be implemented in web server programs.<ref name="ws-file-cache-mmc">{{Cite web|url=https://www.ra.ethz.ch/cdstore/www5/www218/overview.htm|title=Main Memory Caching of Web Documents|publisher=Computer networks and ISDN Systems|author=Evangelos P. Markatos|year=1996|access-date=2021-12-09|language=en|archive-date=20 January 2023|archive-url=https://web.archive.org/web/20230120185224/https://www.ra.ethz.ch/cdstore/www5/www218/overview.htm|url-status=live}}</ref> In practice, nowadays, many popular / high performance web server programs include their own ''[[Userland (computing)|userland]]'' '''file cache''', tailored for a web server usage and using their specific implementation and parameters.<ref name="ws-file-cache-iplanet">{{Cite web|url=https://docs.oracle.com/cd/E19146-01/821-1827/gaidp/index.html|title=IPlanet Web Server 7.0.9: file-cache|publisher=Oracle|author=|year=2010|access-date=2021-12-09|language=en|archive-date=9 December 2021|archive-url=https://web.archive.org/web/20211209175035/https://docs.oracle.com/cd/E19146-01/821-1827/gaidp/index.html|url-status=live}}</ref> <ref name="ws-file-cache-apache">{{Cite web|url=https://httpd.apache.org/docs/2.4/mod/mod_file_cache.html|title=Apache Module mod_file_cache|publisher=Apache: HTTPd server project|year=2021|access-date=2021-12-09|language=en|archive-date=9 December 2021|archive-url=https://web.archive.org/web/20211209194811/https://httpd.apache.org/docs/2.4/mod/mod_file_cache.html|url-status=live}}</ref> <ref name="ws-file-cache-servez">{{Cite web|url=https://www.gnu.org/software/serveez/manual/html_node/HTTP-Server.html|title=HTTP server: configuration: file cache|publisher=GNU|year=2021|access-date=2021-12-09|language=en|archive-date=9 December 2021|archive-url=https://web.archive.org/web/20211209173634/https://www.gnu.org/software/serveez/manual/html_node/HTTP-Server.html|url-status=live}}</ref> The wide spread adoption of [[Redundant array of independent disks|RAID]] and/or fast [[solid-state drive]]s (storage hardware with very high I/O speed) has slightly reduced but of course not eliminated the advantage of having a file cache incorporated in a web server. ==== Dynamic cache ==== Dynamic content, output by an internal module or an external program, may not always change very frequently (given a unique URL with keys / parameters) and so, maybe for a while (e.g. from 1 second to several hours or more), the resulting output can be cached in RAM or even on a fast [[Disk storage|disk]].<ref name="ws-disk-cache-apache">{{Cite web|url=https://httpd.apache.org/docs/2.4/mod/mod_cache_disk.html|title=Apache Module mod_cache_disk|publisher=Apache: HTTPd server project|year=2021|access-date=2021-12-09|language=en|archive-date=9 December 2021|archive-url=https://web.archive.org/web/20211209211241/https://httpd.apache.org/docs/2.4/mod/mod_cache_disk.html|url-status=live}}</ref> The typical usage of a dynamic cache is when a website has [[dynamic web page]]s about news, weather, images, maps, etc. that do not change frequently (e.g. every ''n'' minutes) and that are accessed by a huge number of clients per minute / hour; in those cases it is useful to return cached content too (without calling the internal module or the external program) because clients often do not have an updated copy of the requested content in their browser caches.<ref name="ws-dynamic-cache-edu">{{Cite web|url=https://www.educative.io/edpresso/what-is-dynamic-cache|title=What is dynamic cache?|publisher=Educative|author=|year=2021|access-date=2021-12-09|language=en|archive-date=9 December 2021|archive-url=https://web.archive.org/web/20211209234355/https://www.educative.io/edpresso/what-is-dynamic-cache|url-status=live}}</ref> Anyway, in most cases those kind of caches are implemented by external servers (e.g. [[reverse proxy]]) or by storing dynamic data output in separate computers, managed by specific applications (e.g. [[memcached]]), in order to not compete for hardware resources (CPU, RAM, disks) with web server(s).<ref name="ws-dynamic-cache-tut">{{Cite web|url=https://www.siteground.com/tutorials/supercacher/dynamic-cache/|title=Dynamic Cache Option Tutorial|publisher=Siteground|author=|year=2021|access-date=2021-12-09|language=en|archive-date=20 January 2023|archive-url=https://web.archive.org/web/20230120185251/https://www.siteground.com/tutorials/supercacher/dynamic-cache/|url-status=live}}</ref> <ref name="ws-dynamic-cache-std">{{Cite web|url=https://www.researchgate.net/publication/2585583|title=Improving Web Server Performance by Caching Dynamic Data|publisher=Usenix|author1=Arun Iyengar|author2=Jim Challenger|year=2000|access-date=2021-12-09|language=en}}</ref>
Edit summary
(Briefly describe your changes)
By publishing changes, you agree to the
Terms of Use
, and you irrevocably agree to release your contribution under the
CC BY-SA 4.0 License
and the
GFDL
. You agree that a hyperlink or URL is sufficient attribution under the Creative Commons license.
Cancel
Editing help
(opens in new window)