The ‘playlog’ utility the-playlog-utility
The playlog utility can be used to pre-generate contents for the HTTP response cache.
The existing Image Serving HTTP response cache is not guaranteed usable after a major version upgrade (when the first or second digit of the version number changed). If the server is to be taken live into full-load conditions after the upgrade, the server may be overloaded handing the first few hours of cache miss requests until the cache is reasonably populated and the cache hit rate increases.
To avoid this initial load spike, the playlog
utility can be used to pre-generate contents for the HTTP response cache. playlog
extracts HTTP requests from an existing access log file and sends it to the server to generate cache entries. For typical usage scenarios, it is sufficient to play back a single access log file containing a full-day’s worth of traffic.
In addition to priming the HTTP response cache after upgrade installs, the utility is also used to pre-generate cache contents when adding a new server to a load-balanced environment; simply play back a recent log file from one of the other servers.
playlog
can be configured to support most access log files generated by prior versions of Image Serving.
Usage section-daa126ec469b4a9d90d59def4fdaacdd
playlog *logFile* [-n *col*] [-s *separator*] [-m *marker*] [-p *prefix*] [-x *suffix*] [-v] [-h] [-r *request method*] [-o *position*]
For Windows, the filename is playlog.bat and on Linux it is playlog.sh.
Examples section-716e5c35e9fa4ee3a4b0687381fcea40
The following example plays back all requests from an access log file created by Image Serving on Linux:
> cd /usr/local/Scene7/ImageServing/logs
> ../bin/playlog.sh access-2007-01-01.log -n 18 -s ' ' -m . -p http://localhost:8080
The following command plays back all requests found in a trace log file created by Image Serving on Windows:
> "\Program Files\Scene7\ImageServing\bin\playlog.bat" d:\logs/access-2006-09-01.log