Background: GaussDB(for Redis) is an enterprise-level Redis developed by Huawei cloud database team. It is fully compatible with open source Redis and can significantly reduce costs and provide more stable and reliable KV storage services.

First, everything starts with a late-night demand

One night, xiaoqiangqiang, as a back-end expert, was just about to call it a day when his boss called: “Xiaoqiangqiang, our Redis are too mixed, dozens of sets, what specifications are available! There must be a lot of wasted resources! You are responsible for a special project to reduce cost and increase efficiency, to reduce the cost of using Redis, but also to make the operation and maintenance students easier.”

Although we are young, we are experienced. Xiaoqiang qiang patted his chest and accepted the demand, and roughly had the idea (as shown) : ****

Figure 1 Redis resource integration + cost reduction + easy operation and maintenance

“The key to getting this done is to use more than one Redis!” , Xiaoqiangqiang immediately came up with two plans:

Solution 1: Ask the business student to prefix the key. This solution seems to meet the requirements, but it is not preferred because of poor isolation, a large number of key prefixes occupy space, and business transformation is troublesome.

Scheme 2: Use multiple DB of Redis. The exclusive DATABASE can be accessed by using the select command. In addition, the flushdb command can flushdb data with one click.

Second, open source Redis more DB is chicken ribs

However, as an experienced backend developer, Xiaoqiangqiang identified the serious pitfalls of Plan 2 ahead of time:

  • Open source Redis “multi-DB” can only be used for single machine, does not support cluster, can not handle later expansion.
  • Single Redis scaling up to 64GB was the limit, not to mention the 50% capacity utilization due to fork.

In other words, as the business grows, multiple businesses are crammed into a set of open source Redis with a capacity of only 64 GIGABytes, which means that when memory runs out, some business has to move out!

FIG. 2 Open source Redis with multiple DB cannot be extended and can only be re-split later

Doesn’t that bring us back to the original question **? Open source Redis multi DB scheme is obviously not in line with the senior backend identity, to this, small strong determined to say no!

Well, open source Redis is much DB, it seems that you really can’t help!

3, When multiple DB databases encounter GaussDB(for Redis)

As mentioned above, “multiple DB” is the most needed function of small strong at the moment, but open source Redis multiple DB has a serious hidden danger that can not be expanded later. In order to solve the problem, Little Mighty found a product that really solved the pain point: GaussDB(for Redis). * * * *

In the use of multiple DB databases, GaussDB(for Redis) is the same as open-source Redis, implementing data isolation in the same instance. The core values of GaussDB(for Redis) are as follows:

  • Throughput can be horizontally expanded to millions of QPS, capacity support 12TB, to solve the scalability problem;
  • Compared with open source Redis, the cost can be reduced by 20%~70%;
  • A single instance supports 6w+DB to isolate large-scale services from multiple leases.

Based on the GaussDB(for Redis) multi-DB function, service tenants can share one GaussDB(for Redis), which not only reduces costs but also perfectly covers the growth of services in the later period.

Figure 3 Multi-dB GaussDB(for Redis) implements multi-lease service isolation

Finally got a real solution! The little strongman can safely cross the line. Finally, one more call for usable products:

GaussDB(for Redis) supports truly scalable multi-DB, easy cost reduction, simply YYDS!

Fourth, the appendix

  • Author: Huawei cloud database GaussDB(for Redis) team
  • Resume from Hangzhou/Xi ‘an/Shenzhen: [email protected]
  • Blog: bbs.huaweicloud.com/blogs/24887…

Huawei cloud annual procurement season grand opening! Click for details: activity.huaweicloud.com/dbs_Promoti…