Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

Discussion on the specific functions of Codis and the problems of Redis Cluster

2025-04-05 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >

Share

Shulou(Shulou.com)06/02 Report--

This article introduces the relevant knowledge of "the specific functions of Codis and the discussion of Redis clusters". In the operation of actual cases, many people will encounter such a dilemma, so let the editor lead you to learn how to deal with these situations. I hope you can read it carefully and be able to achieve something!

1. Course name: introduction to Codis

2. Specific content

Function accomplished by Codis: highly available Redis cluster.

2.1.The problem of Redis cluster

Since the problem of cluster is to be discussed, it must be clear that master-slave relationship must be the core concept in any database system development process, because the use of master-slave relationship can ensure timely recovery after the disaster occurs.

If you use the Redis master-slave relationship directly now, you will need to configure it manually.

Then all master-slave configuration must be explicitly set through the configuration file of the slave server. if the slave server is not set, it is obviously impossible to find the corresponding master server, so it is impossible to realize the master-slave configuration, all of which require rigid configuration. If you want a rigid configuration, then you need to control the shutdown, and then synchronize the data after the configuration is completed.

So I began to think about whether there is a way to avoid the master-slave relationship realized by shutdown, and use some simple configuration logic to dynamically configure the master-slave relationship.

And if you really use redis cluster operations during the development of the project, you will also face a problem that all computers have limited memory, if there is a service that requires centralized large memory operations.

In redis, it has the characteristic that each independent redis server carries on the independent service, will not realize the cloud concept. So at this time, people will find that redis has many shortcomings.

So in this environment, there is a well-known domestic company (acquired) launched a self-developed open source project: Codis.

2.2.getting to know codis

GITHUB address of codis: https://github.com/CodisLabs/codis

It is suggested that you can make this Codis component as a tag to facilitate your own learning.

Although Codis's operation is to consolidate multiple sets of Redis servers as a whole, only its own data is saved for each group of Redis.

The Codis used this time contains two sets of supported Redis development kits (2.8,3.2.4). This time, 3.2.4 will be used directly, but keep in mind that the Redis at this time

Server startup is no longer done by the redis-server command, but by the codis-server command.

This is the end of the discussion on the specific functions of Codis and the problems of Redis clusters. Thank you for your reading. If you want to know more about the industry, you can follow the website, the editor will output more high-quality practical articles for you!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 228

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Internet Technology

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report