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

[NoSQL] abandon VIP and use consul and sentinel to build a highly available system for redis

2025-04-10 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >

Share

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

Background:

1. The traditional redis high availability solution only adds sentinel. After the failure of the main library, you can select the master and then switch the read-only parameters, but for the application, you need to change the connected IP or change the resolution in the hosts. It's kind of semi-automatic.

two。 Automatic failover and address resolution can be realized by using the functions of service registration and service health check of consul system.

Architecture:

Build:

1. Set up consul cluster and arrange consul agent on redis node

two。 Set up sentinel cluster

3. Registration Services (focus)

First, create a new redis master-slave detection script cat > / root/check/redis_role.sh on the redis2222 instance

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: 0

*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

Database

Wechat

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

12
Report