A distributed method of communication system based on redis

A communication system and distributed technology, applied in transmission systems, digital transmission systems, data exchange networks, etc., can solve the problems of poor message processing reliability and high loss risk, and achieve the effect of excellent fault handling and guaranteed availability.

Active Publication Date: 2020-11-27
CHUANGSHENG SHILIAN DIGITAL TECH BEIJING CO LTD
View PDF10 Cites 0 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

[0011] The present invention provides a distributed method for a communication system based on Redis, which solves the problems of poor message processing reliability and high risk of loss in the existing RedisPub / Sub topic subscription mode, and its technical solution is as follows:

Method used

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
View more

Image

Smart Image Click on the blue labels to locate them in the text.
Viewing Examples
Smart Image
  • A distributed method of communication system based on redis
  • A distributed method of communication system based on redis
  • A distributed method of communication system based on redis

Examples

Experimental program
Comparison scheme
Effect test

Embodiment Construction

[0031] The present invention provides a distributed method of communication system based on Redis, such as figure 2 As shown, the following architecture is used:

[0032] Including the Nginx cluster connected with the client, the load of the Nginx cluster adopts keepalived, the Nginx cluster is connected with the Gateway gateway cluster, the Gateway gateway cluster is connected with the message processor cluster and the Eureka registration center cluster, and the message processing The server cluster is connected to the Redis cluster and the Sentinel cluster respectively. The following is a detailed description of each cluster:

[0033] 1. Client: Based on the Websocket layer, the full-duplex communication between the client and the server (the message processor service that builds the Websocket service) is realized; by establishing a Websocket long connection, the client can actively send messages to the sending server through the gateway. Message, the server can also acti...

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to view more

PUM

No PUM Login to view more

Abstract

The invention provides a distributed method of a communication system based on Redis, the client establishes a Websocket long connection through the Nginx cluster and the gateway layer of the Gateway gateway cluster; the Gateway gateway cluster obtains the message processor cluster to obtain a node list, and requests the message processor to establish a connection ;The client sends a message, forwards the message request to the message processor, and the message processor publishes a message to Redis; for the subscribed client, the publisher Redis Stream structure will create a corresponding Consumer Group through xadd, and then other clients through xreadgroup and The ack mechanism ensures that messages are reliably consumed. The invention integrates message push and subscription services to form a message processor cluster separately, monitors the health status of each node through the Eureka registration center cluster, and deploys the cluster to achieve high-availability and efficient service mode of distributed cluster deployment.

Description

technical field [0001] The invention relates to a message system based on a Redis topic subscription mode, in particular to a distributed method of a Redis-based communication system. Background technique [0002] like figure 1 As shown, the existing chat system server architecture has largely solved the shortcomings of traditional chat system stand-alone deployment, achieving high availability and dynamic expansion. Using layered thinking, by separating the message flow processor separately, it is used to process the push-pull message flow, forming a separate middleware processor cluster, pushing and subscribing messages to the corresponding channel of the Redis cluster, and then forwarding the message to all other The corresponding client connected to this server. [0003] The deficiencies of prior art solutions: [0004] The existing chat system based on the Redis Pub / Sub topic subscription model still has some shortcomings, which will be analyzed below. [0005] 1. D...

Claims

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to view more

Application Information

Patent Timeline
no application Login to view more
Patent Type & Authority Patents(China)
IPC IPC(8): H04L29/08H04L12/24
CPCH04L67/141H04L67/1023H04L67/1034H04L41/0663H04L67/145H04L67/56
Inventor 王云龙董世永
Owner CHUANGSHENG SHILIAN DIGITAL TECH BEIJING CO LTD
Who we serve
  • R&D Engineer
  • R&D Manager
  • IP Professional
Why Eureka
  • Industry Leading Data Capabilities
  • Powerful AI technology
  • Patent DNA Extraction
Social media
Try Eureka
PatSnap group products