简体   繁体   中英

Could I can improve HBase reading performance by using Redis as cache?

HBase has its own cache system and for reading requests it will search from cache before fetch data from HDFS. But its cache performance can be hindered by JVM memory size, and this is the reason why I want to use Redis as HBase's cache.

Please don't do it. Using one database as a cache for another database can easily turn into a nightmare situation. Dealing with cache invalidation scenarios itself can be a difficult task.

  1. If you need an in-memory cache on application level, I would still discourage it, but that's a separate discussion.
  2. On database level, if HBase block cache is not good enough for your use case, either HBase is not a good system for your use case or you are not using it correctly. If your only concern is that you have a lot of memory/flash(SSD) but HBase cannot properly utilize it because of JVM restrictions; you can use HBase's bucketcache, which can be used to cache blocks off-heap or on a solid state storage (hbase.bucketcache.ioengine). I would advise you read up on HBase's caching basics here .

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM