Hi -
More goodies at git://sourceware.org/git/pcpfans.git fche/pmwebd
commit 16f4ae2b7265b5de665f173e0b551b036a3d103d
Author: Frank Ch. Eigler <fche@xxxxxxxxxx>
Date: Wed Jan 6 22:01:07 2016 -0500
pmwebd: http compression
The JSON formatted results from both pmwebapi and graphite services
can be very large - megabytes long. Over a slower network, it can
take many seconds just to send the data across a wire. With this
patch, pmwebd now opportunitistically uses zlib to perform http
"deflate" compression on the fly for its various generated JSON. The
core work is done by new util.cxx NOTMHD_compressible_response(). The
overall effect is a significant reduction in network usage for
graphite/vector type traffic; 90%+ savings observed.
The top level configury is changed to look for zlib via pkgconfig; rpm
and debian build files are extended to look for zlib devel files.
Build-tested both with- and without- zlib on F22.
The preexisting 661 test case is tweaked to run "curl --compressed" to
transparently exercise several of the backend operations. A new small
663 test case specifically force compression to look for HTTP header
keywords, and to assert identical final output.
While in the vicinity, tweaked a putenv() memory-hygiene problem that
showed up intermittently under valgrind. While in the vicinity #2,
removed cache-defeating http headers for graphite PNG's, now that
it's safe to cache due to the recent time-absolutizing redirects.
|