title: How to increase the perfomance of Thrift client Scanner queries to Hbase
body: <p>I have used thrift interface with c# to get realtime data from Hbase. My problem is that, filter queries taking too much time for the response from hbase. Sample code is given below:</p>
  
  <pre><code>string TableName="testtable";
  
  Dictionary&lt;byte[], byte[]&gt; attributes = new Dictionary&lt;byte[], byte[]&gt;(); 
  TScan scanFilter = new TScan();
  
  scanFilter.FilterString = ToByteArray("((RowFilter(&lt;=,'binary:1053_1371222000')) AND (RowFilter(&gt;=,'binary:1053_1371217740'))) OR (RowFilter(&lt;=,'binary:1055_1371222000')) AND (RowFilter(&gt;=,'binary:1055_1371217740')))");
  
  var scanner = _client.scannerOpenWithScan(ToByteArray(TableName), scanFilter, attributes);
  
  for (var entry = _client.scannerGet(scanner); entry.Count &gt; 0; entry = _client.scannerGet(scanner))
  {
  
              foreach (var rowResult in entry)
              {
          string rowkey = Encoding.UTF8.GetString(rowResult.Row);
                  Console.Write("{0} =&gt; ", rowkey);
  
      }
  </code></pre>
  
  <p>}</p>
  
  <pre><code>_client.scannerClose(scanner);
  </code></pre>
  
  <p>My question is that:</p>
  
  <p>1) how many ways we can improve the performance(optimization) of Thrift query to hbase.
  2) how to cache the Thrift query response on Hbase.
  3) how to manage load balancing of Thrift server on Master node.</p>