basho/riak_kv — pull request #589 by lenary (2013-06-25 16:00:25+00:00)
Title: Expose Preflist via HTTP Header

This adds a `X-Riak-Preflist` header to all non-error HTTP responses, which contains the http interface's ip/port for all the current Bucket/Key's primary nodes that the current node can reach.

In the [Dynamo paper](http://www.allthingsdistributed.com/files/amazon-dynamo-sosp2007.pdf), results are shown about allowing Clients to coordinate writes, with a significant reduction in both regular and tail latencies (§ 6.4 & Table 2).

Though we cannot allow clients to actually coordinate a read [citation needed], there should [citation needed] be a performance increase by hinting to clients which servers to aim their reads and writes at.

I'm going to work on adding support for this header to the Erlang HTTP Client, so that I can start running benchmarks to see if there is actually any performance increase. The idea is that this information is cached for a short amount of time, to speed up tight GET-PUT cycles.