After this tutorial, hopefully we will all know: Many lessons should be applicable to any networked server, e.g., files, mail, news, DNS, LDAP, etc.
Acknowledgements Many people contributed comments and suggestions to this tutorial, including: Abhishek Chandra Mark Crovella Suresh Chari Peter Druschel Jim Kurose Balachander Krishnamurthy Vivek Pai Jennifer Rexford Anees Shaikh Srinivasan Seshan Errors are all mine, of course.
Chapter 1: Introduction to the World-Wide Web (WWW)
Again, cache HTTP header info on a per-url basis, rather than re-generating info over and over.
fileDescriptor = lookInFDCache(fileName); metaInfo = lookInMetaInfoCache(fileName); headerBuffer = lookInHTTPHeaderCache(fileName); Idea is to exploit locality in client requests. Many files are requested over and over (e.g., index.html).
Why open and close files over and over again? Instead, cache open file FD’s, manage them LRU.
Why stat them again and again? Cache path name and access characteristics.
Sample Logs for Illustration We’ll use statistics generated from these logs as examples. 12,445,739 11,485,600 5,800,000 1,586,667 Hits: 28,804,852 54,697,108 10,515,507 14,171,711 Bytes: 319,698 86,0211 80,921 256,382 Clients: Corporate Presence Corporate Presence Nagano 1998 Olympics Event Site Kasparov-Deep Blue Event Site Description: 1 day in Feb 2001 1 day in June 1998 2 days in Feb 1998 2 weeks in May 1997 Period: 42,874 15,788 30,465 2,293 URLS: IBM 2001 IBM 1998 Olympics 1998 Chess 1997 Name: