Python Integrated Redis Sentinel (Sentinel) cluster development of the second-kill system

Source: Internet
Author: User
Tags failover redis cluster redis server nginx load balancing

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:

    • Pytho Django Development;
    • Django Web page static;
    • Python Redis Sentinel (Sentinel) cluster development;
    • Redis Pipeline, transaction implementation of the second-kill library management;
    • The Redis queue diverts access traffic;
    • Redis Sentinel (Sentinel) cluster;
    • Nginx load balancing, reverse proxy, etc.;
    • Gunicorn Web application service with high concurrency;
    • Supervisor Management process;
    • Django application deployment;
    • Distributed cluster deployment;
    • ......

      Interested in the relevant technology, you can visit our course 51CTO: Promotion pay Video course: High concurrent second kill system architecture analysis design and development

Python Integrated Redis Sentinel (Sentinel) cluster development of the second-kill system

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.