Redis Sentinel provides high availability (HA) services for Redis. ApsaraDB for Redis is compatible with Sentinel and can be used for services that run Sentinel. This topic describes how to enable the Sentinel-compatible mode in the ApsaraDB for Redis console.
- The engine version of the ApsaraDB for Redis instance is Redis 4.0 or Redis 5.0.
- The ApsaraDB for Redis instance runs in a VPC.
Note If the instance runs in a classic network, see Change the network type from classic network to VPC about how to switch the network type of an instance.
Introduction to Redis Sentinel
Redis Sentinel provides Redis with services such as master and replica monitoring, fault alerting, and automatic failover. Redis Sentinel is used in many business scenarios that use on-premises Redis databases and require high reliability. To facilitate the migration of Redis databases to the cloud in such scenarios, Alibaba Cloud provides the Sentinel-compatible mode.
After you enable the Sentinel-compatible mode, you can use the following commands:
|SENTINEL sentinels||Queries Sentinel instances of a specified master and the status of these Sentinel
instances. Use the following syntax:
|SENTINEL get-master-addr-by-name||Queries the IP address and port number of a specified master. Use the following syntax:
- Log on to the ApsaraDB for Redis console.
- In the top navigation bar of the page, select the region where the instance is deployed.
- On the Instances page, click the ID of the instance.
- In the left-side navigation pane, click System Parameters.
- On the System Parameters page, find the #no_loose_sentinel-enabled parameter and click Modify in the Actions column.
- In the dialog box that appears, set the parameter to yes, and click OK.
For more information about the parameters, see Parameter overview and configuration guide.
|DescribeParameters||Queries the configuration and operational parameters of an ApsaraDB for Redis instance.|
|ModifyInstanceConfig||Modifies parameters of an ApsaraDB for Redis instance.|