-
Notifications
You must be signed in to change notification settings - Fork 158
Description
Project Incubating Request
Summary
As a caching service, Redis has become the first choice for most companies with its efficient performance, rich data types, and comprehensive interfaces. However, since all data in Redis is in memory, when the amount of data is huge, the cost will be very expensive. Therefore, many companies have developed their own caching services based on open source frameworks such as RocksDB. With the high-efficiency performance of SSD disks and the append log mode of the LSM tree, the service cost is greatly reduced at the cost of a certain loss of read and write efficiency.
Because self-developed kv store often requires large R&D and time costs, TiKV, as an excellent open source KV storage service, has powerful cluster management and data synchronization functions, making it a suitable choice. But firstly, TiKV only supports reading and writing of key-value type data, which greatly limits business application scenarios. Secondly, TiKV uses a unique client protocol. If the business is switched from Redis, the sdk needs to be changed, and the service migration cost is high.
This project hopes to encapsulate and expand the key-value interface of TiKV on top of the advantages of TiKV, and use the Redis client protocol to implement Redis data types and interface operations, while shielding the complex cluster management inside the distributed system and data synchronization operation, thereby providing a distributed SSD cache computing layer service that can replace/supplement Redis.
Motivation
This proposal mainly solves the following problems:
- TiKV only supports reading and writing of key-value type data, which greatly limits business application scenarios
- TiKV uses a unique client protocol. If the business is switched from Redis, the sdk needs to be changed, which needs high R&D costs.
- Storage and computing are not separated and do not have elastic scalability
Current Situation
- Redis data type & interface support: implements some commonly used types, such as kv, set, hash.
- The proxy layer is developed using Go, the client-service interaction protocol is thrift, and currently supports c++, java, go and python
- The existing design and code will inevitably have potential deficiencies and bugs
Targets
- The support of Redis protocol, aiming to realize all common types & interfaces
- The client can use the unified SDK to call Redis & TiKV
- The identification and separate storage of cold and hot data can be automatically derived based on statistical analysis of calls. Users can manually or automatically put cold data in kv store and hot data in redis without additional development costs