We know that the most important feature of the second kill system is the instantaneous high concurrency and high traffic volume system. We also want to make sure it's high availability.
Here we develop a second-kill system using the Python Django Integrated Redis Sentinel (Sentinel) cluster.
Redis Sentinel (Sentinel) cluster
Redis Sentinel provides high availability for Redis clusters. In fact, this means that we can use Sentinel mode to create a Redis cluster deployment that can handle various failures without human intervention. Can greatly improve the high availability of the system.
Sentinel mode also provides additional features such as monitoring, notification, and configuration for the client.
The following is a list of the features of Sentinel mode on a macro level:
- Monitoring: Sentinel constantly checks whether master and slave are running properly.
- Notification: When a problem occurs with a Redis instance that is being monitored, the system administrator and other applications can be notified through the API.
- Automatic failover: If a master is not functioning properly, the Sentinel can start a failover process, upgrade one slave to master, the other slave be reconfigured to use the new master, and the application uses the new address of the REDIS server notification.
- Configuration provider: Sentinel as the authoritative source of Redis client discovery, the client connects to the sentry requesting the current trusted master address. If a failure occurs, the Sentinel will report the new address.
Redis Sentinel is a distributed system that performs fault detection when multiple sentinels are used to agree on a master no longer available. This reduces the probability of error judgment. The sentry works even when not all Sentinels are working, making the system robust against failure.
Our course uses three Redis Sentinel integrated Redis instances (master and slave) clusters to build a cache system for the second-kill system.
Second kill system deployment diagram:
Second-kill system involves the main technologies are:
Python Integrated Redis Sentinel (Sentinel) cluster development of the second-kill system