HBase replaces Memcachedb
Background:
Memcachedb is now unmaintained, and there are always problems, downtime and disk over.
The boss proposed to replace it and found someone to study it for many days, but there was no sound because he was busy.
It has a short life, just as the equipment is streamlined, and Memcachedb occupies several physical machines.
Two problems finally promoted the process of replacement.
Research:
The company uses HBase to provide storage services, so it studies whether HBase can be used to replace Memcachedb.
Through the study, it is found that:
In order to make up for the persistence problem of Memcached, 1.Memcachedb implements the client interface of Memcached.
two。 The interface is just an implementation, and the expiration time determination does not work for Memcachedb.
3. In terms of performance, Memcachedb implements persistence, reads and writes to the disk, and the bottleneck lies in the disk. When HBase is not cached, the worst is to read the disk. So you don't have to think too much about performance.
So Memcachedb simply provides the role of persistent storage.
This seems to be easy to do, just replace HBase read / write directly. Isn't it very simple! )
Modify:
Fortunately, when the application side operates Memcached, it encapsulates the public class and provides public jar use. Otherwise, you have to find all the applications that use the Memcached client and modify them one by one.
So change all the places in the public class that use Memcachedb to use HBase, and then publish the public package jar.
Update all new versions of the public package jar that use Memecached.
If the historical data stored in Memcachedb is useful, you need to get to the data.
Isn't it very simple!
In fact, the most difficult point is decision-making and research. For programmers to modify, So easy.