merlimat opened a new pull request #1808: Allow to configure sticky reads
URL: https://github.com/apache/bookkeeper/pull/1808
 
 
   ### Motivation
   
   Currently the BK client is issuing the read requests in round-robin fashion 
across all the bookies in the write set.
   
   One issue with this approach is that it's not taking full advantage of the 
read-ahead cache, either explicit (like in `DbLedgerStorage`) or implicit (by 
reading data through Linux page cache which will do some prefetching).
   
   With `e=2`, `w=2`, when we read `e-0` from `bookie-1` and `e-1` from 
`bookie-2`, we fail to take advantage of the fact that `bookie-1` will have 
already `e-1` in memory.
   
   Effectively with `e-2`, `w-2` the disk read IO will be doubled, compared to 
the amount of data served to BK clients. The larger the quorum, the bigger will 
be overhead (eg: `e=5`, `w=5` will lead to 5x reads from disk).
   
   ### Changes
   
   Added a BK client flag for "sticky reads". When reading from a ledger that 
has `E=W` (every bookie has all the entries), the sticky reads will direct all 
read request to 1 single bookie in the ensemble.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

Reply via email to