CN111131326A - System and method for cooperative communication of sticky real-time data - Google Patents

System and method for cooperative communication of sticky real-time data Download PDF

Info

Publication number
CN111131326A
CN111131326A CN202010008045.9A CN202010008045A CN111131326A CN 111131326 A CN111131326 A CN 111131326A CN 202010008045 A CN202010008045 A CN 202010008045A CN 111131326 A CN111131326 A CN 111131326A
Authority
CN
China
Prior art keywords
load balancer
sticky
session
application servers
client
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202010008045.9A
Other languages
Chinese (zh)
Inventor
陈霈霖
张本富
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shenzhen Weige Zhishu Technology Co Ltd
Original Assignee
Shenzhen Weige Zhishu Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Shenzhen Weige Zhishu Technology Co Ltd filed Critical Shenzhen Weige Zhishu Technology Co Ltd
Priority to CN202010008045.9A priority Critical patent/CN111131326A/en
Publication of CN111131326A publication Critical patent/CN111131326A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/14Session management
    • H04L67/146Markers for unambiguous identification of a particular session, e.g. session cookie or URL-encoding
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/10Protocols in which an application is distributed across nodes in the network
    • H04L67/1001Protocols in which an application is distributed across nodes in the network for accessing one among a plurality of replicated servers
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/2866Architectures; Arrangements
    • H04L67/30Profiles
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/50Network services
    • H04L67/56Provisioning of proxy services
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/50Network services
    • H04L67/60Scheduling or organising the servicing of application requests, e.g. requests for application data transmissions using the analysis and optimisation of the required network resources
    • H04L67/63Routing a service request depending on the request content or context
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L69/00Network arrangements, protocols or services independent of the application payload and not provided for in the other groups of this subclass
    • H04L69/16Implementation or adaptation of Internet protocol [IP], of transmission control protocol [TCP] or of user datagram protocol [UDP]
    • H04L69/161Implementation details of TCP/IP or UDP/IP stack architecture; Specification of modified or new header fields
    • H04L69/162Implementation details of TCP/IP or UDP/IP stack architecture; Specification of modified or new header fields involving adaptations of sockets based mechanisms

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Computer Security & Cryptography (AREA)
  • Computer And Data Communications (AREA)

Abstract

The invention discloses and provides a viscous real-time data cooperative communication system and method with low cost, high efficiency, high flexibility and strong safety. The viscous real-time data collaborative communication system comprises a load balancer (1) and at least two application servers (2), wherein the application servers (2) are respectively connected with the load balancer (1), the load balancer (1) is connected with a plurality of external clients (3), when the clients (3) run application programs corresponding to the application servers (2), a viscous session is generated between the clients (3) and the load balancer (1), and long connection requests from different clients (3) are automatically forwarded to the corresponding application servers (2) through the load balancer (1) within the session duration. The invention is suitable for the field of sticky real-time cooperative data communication.

Description

System and method for cooperative communication of sticky real-time data
Technical Field
The invention relates to a system and a method for collaborative communication of sticky real-time data.
Background
In numerous internet software of real-time cooperative communication, after Load Balance, namely LB, is realized between a client and an application server, because the client is randomly allocated to request to be connected to different servers by Load Balance, if some client communication requests need to maintain real-time cooperative communication and have bidirectional communication which can be polled for a long time like Websocket, the request of the client fails to find a corresponding server after Load Balance.
In large internet network architectures, since HTTP/S is a stateless protocol, session persistence is not considered when designing, many Web applications need to provide personalized user data during the session, e.g., keep a log of goods in a shopping cart, or in a chat session, and without session persistence, Web applications would have to maintain this information between multiple servers, which can be inefficient, especially for large networks.
In the prior art, the purpose of tracking and recording a fixed IP address of a server to realize persistent communication is used together with an IP _ hash upstream service, that is, when a client sends a request for the first time, a fixed IP address is injected into session communication such as session and sends a request to the fixed server, and finally, different request designations are identified by the IP address and allocated to corresponding servers.
However, the implementation scheme of using the fixed IP address of the server to store in a specific session for communication may cause data abnormality in communication, because in many cases, different browsers may use the same IP address to use a specific proxy or because the same similar IP address is forged, and the load balancing system may not recognize that the requests of different browsers come from the same IP address, which causes data abnormality. Moreover, the security of this method is very low, and the IP address of the server is easily exposed to the outside, thereby causing a great risk of attack or data leakage to the server.
Disclosure of Invention
The invention aims to overcome the defects of the prior art and provides a viscous real-time data cooperative communication system and method with low cost, high efficiency, high flexibility and strong safety.
The invention discloses a viscous real-time data cooperative communication system, which is characterized in that: the method comprises a load balancer and at least two application servers, wherein the application servers are respectively connected with the load balancer, the load balancer is connected with a plurality of external clients, when the client runs an application program corresponding to the application server, a sticky session is generated between the client and the load balancer, and long connection requests from different clients are automatically forwarded to the corresponding application servers through the load balancer within the session duration.
The sticky session is a cookie sticky session which is identified by the IP address of the injection client and the special user attribute.
The invention discloses a viscous real-time data cooperative communication method realized by the viscous real-time data cooperative communication system, which comprises the following steps:
A. configuring load balance of the application servers, and connecting the request load of each client to each application server through the load balance;
B. setting an anti-proxy Websocket in a configuration file of the load balancer;
C. running an application program on a client, and generating a cookie sticky session which is injected with an IP address of the client and a special user attribute identifier;
D. setting a duration of the cookie sticky session;
E. and D, automatically forwarding the long connection requests of the WebSocket from different clients to the corresponding application server by the load equalizer within the duration set in the step D.
The invention has the beneficial effects that: the invention can realize that the load balancer issues the sticky conversation through the client and tracks the detailed information of the client to distribute the identification attribute for the user. Based on the tracking ID, the load balancer can then begin routing all requests of that user to a particular server for the duration of the session, thereby achieving extremely high secure data communications and better performance enhancement of the application.
Drawings
Fig. 1 is a schematic diagram of the connection of the present invention.
Detailed description of the invention
As shown in fig. 1, the sticky real-time data cooperative communication system in the present invention is characterized in that: the system comprises a load balancer 1 and at least two application servers 2, in the specific embodiment, the number of the application servers 2 is three, the application servers 2 are respectively in network connection with the load balancer 1, the load balancer 1 is respectively in network connection with three clients 3 of an external browser, an IOS mobile phone and an Android mobile phone, when the client 3 runs an application program corresponding to the application server 2, a sticky session is generated between the client 3 and the load balancer 1, and long connection requests from different clients 3 are automatically forwarded to the corresponding application servers 2 through the load balancer 1 within the session duration.
The sticky session is a cookie sticky session which is identified by the IP address of the injection client and the special user attribute.
In this embodiment, the load balancer 1 requires a cloud host with low configuration, high bandwidth, and good network performance, such as Nginx. The application server 2 is a standard application server of a cloud computing platform.
The invention discloses a viscous real-time data cooperative communication method realized by the viscous real-time data cooperative communication system, which comprises the following steps:
A. configuring the load balance of the application servers 2, and connecting the request load of each client 3 into each application server 2 through the load balancer 1;
B. setting an anti-proxy Websocket in a configuration file of the load balancer 1;
C. running an application program on the client 3 to generate a cookie sticky session which is injected with the IP address of the client and a special user attribute identifier;
D. setting a duration of the cookie sticky session;
E. and D, automatically forwarding the long connection request of the WebSocket from different clients to the corresponding application server 2 by the load balancer 1 within the duration set in the step D.
In step B, for setting an anti-proxy WebSocket in the configuration file of the load balancer 1, the following is a configuration based on Nginx:
http { server { list 80, server _ name app.vikadata.com, { location/{ proxy _ set _ header X-Forwarded-For $ proxy _ add _ X _ Forwarded _ For, # Start WebSockets service proxy _ http _ version 1.1, # proxy _ set _ header $ Host, # proxy _ http _ update, # proxy _ set _ header Connection "update" } stream nodes { # open sticky session IP _ hash based on IP address, server app01:80, server app02:80, server app03:80 } }
The invention is mainly used for protecting the viscous session load balance which utilizes the load balancer to realize high-safety and high-performance long-time communication, can be provided in real-time cooperative software and even large-scale internet architectures, provides an effective and accurate method for maintaining session information between a client (such as a web browser) and a server, and can help to reduce network workload.
Load balancing of sticky real-time collaborative data communication is a sticky session persistence process in which a load balancer creates an association between a client and a particular web server for the duration of a session (i.e., the time a particular IP spends on a web site). Using sticky sessions can help improve user experience and optimize the use of network resources. For sticky sessions, the load balancer typically assigns an identifying attribute to the user by publishing cookies or tracking details of its client (e.g., the client's IP address). Based on the tracking ID, the load balancer may then begin routing all requests for that user to a particular server for the duration of the session.
Session stickiness provides a number of benefits that can improve Web application performance:
one, minimize data exchange, with sticky sessions, servers in the network do not need to exchange session data, which is an expensive process when deployed on a large scale.
And secondly, the utilization rate of the RAM cache is increased, and the viscous session can more effectively utilize the RAM cache of the application program, so that the response speed is increased.
Thirdly, the security is high, and the transfer of the private information and the sensitive data in the communication process between the application program and the server can be better protected by using the sticky session
And fourthly, the flexibility is high, a sticky session with a specific valid time range can be sent out by the load balancer, the session does not have stickiness after the sticky session is expired, or the application program can generate a sticky session and follow the life cycle of the specified session (such as cookie life cycle), so that the user is ensured not to be sent to the server side after the local session is expired.
The invention is suitable for the field of sticky real-time cooperative data communication.
While the embodiments of the present invention have been described in terms of practical embodiments, they are not to be construed as limiting the meaning of the present invention, and modifications of the embodiments and combinations with other embodiments will be apparent to those skilled in the art in light of the present description.

Claims (3)

1. A sticky real-time data collaborative communication system, characterized by: the system comprises a load balancer (1) and at least two application servers (2), wherein the application servers (2) are respectively connected with the load balancer (1), the load balancer (1) is connected with a plurality of external clients (3), when the clients (3) run application programs corresponding to the application servers (2), a sticky session is generated between the clients (3) and the load balancer (1), and long connection requests from different clients (3) are automatically forwarded to the corresponding application servers (2) through the load balancer (1) within the session duration.
2. The system according to claim 1, wherein: the sticky session is a cookie sticky session which is identified by the IP address of the injection client and the special user attribute.
3. A sticky real-time data cooperative communication method implemented by a sticky real-time data cooperative communication system according to claim 2, comprising the steps of:
A. configuring load balancing of the application servers (2), and connecting the request load of each client (3) into each application server (2) through the load balancer (1);
B. setting an anti-proxy WebSocket in a configuration file of the load balancer (1);
C. running an application program on a client (3) to generate a cookie sticky session which is injected with an IP address of the client and a special user attribute identifier;
D. setting a duration of the cookie sticky session;
E. and D, automatically forwarding the long connection requests of the WebSocket from different clients to the corresponding application server (2) by the load equalizer (1) within the duration set in the step D.
CN202010008045.9A 2020-01-06 2020-01-06 System and method for cooperative communication of sticky real-time data Pending CN111131326A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010008045.9A CN111131326A (en) 2020-01-06 2020-01-06 System and method for cooperative communication of sticky real-time data

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010008045.9A CN111131326A (en) 2020-01-06 2020-01-06 System and method for cooperative communication of sticky real-time data

Publications (1)

Publication Number Publication Date
CN111131326A true CN111131326A (en) 2020-05-08

Family

ID=70486821

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010008045.9A Pending CN111131326A (en) 2020-01-06 2020-01-06 System and method for cooperative communication of sticky real-time data

Country Status (1)

Country Link
CN (1) CN111131326A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116800473A (en) * 2023-05-10 2023-09-22 广州市玄武无线科技股份有限公司 Method, device, storage medium and system for communication between client and cloud service

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20050010754A1 (en) * 1999-09-01 2005-01-13 Resonate Inc. Atomic session-start operation combining clear-text and encrypted sessions to provide ID visibility to middleware such as load-balancers
US7088718B1 (en) * 2002-03-19 2006-08-08 Cisco Technology, Inc. Server load balancing using IP option field approach to identify route to selected server
CN104836839A (en) * 2015-03-30 2015-08-12 南京大学 Universal user self-defining session system and session management method thereof
CN108881430A (en) * 2018-06-14 2018-11-23 平安科技(深圳)有限公司 Session keeping method, device, computer equipment and storage medium
CN109672711A (en) * 2017-10-17 2019-04-23 航天信息股份有限公司 A kind of http request processing method and system based on Reverse Proxy Nginx

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20050010754A1 (en) * 1999-09-01 2005-01-13 Resonate Inc. Atomic session-start operation combining clear-text and encrypted sessions to provide ID visibility to middleware such as load-balancers
US7088718B1 (en) * 2002-03-19 2006-08-08 Cisco Technology, Inc. Server load balancing using IP option field approach to identify route to selected server
CN104836839A (en) * 2015-03-30 2015-08-12 南京大学 Universal user self-defining session system and session management method thereof
CN109672711A (en) * 2017-10-17 2019-04-23 航天信息股份有限公司 A kind of http request processing method and system based on Reverse Proxy Nginx
CN108881430A (en) * 2018-06-14 2018-11-23 平安科技(深圳)有限公司 Session keeping method, device, computer equipment and storage medium

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
木华思流年: "nginx 配置websocket负载均衡", 《HTTPS://BLOG.CSDN.NET/WANCHAOPENG/ARTICLE/DETAILS/102958154》 *

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116800473A (en) * 2023-05-10 2023-09-22 广州市玄武无线科技股份有限公司 Method, device, storage medium and system for communication between client and cloud service

Similar Documents

Publication Publication Date Title
CN111314499B (en) Domain name proxy method, device, equipment and readable storage medium
US8423650B2 (en) Transferring session data between network applications
CN104009938A (en) Method and system for long connections based on router level
CN107707943A (en) A kind of method and system for realizing cloud service fusion
CN102845123A (en) Virtual private cloud connection method and tunnel proxy server
EP3629557B1 (en) System and method of delivering data that provides service differentiation and monetization in mobile data networks
CN104994079A (en) Access request processing method, access request processing device and acceleration server
CN101997822A (en) Streaming media content delivery method, system and equipment
CN107222561A (en) A kind of transport layer reverse proxy method
CN103401946A (en) HTTP (hyper text transfer protocol) uploading acceleration method and system
CN104010001B (en) In mobile terminal, the method and system connecting communication is carried out in similar networking request
WO2010013251A1 (en) Internet control management and accounting in a utility computing environment
CN103580988A (en) Method for message receiving, pushing and transmitting, device, server group and system
US20170149916A1 (en) Page Push Method, Device and Server, and Centralized Network Management Controller
CN103401799A (en) Method and device for realizing load balance
CN116633934A (en) Load balancing method, device, node and storage medium
CN106911732A (en) A kind of website visiting accelerating method and device
WO2017097092A1 (en) Method and system for processing cache cluster service
CN111131326A (en) System and method for cooperative communication of sticky real-time data
CN107347100B (en) Transparent proxy forwarding method for content distribution network
EP2798518B1 (en) Enhanced thread handling in security handshaking
US11038922B2 (en) Secure traffic optimization in an edge network
CN107493254B (en) TCP message forwarding method, device and system
Ke et al. Load balancing using P4 in software-defined networks
CN105681266A (en) Communication cluster method and device for MMTel (MultiMedia Telephony)

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
RJ01 Rejection of invention patent application after publication

Application publication date: 20200508

RJ01 Rejection of invention patent application after publication