Hi list,
This is a very small patch against 2.0RC to allow HTTP client to use gzip compression while posting to api/put endpoint. As it is quite simple (thanks to netty) i just post it here rather that forking on github.
A 32 kbytes clear JSON file is easy to compress with gzip algorithm (32kb -> 1666 bytes), allowing putting more values in a single POST (20 times more). It is really helpful if you prefer some cpu cycles rather than many http exchanges, for example on high latency networks (umts, satelite etc).
A curl example :
$ gzip -9c clear-32k.json > gzip-32k.json
$ file gzip-32k.json
gzip-32k.json: gzip compressed data, was "clear-32k.json", from Unix, last modified: Thu Jan 16 15:31:55 2014
$ ls -l gzip-32k.json
-rw-r--r-- 1 root root 1666 févr. 4 09:57 gzip-32k.json
$ curl -X POST --data-binary "@gzip-32k.json" --header "Content-Type: application/json" --header "Content-Encoding: gzip" http://mytsdb1:4242/api/put?details
{"errors":[],"failed":0,"success":280}
Note that while aiming to allow GZIPed POST, all netty http pipeline is affected, so using gzip with other API endpoints is possible. It only allows compression in requets and doesn't modify TSDB response behaviour. The patch doesn't break clients without gzip and should be safe to use. We're using it for a couple of weeks without problem.
P