CN114866596B - Session processing method, session processing device, server and storage medium - Google Patents
Session processing method, session processing device, server and storage medium Download PDFInfo
- Publication number
- CN114866596B CN114866596B CN202210577658.3A CN202210577658A CN114866596B CN 114866596 B CN114866596 B CN 114866596B CN 202210577658 A CN202210577658 A CN 202210577658A CN 114866596 B CN114866596 B CN 114866596B
- Authority
- CN
- China
- Prior art keywords
- session
- session request
- target server
- request
- domain name
- 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.)
- Active
Links
- 238000012545 processing Methods 0.000 title claims abstract description 23
- 238000003672 processing method Methods 0.000 title claims abstract description 23
- 238000000034 method Methods 0.000 claims abstract description 20
- 230000004044 response Effects 0.000 claims description 28
- 230000001960 triggered effect Effects 0.000 claims description 5
- 238000012986 modification Methods 0.000 claims description 4
- 230000004048 modification Effects 0.000 claims description 4
- 238000005516 engineering process Methods 0.000 abstract description 2
- 238000004590 computer program Methods 0.000 description 7
- 230000005540 biological transmission Effects 0.000 description 6
- 238000010586 diagram Methods 0.000 description 4
- 230000006870 function Effects 0.000 description 3
- 238000004891 communication Methods 0.000 description 2
- 230000009286 beneficial effect Effects 0.000 description 1
- 238000011161 development Methods 0.000 description 1
- 230000000694 effects Effects 0.000 description 1
- 238000001914 filtration Methods 0.000 description 1
- 238000012423 maintenance Methods 0.000 description 1
- 230000007246 mechanism Effects 0.000 description 1
- 238000010295 mobile communication Methods 0.000 description 1
- 230000003287 optical effect Effects 0.000 description 1
- 230000002265 prevention Effects 0.000 description 1
- 230000008569 process Effects 0.000 description 1
- 230000008707 rearrangement Effects 0.000 description 1
- 238000006467 substitution reaction Methods 0.000 description 1
- 238000012546 transfer Methods 0.000 description 1
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L67/00—Network arrangements or protocols for supporting network services or applications
- H04L67/14—Session management
- H04L67/141—Setup of application sessions
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L67/00—Network arrangements or protocols for supporting network services or applications
- H04L67/14—Session management
- H04L67/146—Markers for unambiguous identification of a particular session, e.g. session cookie or URL-encoding
Landscapes
- Engineering & Computer Science (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Computer And Data Communications (AREA)
Abstract
The invention discloses a session processing method, a session processing device, a server and a storage medium, and relates to the webpage application technology. The method comprises the following steps: responding to a first session request, wherein a target server of a target data center responds to the first session request, and the first session request is a request initiated when a target domain name is accessed for the first time; acquiring a session identifier of a first session request, and establishing an association relationship between the session identifier and a target server; and responding to the second session request, determining a target server according to the association relation, and responding to the second session request through the target server. When a user initiates a first session request, the server establishes an association relation between a session identifier and a target server, when the user initiates a second session request, the target server responding to the user session request before is determined according to the association relation, the second session request is responded through the target server, the session requests initiated by the same user for many times are responded by the same target server, and the fault tolerance rate of session processing is improved.
Description
Technical Field
The embodiment of the invention relates to the technical field of communication, in particular to a session processing method, a session processing device, a server and a storage medium.
Background
With the development of network technology, internet banking systems are deployed with a plurality of data centers for responding to user-initiated web application sessions.
There is only one data processing center in the conventional session mechanism. In a scenario of multiple data processing centers, when a user issues multiple requests to an internet banking system, there are cases where the requests are distributed to different data processing centers, resulting in session failure. How to improve the fault tolerance of session processing is a problem to be solved.
Disclosure of Invention
The invention provides a session processing method, a session processing device, a server and a storage medium, so as to improve the fault tolerance of session processing.
In a first aspect, an embodiment of the present invention provides a session processing method, including:
responding to a first session request, wherein a target server of a target data center responds to the first session request, and the first session request is a request initiated when a target domain name is accessed for the first time;
acquiring a session identifier of a first session request, and establishing an association relationship between the session identifier and a target server;
And responding to the second session request, determining a target server according to the association relation, and responding to the second session request through the target server.
In a second aspect, an embodiment of the present invention further provides a session processing apparatus, including:
the first session response module is used for responding to the first session request, and the target server of the target data center is allocated to respond to the first session request, wherein the first session request is a request initiated when the target domain name is accessed for the first time;
The association relation establishing module is used for acquiring the session identifier of the first session request and establishing the association relation between the session identifier and the target server;
And the second session response module is used for responding to the second session request, determining a target server according to the association relation and responding to the second session request through the target server.
In a third aspect, an embodiment of the present invention further provides a server, where the server includes:
One or more processors;
Storage means for storing one or more programs,
When the one or more programs are executed by the one or more processors, the one or more processors are caused to implement the session processing method as shown in the embodiment of the present application.
In a fourth aspect, embodiments of the present application also provide a storage medium containing computer-executable instructions, which when executed by a computer processor, are configured to perform a session processing method as shown in the embodiments of the present application.
In a fifth aspect, embodiments of the present application further provide a computer program product, including a computer program, wherein the computer program when executed by a processor implements a session handling method as shown in the embodiments of the present application.
In the session processing method provided by the embodiment of the invention, in response to a first session request, a target server of a target data center is allocated to respond to the first session request, wherein the first session request is a request initiated when a target domain name is accessed for the first time; acquiring a session identifier of a first session request, and establishing an association relationship between the session identifier and a target server; and responding to the second session request, determining a target server according to the association relation, and responding to the second session request through the target server. Compared with the prior art that the session requests initiated by the users are distributed to different data centers, the embodiment of the invention can establish the association relation between the session identifier and the target server when the users initiate the first session request, and when the users initiate the second session request, the target server which responds to the user session request before is determined according to the association relation, and the second session request is responded by the target server, so that the session requests initiated by the same users for multiple times are responded by the same target server, and the fault tolerance of session processing is improved.
Drawings
Fig. 1 is a flowchart of a session processing method in the first embodiment of the present invention;
Fig. 2 is a flowchart of a session processing method in the second embodiment of the present invention;
fig. 3 is a schematic structural diagram of a session processing apparatus in a third embodiment of the present invention;
fig. 4 is a schematic structural diagram of a server in a fourth embodiment of the present invention.
Detailed Description
The invention is described in further detail below with reference to the drawings and examples. It is to be understood that the specific embodiments described herein are merely illustrative of the invention and are not limiting thereof. It should be further noted that, for convenience of description, only some, but not all of the structures related to the present invention are shown in the drawings.
It should be noted that: like reference numerals and letters denote like items in the following figures, and thus once an item is defined in one figure, no further definition or explanation thereof is necessary in the following figures. Meanwhile, in the description of the present application, the terms "first", "second", and the like are used only to distinguish the description, and are not to be construed as indicating or implying relative importance. The technical scheme of the application obtains, stores, uses, processes and the like the data, which all meet the relevant regulations of national laws and regulations.
Currently, internet banking systems deploy data centers in different regions, session requests initiated by users are distributed to a certain container of the data center through a Domain name resolution server (Domain NAME SERVER, DNS), load balancing LTM equipment, a firewall WAF (Web application protection system, also called as a website application level intrusion prevention system, web Application Firewall, WAF) and a Gateway, and a server responding to the session requests is operated in the container. But as the user initiates a session request multiple times, each session request may be distributed to different servers. For example, a first session request initiated by a user in the morning is assigned to data center A and a second session request initiated by a user in the afternoon is assigned to data center B. Since the data in the different data processing centers are not shared, data center B does not store the data involved in the first session in data center a, resulting in a failure of the second session request.
According to the session processing method provided by the embodiment of the invention, the association relation between the session identifier and the target server is established when the first session request is responded. When the second session request is responded, the target server is determined according to the association relation established in advance, so that a plurality of session requests initiated by the user can be responded by the same target server, the condition that the plurality of session requests initiated by the user are distributed to different servers for responding is avoided, and the fault tolerance rate is improved.
Example 1
Fig. 1 is a flowchart of a session processing method according to an embodiment of the present invention, where the embodiment is applicable to a case of responding to a web session request, and the method may be performed by a server that distributes a session request, and specifically includes the following steps:
Step 110, in response to the first session request, a target server of the distribution target data center responds to the first session request.
Wherein the first session request is a request initiated when the target domain name is first accessed.
The user accesses the homepage through the client. When the user first triggers the login page in the homepage, a first session request is triggered. The first session request is sent to a load balancing device, which distributes the first session request to a target server response of a target data center according to load conditions of the plurality of data centers. The target data center includes a plurality of containers, each container containing at least one server. Each container is secured by a firewall WAF, and the first session request is routed through the gateway to the target server through filtering by the firewall WAF.
After the user initiates the first session request, the user communicates with the target server through the channel established by the first session request to complete the business operation. The business operations may include business content contained in an online banking page, such as business operations of balance inquiry, money transfer, financial business transaction, and the like.
Alternatively, the target server that distributes the target data center responds to the first session request by:
Step 111, determining domain name information used by the client for subsequent access.
The client is a user operated device that initiates a first session request. Multiple pieces of domain name information can be set to provide access for different clients, so that slow response caused by centralized access of a user to one piece of domain name information is avoided. A fixed domain name information may be determined for subsequent access by the client. After the user triggers the first session request in the homepage, the user can jump according to the fixed domain name information, so that the jump stability is improved.
Optionally, determining domain name information used by the client for subsequent access may be implemented as:
And determining domain name information used by the client for subsequent access according to the region information of the first session request.
The regional information of the client can be acquired through the router frouter, and domain name information used by the client for subsequent access is determined according to the regional information. Illustratively, frouter is deployed under the home domain name. When the user accesses the homepage through the client and triggers the first session request in the homepage, frouter identifies the region information where the first session request is located, and determines domain name information according to the region information.
Step 112, allocating a target server for responding to the first session request, the target server being located at the target data center.
And the load balancing determines a target data center according to the load condition of each data center. A target server for responding to the first session request is determined by the target data center.
Step 113, domain name information is sent to the page, so that the client initiates a subsequent request of the first session request through the page.
And returning the domain name information determined in the step 111 to the page, wherein after the page acquires the domain name information, the follow-up requests of the first session request are all accessed by the domain name information.
Step 114, responding to the subsequent request by the target server.
Frouter can accurately acquire the region information of the client, further determine the fixed domain name information to the page, enable the client to access with the domain name information later, trigger the subsequent request, and improve the triggering stability of the session request.
Step 120, a session identifier of the first session request is obtained, and an association relationship between the session identifier and the target server is established.
The tomcat server can generate jsesionid, the jsesionid is used as a session identifier, and the association relationship between the jsesionid and the target server is established. The association represents a session request issued by the target server in response to the session represented by jsesionid. The same user has a unique session identification in one container, so the session can be marked inside the data center using jsesionid.
Optionally, the session identifier of the first session request is obtained, and the association relationship between the session identifier and the target server is established, which may be implemented by the following manner:
step 121, performing SSL offloading on the first session request, and determining a session identifier of the first session request according to the offloading result.
When the first session request is triggered, the first session request is transmitted over a secure socket protocol (Secure Sockets Layer, SSL). And performing secure socket protocol SSL offloading through the NAT64 network equipment to obtain an offloading result, wherein the offloading result comprises a session identifier first session request. A session identification is extracted from the first session request.
Step 122, marking according to the firewall device WAF in communication with the load balancing device LTM.
The load balancing device LTM may be connected to a plurality of data centers. Optionally, each data center may also set a load balancing device LTM at the data center level. Each server in the data center is configured with a firewall device WAF. By marking the load balancing device that transmitted the first session request and the firewall device WAF, the transmission path of the first session request can be recorded.
Step 123, obtaining a container at the back end of the firewall equipment WAF, wherein a target server for responding to the session request runs in the container.
The firewall equipment WAF is used for protecting the target server in the container, and the target server can be accurately positioned according to the marking of the firewall equipment WAF communicated by the load balancing equipment LTM.
And 124, establishing association relation according to the session identification, the firewall equipment and the container.
The firewall device and the container identify a path of the target server. The association relationship is used for associating the session identifier with the path of the target server.
And 130, responding to the second session request, determining a target server according to the association relation, and responding to the second session request through the target server.
The second session request is a session request re-issued by the user through the client. The second session request may be a session request triggered by the client in the first page for the nth time, and N may be an integer greater than or equal to 2. When the user initiates the second session request by the client, the page provides the page for the user to initiate the subsequent request of the second session request according to the domain name information. After receiving the second session request, the server determines a target server for responding to the user session request according to the association relationship obtained in step 120.
Optionally, determining the target server according to the association relationship may be implemented as:
Determining whether the association relation is valid according to the time interval of the second session request and the first session request; and if the association relation is effective, determining the target server according to the association relation.
Alternatively, a first preset interval of session hold may be configured. If the time interval between the second session request and the first session request is smaller than or equal to the first preset interval, the association relation is determined to be valid. Otherwise, if the time interval between the second session request and the first session request is greater than the first preset interval, determining that the association relationship is invalid.
Further, a second preset interval may also be set. The second preset interval may be a session maintenance interval between the load balancing LTM and the firewall device WAF. After receiving the first session request, the server establishes a transmission channel of session data between the load balancing LTM and the firewall device WAF, where the transmission channel remains valid for a second preset interval. If the second session request is received within the second preset interval, multiplexing of the transmission channels may be performed. And if the second preset interval is exceeded, releasing the transmission channel. And when the second session request is received beyond the second preset interval, reestablishing a transmission channel of the second session according to the association relation.
In the session processing method provided by the embodiment of the invention, in response to a first session request, a target server of a target data center is allocated to respond to the first session request, wherein the first session request is a request initiated when a target domain name is accessed for the first time; acquiring a session identifier of a first session request, and establishing an association relationship between the session identifier and a target server; and responding to the second session request, determining a target server according to the association relation, and responding to the second session request through the target server. Compared with the prior art that the session requests initiated by the users are distributed to different data centers, the embodiment of the invention can establish the association relation between the session identifier and the target server when the users initiate the first session request, and when the users initiate the second session request, the target server which responds to the user session request before is determined according to the association relation, and the second session request is responded by the target server, so that the session requests initiated by the same users for multiple times are responded by the same target server, and the fault tolerance of session processing is improved.
Example two
Fig. 2 is a flowchart of a session processing method according to a second embodiment of the present invention, as a further explanation of the foregoing embodiment, after determining domain name information used by a client for subsequent access, the method further includes: writing the domain name correspondence relation between the client and the domain name information into a configuration file; correspondingly, responding to the second session request by the target server includes: acquiring domain name information accessed by a client according to a configuration file; the domain name information is sent to the page so that the client initiates a subsequent request of the second session request through the page. The method can be implemented by the following modes:
Step 201, in response to the first session request, determining domain name information used by the client for subsequent access.
Step 202, writing the domain name correspondence between the client and the domain name information into a configuration file.
After determining the domain name information used by the client for subsequent access, the domain name information is written into the configuration file. The configuration file is used for storing domain name information used by the client.
Alternatively, the user may be assigned fixed domain name information based on the user name or client. For example, a certain group of users is assigned specific domain name information. When any user in the group users accesses the first page to trigger the session request, the specific domain name information is returned to the page of the group users for display. An administrator can quickly and accurately manage domain name information of a user through a configuration file. For example, when a web server of a certain domain name information fails and service distribution needs to be performed temporarily, the domain name information in the configuration file can be modified to quickly distribute, so that service access stability is improved.
Furthermore, specific domain name information can be configured for a part of users in the group users according to a preset proportion, and other users in the group users can determine the domain name information according to the region information. The method and the device realize the configuration of the domain name information for the user according to the preset proportion, and further compare the service operation effect of the specific domain name information and the domain name information determined according to the region information.
Step 203, allocating a target server for responding to the first session request, the target server being located in a target data center.
Step 204, domain name information is sent to the page, so that the client initiates a subsequent request of the first session request through the page.
Step 205, response to the subsequent request by the target server.
Step 206, obtaining the session identifier of the first session request, and establishing the association relationship between the session identifier and the target server.
Step 207, in response to the second session request, determining the target server according to the association relation.
Step 208, obtaining domain name information accessed by the client according to the configuration file.
Step 209, the domain name information is sent to the page, so that the client initiates a subsequent request of the second session request through the page.
Further, in step 202, after writing the domain name correspondence between the client and the domain name information into the configuration file, the method further includes:
Responding to the modification operation of the administrator, and modifying the domain name correspondence in the configuration file; obtaining abstract information of the configuration file according to the first time interval; determining whether the configuration file is updated according to the abstract information; if the configuration file is updated, acquiring updated domain name information according to the configuration file; and sending the updated domain name information to the page.
In order to ensure the real-time performance of the configuration file, the summary information can be acquired according to the first time interval. The summary information of the configuration file is calculated according to the MD5 Message-Digest Algorithm (MD 5). If the summary information obtained in adjacent time intervals is the same, it is determined that no update exists. Otherwise, if the abstract information obtained by the adjacent time intervals is different, determining that the update exists. At Frouter application start-up, the configuration file for the relevant domain name in the configuration center is loaded and the file is abstracted using the md5 algorithm. If there is an update, the updated configuration file is sent to frouter to improve accuracy of the domain name information. When frouter is started, the summary information of the configuration file is obtained at intervals of a first time (such as one minute), and if the values of the summary information obtained at adjacent time intervals are different, the file content is reloaded.
The session processing method provided by the embodiment of the invention can effectively shunt and timely and accurately update the domain name information through the configuration file, thereby improving the access stability of the client.
Example III
Fig. 3 is a schematic structural diagram of a session processing apparatus according to a third embodiment of the present invention, where the present embodiment is applicable to a case of responding to a web session request, and the method may be performed by a server that distributes a session request, and specifically includes: a first session response module 310, an association establishment module 320, and a second session response module 330.
A first session response module 310, configured to respond to a first session request, where the target server of the target data center is allocated to respond to the first session request, and the first session request is a request initiated when the target domain name is accessed for the first time;
the association relationship establishing module 320 is configured to obtain a session identifier of the first session request, and establish an association relationship between the session identifier and the target server;
And the second session response module 330 is configured to respond to the second session request by determining a target server according to the association relationship and responding to the second session request through the target server.
Based on the above embodiment, the association relationship establishing module 320 is configured to:
SSL unloading is carried out on the first session request, and the session identification of the first session request is determined according to the unloading result;
Marking according to a firewall device WAF communicated with a load balancing device LTM;
acquiring a container at the back end of the WAF of the firewall equipment, wherein a target server for responding to the session request is operated in the container;
and establishing an association relationship according to the session identification, the firewall equipment and the container.
On the basis of the above embodiment, the second session response module 330 is configured to:
Determining whether the association relation is valid according to the time interval of the second session request and the first session request;
And if the association relation is effective, determining the target server according to the association relation.
Based on the above embodiment, the first session response module 310 is configured to:
determining domain name information used by the client for subsequent access;
distributing a target server for responding to the first session request, wherein the target server is positioned in a target data center;
Sending the domain name information to the page so that the client initiates a subsequent request of the first session request through the page;
The subsequent request is responded to by the target server.
Based on the above embodiment, the first session response module 310 is configured to:
And determining domain name information used by the client for subsequent access according to the region information of the first session request.
On the basis of the above embodiment, the first session response module 310 is further configured to:
writing the domain name correspondence relation between the client and the domain name information into a configuration file;
The corresponding second session response module 330 is configured to:
acquiring domain name information accessed by a client according to a configuration file;
The domain name information is sent to the page so that the client initiates a subsequent request of the second session request through the page.
On the basis of the above embodiment, the system further includes a configuration file updating module, where the configuration file updating module is configured to:
Responding to the modification operation of the administrator, and modifying the domain name correspondence in the configuration file;
obtaining abstract information of the configuration file according to the first time interval;
Determining whether the configuration file is updated according to the abstract information;
If the configuration file is updated, acquiring updated domain name information according to the configuration file;
And sending the updated domain name information to the page.
In the session processing device provided by the embodiment of the present invention, the first session response module 310 is configured to respond to a first session request, where the first session request is a request initiated when the target domain name is accessed for the first time, and the target server of the target data center is allocated to respond to the first session request; the association relationship establishing module 320 is configured to obtain a session identifier of the first session request, and establish an association relationship between the session identifier and the target server; and the second session response module 330 is configured to respond to the second session request by determining a target server according to the association relationship and responding to the second session request through the target server. Compared with the prior art that the session requests initiated by the users are distributed to different data centers, the embodiment of the invention can establish the association relation between the session identifier and the target server when the users initiate the first session request, and when the users initiate the second session request, the target server which responds to the user session request before is determined according to the association relation, and the second session request is responded by the target server, so that the session requests initiated by the same users for multiple times are responded by the same target server, and the fault tolerance of session processing is improved.
The session processing device provided by the embodiment of the invention can execute the session processing method provided by any embodiment of the invention, and has the corresponding functional modules and beneficial effects of the execution method.
Example IV
Fig. 4 is a schematic structural diagram of a server according to a fourth embodiment of the present invention, and as shown in fig. 4, the server includes a processor 40, a memory 41, an input device 42 and an output device 43; the number of processors 40 in the server may be one or more, one processor 40 being taken as an example in fig. 4; the processor 40, the memory 41, the input means 42 and the output means 43 in the server may be connected by a bus or other means, in fig. 4 by way of example.
The memory 41 is a computer readable storage medium, and may be used to store a software program, a computer executable program, and modules, such as program instructions/modules corresponding to the session processing method in the embodiment of the present invention (for example, the first session response module 310, the association relationship establishment module 320, the second session response module 330, and the configuration file update module in the session processing apparatus). The processor 40 executes various functional applications of the server and data processing, i.e., implements the session processing method described above, by running software programs, instructions, and modules stored in the memory 41.
The memory 41 may mainly include a storage program area and a storage data area, wherein the storage program area may store an operating system, at least one application program required for functions; the storage data area may store data created according to the use of the terminal, etc. In addition, memory 41 may include high-speed random access memory, and may also include non-volatile memory, such as at least one magnetic disk storage device, flash memory device, or other non-volatile solid-state storage device. In some examples, memory 41 may further comprise memory located remotely from processor 40, which may be connected to a server via a network. Examples of such networks include, but are not limited to, the internet, intranets, local area networks, mobile communication networks, and combinations thereof.
The input device 42 is operable to receive input numeric or character information and to generate key signal inputs related to user settings and function control of the server. The output means 43 may comprise a display device such as a display screen.
Example five
A fifth embodiment of the present invention also provides a storage medium containing computer-executable instructions, which when executed by a computer processor, are configured to perform a session processing method, the method comprising:
responding to a first session request, wherein a target server of a target data center responds to the first session request, and the first session request is a request initiated when a target domain name is accessed for the first time;
acquiring a session identifier of a first session request, and establishing an association relationship between the session identifier and a target server;
And responding to the second session request, determining a target server according to the association relation, and responding to the second session request through the target server.
Based on the above embodiment, obtaining the session identifier of the first session request, and establishing the association relationship between the session identifier and the target server, includes:
SSL unloading is carried out on the first session request, and the session identification of the first session request is determined according to the unloading result;
Marking according to a firewall device WAF communicated with a load balancing device LTM;
acquiring a container at the back end of the WAF of the firewall equipment, wherein a target server for responding to the session request is operated in the container;
and establishing an association relationship according to the session identification, the firewall equipment and the container.
On the basis of the above embodiment, determining the target server according to the association relationship includes:
Determining whether the association relation is valid according to the time interval of the second session request and the first session request;
And if the association relation is effective, determining the target server according to the association relation.
On the basis of the above embodiment, the target server allocating the target data center responds to the first session request, including:
determining domain name information used by the client for subsequent access;
distributing a target server for responding to the first session request, wherein the target server is positioned in a target data center;
Sending the domain name information to the page so that the client initiates a subsequent request of the first session request through the page;
The subsequent request is responded to by the target server.
On the basis of the above embodiment, determining domain name information used by the client for subsequent access includes:
And determining domain name information used by the client for subsequent access according to the region information of the first session request.
On the basis of the above embodiment, after determining domain name information used by the client for subsequent access, the method further includes:
writing the domain name correspondence relation between the client and the domain name information into a configuration file;
Correspondingly, responding to the second session request by the target server includes:
acquiring domain name information accessed by a client according to a configuration file;
The domain name information is sent to the page so that the client initiates a subsequent request of the second session request through the page.
On the basis of the above embodiment, after writing the domain name correspondence between the client and the domain name information into the configuration file, the method further includes:
Responding to the modification operation of the administrator, and modifying the domain name correspondence in the configuration file;
obtaining abstract information of the configuration file according to the first time interval;
Determining whether the configuration file is updated according to the abstract information;
If the configuration file is updated, acquiring updated domain name information according to the configuration file;
And sending the updated domain name information to the page.
Of course, the storage medium containing the computer executable instructions provided in the embodiments of the present invention is not limited to the above method operations, and may also perform the related operations in the session processing method provided in any embodiment of the present invention.
From the above description of embodiments, it will be clear to a person skilled in the art that the present invention may be implemented by means of software and necessary general purpose hardware, but of course also by means of hardware, although in many cases the former is a preferred embodiment. Based on such understanding, the technical solution of the present invention may be embodied essentially or in a part contributing to the prior art in the form of a software product, which may be stored in a computer readable storage medium, such as a floppy disk, a Read-Only Memory (ROM), a random access Memory (Random Access Memory, RAM), a FLASH Memory (FLASH), a hard disk, or an optical disk of a computer, etc., and include several instructions for causing a computer device (which may be a personal computer, a server, or a network device, etc.) to execute the method according to the embodiments of the present invention.
Example seven
The embodiments of the present application also provide a computer program product comprising a computer program which, when executed by a processor, implements a session handling method as provided by any of the embodiments of the present application.
Computer program product in the implementation, the computer program code for carrying out operations of the present invention may be written in one or more programming languages, including an object oriented programming language such as Java, smalltalk, C ++ and conventional procedural programming languages, such as the "C" programming language or similar programming languages. The program code may execute entirely on the user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer or entirely on the remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer through any kind of network, including a Local Area Network (LAN) or a Wide Area Network (WAN), or may be connected to an external computer (for example, through the Internet using an Internet service provider).
It should be noted that, in the embodiment of the session processing apparatus, each unit and module included are only divided according to the functional logic, but not limited to the above-mentioned division, so long as the corresponding functions can be implemented; in addition, the specific names of the functional units are also only for distinguishing from each other, and are not used to limit the protection scope of the present invention.
Note that the above is only a preferred embodiment of the present invention and the technical principle applied. It will be understood by those skilled in the art that the present invention is not limited to the particular embodiments described herein, but is capable of various obvious changes, rearrangements and substitutions as will now become apparent to those skilled in the art without departing from the scope of the invention. Therefore, while the invention has been described in connection with the above embodiments, the invention is not limited to the embodiments, but may be embodied in many other equivalent forms without departing from the spirit or scope of the invention, which is set forth in the following claims.
Claims (7)
1. A session processing method, comprising:
responding to a first session request, wherein a target server of a target data center responds to the first session request, and the first session request is a request initiated when a target domain name is accessed for the first time;
Acquiring a session identifier of the first session request, and establishing an association relationship between the session identifier and the target server;
Responding to a second session request, determining the target server according to the association relation, and responding to the second session request through the target server;
The second session request is a session request sent again by the user through the client; the second session request comprises a session request triggered by the client in the first page for the nth time, wherein N is an integer greater than or equal to 2;
the association relationship is used for associating the session identifier with the path of the target server;
the obtaining the session identifier of the first session request, and establishing the association relationship between the session identifier and the target server, includes:
SSL unloading is carried out on the first session request, and the session identification of the first session request is determined according to the unloading result;
Marking according to a firewall device WAF communicated with a load balancing device LTM;
Acquiring a container at the WAF back end of the firewall equipment, wherein a target server for responding to a session request is operated in the container;
establishing an association relationship according to the session identifier, the firewall equipment and the container;
wherein the target server of the distributed target data center responds to the first session request, including:
determining domain name information used by the client for subsequent access;
Distributing a target server for responding to the first session request, wherein the target server is positioned in a target data center;
Sending the domain name information to a page so that a client initiates a subsequent request of the first session request through the page;
Responding to the subsequent request through the target server;
The determining domain name information used by the client for subsequent access comprises the following steps:
and determining domain name information used by the client for subsequent access according to the regional information of the first session request.
2. The method of claim 1, wherein the determining the target server according to the association relationship comprises:
determining whether the association is valid according to the time interval of the second session request and the first session request;
And if the association relation is effective, determining the target server according to the association relation.
3. The method of claim 1, further comprising, after determining domain name information used by the client for subsequent access:
writing the domain name correspondence of the client and the domain name information into a configuration file;
correspondingly, the responding, by the target server, the second session request includes:
Acquiring domain name information accessed by the client according to the configuration file;
And sending the domain name information to a page so that the client initiates a subsequent request of the second session request through the page.
4. The method according to claim 3, further comprising, after writing the domain name correspondence of the client and the domain name information into a configuration file:
Responding to the modification operation of an administrator, and modifying the domain name correspondence in the configuration file;
Acquiring abstract information of the configuration file according to a first time interval;
determining whether the configuration file is updated according to the abstract information;
If the configuration file is updated, acquiring updated domain name information according to the configuration file;
And sending the updated domain name information to a page.
5. A session processing apparatus, comprising:
the first session response module is used for responding to a first session request, and a target server of the distribution target data center responds to the first session request, wherein the first session request is a request initiated when the target domain name is accessed for the first time;
The association relation establishing module is used for acquiring the session identifier of the first session request and establishing the association relation between the session identifier and the target server;
The second session response module is used for responding to a second session request, determining the target server according to the association relation and responding to the second session request through the target server;
The second session request is a session request sent again by the user through the client; the second session request comprises a session request triggered by the client in the first page for the nth time, wherein N is an integer greater than or equal to 2;
the association relationship is used for associating the session identifier with the path of the target server;
the association relation establishing module is used for:
SSL unloading is carried out on the first session request, and the session identification of the first session request is determined according to an unloading result;
Marking according to a firewall device WAF communicated with a load balancing device LTM;
acquiring a container at the back end of the WAF of the firewall equipment, wherein a target server for responding to a session request is operated in the container;
establishing an association relationship according to the session identifier, the firewall equipment and the container;
Wherein the first session response module is configured to:
determining domain name information used by the client for subsequent access;
distributing a target server for responding to the first session request, wherein the target server is positioned in a target data center;
Sending the domain name information to the page so that the client initiates a subsequent request of the first session request through the page;
Responding to the subsequent request through the target server;
Wherein the first session response module is configured to:
And determining domain name information used by the client for subsequent access according to the region information of the first session request.
6. A server, the server comprising:
One or more processors;
Storage means for storing one or more programs,
When executed by the one or more processors, causes the one or more processors to implement the session handling method as recited in any one of claims 1-4.
7. A storage medium containing computer executable instructions for performing the session processing method according to any of claims 1-4 when executed by a computer processor.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202210577658.3A CN114866596B (en) | 2022-05-25 | 2022-05-25 | Session processing method, session processing device, server and storage medium |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202210577658.3A CN114866596B (en) | 2022-05-25 | 2022-05-25 | Session processing method, session processing device, server and storage medium |
Publications (2)
Publication Number | Publication Date |
---|---|
CN114866596A CN114866596A (en) | 2022-08-05 |
CN114866596B true CN114866596B (en) | 2024-06-07 |
Family
ID=82639454
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202210577658.3A Active CN114866596B (en) | 2022-05-25 | 2022-05-25 | Session processing method, session processing device, server and storage medium |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN114866596B (en) |
Families Citing this family (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN116032886B (en) * | 2023-01-09 | 2024-07-16 | 中国银联股份有限公司 | Data center and domain name switching method, device, equipment and medium |
Citations (9)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101212522A (en) * | 2006-12-29 | 2008-07-02 | 华为技术有限公司 | Method, device, and system for correlating sessions |
CN101635707A (en) * | 2008-07-25 | 2010-01-27 | 国际商业机器公司 | Method for providing identity management for user in Web environment and device thereof |
CN102292955A (en) * | 2008-11-25 | 2011-12-21 | 思杰系统有限公司 | Systems and methods for load balancing real time streaming protocol |
CN104270427A (en) * | 2014-09-18 | 2015-01-07 | 用友优普信息技术有限公司 | Session control method and device |
CN108712516A (en) * | 2018-05-21 | 2018-10-26 | 平安科技(深圳)有限公司 | Obtain method, apparatus, equipment and the storage medium of sip server address |
CN110336820A (en) * | 2019-07-09 | 2019-10-15 | 中国联合网络通信集团有限公司 | Single Sign Out method, apparatus, equipment, storage medium and system |
CN110839084A (en) * | 2019-11-19 | 2020-02-25 | 中国建设银行股份有限公司 | Session management method, device, equipment and medium |
CN112218386A (en) * | 2020-10-16 | 2021-01-12 | 展讯通信(天津)有限公司 | Application program service path establishing method and device for multi-card terminal, storage medium and terminal |
CN113452737A (en) * | 2020-03-27 | 2021-09-28 | 华为技术有限公司 | Method and device for transmitting session request and electronic equipment |
-
2022
- 2022-05-25 CN CN202210577658.3A patent/CN114866596B/en active Active
Patent Citations (9)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101212522A (en) * | 2006-12-29 | 2008-07-02 | 华为技术有限公司 | Method, device, and system for correlating sessions |
CN101635707A (en) * | 2008-07-25 | 2010-01-27 | 国际商业机器公司 | Method for providing identity management for user in Web environment and device thereof |
CN102292955A (en) * | 2008-11-25 | 2011-12-21 | 思杰系统有限公司 | Systems and methods for load balancing real time streaming protocol |
CN104270427A (en) * | 2014-09-18 | 2015-01-07 | 用友优普信息技术有限公司 | Session control method and device |
CN108712516A (en) * | 2018-05-21 | 2018-10-26 | 平安科技(深圳)有限公司 | Obtain method, apparatus, equipment and the storage medium of sip server address |
CN110336820A (en) * | 2019-07-09 | 2019-10-15 | 中国联合网络通信集团有限公司 | Single Sign Out method, apparatus, equipment, storage medium and system |
CN110839084A (en) * | 2019-11-19 | 2020-02-25 | 中国建设银行股份有限公司 | Session management method, device, equipment and medium |
CN113452737A (en) * | 2020-03-27 | 2021-09-28 | 华为技术有限公司 | Method and device for transmitting session request and electronic equipment |
CN112218386A (en) * | 2020-10-16 | 2021-01-12 | 展讯通信(天津)有限公司 | Application program service path establishing method and device for multi-card terminal, storage medium and terminal |
Also Published As
Publication number | Publication date |
---|---|
CN114866596A (en) | 2022-08-05 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US11647009B2 (en) | Access request conversion method and apparatus | |
US10187459B2 (en) | Distributed load balancing system, health check method, and service node | |
US10719369B1 (en) | Network interfaces for containers running on a virtual machine instance in a distributed computing environment | |
CN111431740B (en) | Data transmission method, device, equipment and computer readable storage medium | |
JP3980596B2 (en) | Method and system for remotely and dynamically configuring a server | |
CN110636115B (en) | Cross-cloud service calling processing method, gateway server and requester server | |
US6766371B1 (en) | Virtual network environment | |
US7562145B2 (en) | Application instance level workload distribution affinities | |
CN111861140B (en) | Service processing method and device, storage medium and electronic device | |
US10798218B2 (en) | Environment isolation method and device | |
DE112013003289T5 (en) | Device, system and method for client-controlled session persistence between one or more clients and servers of a data center | |
CN102047242A (en) | Content management | |
CN113452780B (en) | Access request processing method, device, equipment and medium for client | |
CN114024972B (en) | Long connection communication method, system, device, equipment and storage medium | |
US11637914B2 (en) | Multiple geography service routing | |
CN114866596B (en) | Session processing method, session processing device, server and storage medium | |
CN111193778B (en) | Method and device for balancing WEB service load | |
CN114338689A (en) | Session holding method, apparatus, device, medium, and program product | |
US20210243205A1 (en) | Management of bot detection in a content delivery network | |
CN112351082A (en) | Current limiting method and device for HTTP request message | |
US11621883B1 (en) | Monitoring state information for incidents in an IT environment including interactions among analysts responding to other similar incidents | |
CN113965385B (en) | Monitoring processing method, device, equipment and medium for abnormal website | |
US10404698B1 (en) | Methods for adaptive organization of web application access points in webtops and devices thereof | |
CN113778709B (en) | Interface calling method, device, server and storage medium | |
US20230146880A1 (en) | Management system and management method |
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 | ||
GR01 | Patent grant |