CN113676502B - Application service access method, device and storage medium - Google Patents

Application service access method, device and storage medium Download PDF

Info

Publication number
CN113676502B
CN113676502B CN202010405536.7A CN202010405536A CN113676502B CN 113676502 B CN113676502 B CN 113676502B CN 202010405536 A CN202010405536 A CN 202010405536A CN 113676502 B CN113676502 B CN 113676502B
Authority
CN
China
Prior art keywords
service
application
access
node
standby
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
Application number
CN202010405536.7A
Other languages
Chinese (zh)
Other versions
CN113676502A (en
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.)
GCL System Integration Technology Co Ltd
GCL System Integration Technology Suzhou Co Ltd
Original Assignee
GCL System Integration Technology Co Ltd
GCL System Integration Technology Suzhou 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 GCL System Integration Technology Co Ltd, GCL System Integration Technology Suzhou Co Ltd filed Critical GCL System Integration Technology Co Ltd
Priority to CN202010405536.7A priority Critical patent/CN113676502B/en
Publication of CN113676502A publication Critical patent/CN113676502A/en
Application granted granted Critical
Publication of CN113676502B publication Critical patent/CN113676502B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

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/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

Landscapes

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

Abstract

The application relates to an application service access method, a device and a storage medium, belonging to the technical field of computers, wherein the method comprises the following steps: the method comprises the steps of calling a pre-installed Nginx proxy service to enable the Nginx proxy service to monitor a preset service port of an application server; when an application access request sent by a terminal based on an access address is monitored, the application access request is distributed to a service providing node through an Nginx proxy service; providing a service for the terminal through the service providing node; the method can solve the problem that the prior application access system can access the application service through the Nginx proxy service only by modifying the terminal access address, and the success rate of the application service access is affected; the terminal can access the application service through the Nginx proxy service by using the access address of the application server, and the terminal does not need to modify the access address on the premise of ensuring load balancing, so that the access success rate and the efficiency of the application service are improved.

Description

Application service access method, device and storage medium
Technical Field
The application relates to an application service access method, an application service access device and a storage medium, and belongs to the technical field of computers.
Background
With the development of the internet, the security services (Websphere Application Server, WAS) of web applications are used more and more frequently as application servers. Along with the increase of the access quantity of users to the server, the requirements of the server for realizing load balancing and dual-machine hot standby are higher and higher.
A typical application service access system includes an Nginx (HTTP and reverse proxy) server and a WAS server. The nmginx server and the WAS server are respectively provided as independent devices. When application access is performed, a terminal acquires an access address of an Nginx server in advance; sending an application access request to an Nginx server based on the access address; after receiving the application access request, the ng ix server distributes the application access request to each service providing node of the WAS server, so as to provide a corresponding application service for the terminal sending the application access request.
After the nginn is deployed, the user needs to access the nginn server first, so after the nginn is deployed, the terminal needs to modify the access address from the access address of the WAS server to the access address of the nginn server, which is the address of the nginn server; in case the terminal does not modify the access address, the application access of the terminal will fail.
Disclosure of Invention
The application provides an application service access method, an application service access device and a storage medium, which can solve the problem that the progress of processing a service request is slower when a fixed service processing component is blocked because whether the service processing component is blocked cannot be determined. The application provides the following technical scheme:
In a first aspect, there is provided an application service access method, the method comprising:
Invoking a pre-installed Nginx proxy service to enable the Nginx proxy service to monitor a preset service port of the application server, wherein the preset service port is a port which is configured in the application server and used for monitoring application access requests;
when an application access request sent by a terminal based on a preset access address is monitored, distributing the application access request to a service providing node through the Nginx proxy service; wherein, the access address corresponds to the preset service port; the service providing node is a node for providing application services;
And providing application services for the terminal through the service providing node.
Optionally, before the calling the pre-installed nginnx proxy service, the method further includes:
acquiring a port number of the preset service port;
And installing the Nginx proxy service, and setting the port number of the monitoring port of the Nginx proxy service as the port number of the preset service port.
Optionally, the method further comprises:
Invoking the Nginx proxy service to detect whether the operation of each service providing node is normal;
And when the service providing node with abnormal operation is detected, determining that the service providing node with abnormal operation is offline, so that the Nginx proxy service determines the service providing node for processing the application access request from other normal service providing nodes.
Optionally, the calling the nginnx proxy service detects whether the service providing node operates normally, including:
calling the Nginx proxy service to send a detection request to each service providing node every preset detection duration;
determining that the operation of the service providing node is abnormal when the number of times of receiving the feedback information of the detection request in the preset detection time is less than or equal to the preset number of times;
when the number of times of receiving feedback information of the detection request in a preset detection time is greater than a preset number of times, determining that the service providing node operates normally;
the preset detection time period is longer than the preset detection time period.
Optionally, the service providing node includes a primary service node and a standby service node, the standby service node is communicatively connected with a pre-created standby nginnx proxy service, and the distributing the application access request to the service providing node through the nginnx proxy service includes:
When the operation of the main service node is abnormal, the access address of the standby Nginx proxy service is obtained through the Nginx proxy service;
and sending the application access request to the standby Nginx proxy service through the Nginx proxy service based on the access address, so that the standby Nginx proxy service determines a service providing node for processing the application access request from the standby service nodes based on the application access request.
Optionally, before the access address of the standby nginn x proxy service is obtained through the nginn x proxy service, the method further includes:
And configuring the access address of the standby Nginx proxy service to be read and accessed in the running process of the Nginx proxy service.
Optionally, the standby service node operates in a further server separate from the application server.
In a second aspect, there is provided an application service access apparatus, the apparatus comprising:
An application request monitoring module, configured to invoke a pre-installed nginnx proxy service to monitor a preset service port of the application server, where the preset service port is a port configured in the application server and used for monitoring an application access request;
An application request distribution module: when an application access request sent by a terminal based on a preset access address is monitored, distributing the application access request to a service providing node through the Nginx proxy service; wherein, the access address corresponds to the preset service port; the service providing node is a node for providing application services;
An application service providing module: and the service providing node is used for providing application services for the terminal.
In a third aspect, an application service access apparatus is provided, the apparatus comprising a processor and a memory; the memory stores a program that is loaded and executed by the processor to implement the application service access method of the first aspect.
In a fourth aspect, a computer-readable storage medium is provided, in which a program is stored, the program being loaded and executed by the processor to implement the application service access method of the first aspect.
The application has the beneficial effects that: the method comprises the steps of calling a pre-installed Nginx proxy service to enable the Nginx proxy service to monitor a preset service port of an application server, wherein the preset service port is configured in the application server and used for monitoring application access requests; when an application access request sent by a terminal based on a preset access address is monitored, the application access request is distributed to a service providing node through an Nginx proxy service; the access address corresponds to a preset service port; the service providing node is a node for providing application services; providing application service for the terminal through the service providing node; the method can solve the problem that the access success rate of the application service is affected by the fact that the application service can be accessed through the Nginx proxy service only by modifying the access address of the terminal in the existing application access system; the terminal can access the application service through the Nginx proxy service by using the access address of the application server by installing the Nginx proxy service in the application server to monitor the preset service port of the application server, and the terminal is not required to modify the access address on the premise of ensuring the load balancing effect, so that the access success rate and the efficiency of the application service are improved.
The foregoing description is only an overview of the present application, and is intended to provide a better understanding of the present application, as it is embodied in the following description, with reference to the preferred embodiments of the present application and the accompanying drawings.
Drawings
FIG. 1 is a schematic diagram of an application service access system according to one embodiment of the present application;
FIG. 2 is a flow chart of a method for application service access provided by one embodiment of the present application;
FIG. 3 is a block diagram of an application service access apparatus provided in one embodiment of the application
FIG. 4 is a block diagram of an application service access apparatus provided by one embodiment of the present application;
FIG. 5 is a block diagram of an application service access apparatus provided by one embodiment of the present application;
Detailed Description
The following describes in further detail the embodiments of the present application with reference to the drawings and examples. The following examples are illustrative of the application and are not intended to limit the scope of the application.
First, several terms related to the present application are described below.
Nmginx (high performance HTTP and reverse proxy web server): the nminux publishes the source code in the form of a BSD-like license. The BSD license is a license that allows the public to use the open source code, i.e., the public can freely configure the ngjnx proxy service when using the ngjnx proxy service. After the Nginx is started, a master process and a plurality of worker processes exist, including: and receiving signals from the outside, sending signals to each worker process, monitoring the running state of the worker process, and automatically starting a new worker process after the worker process exits (under abnormal conditions). The master process serves as an interactive interface between the whole process group and a user, monitors the process at the same time, and achieves the functions of restarting service, managing log files, enabling configuration files to take effect in real time and the like through managing the worker process.
Security services for web applications (WebsphereApplication Server, WAS): is a security service for web application programs, and provides a targeted security solution based on the characteristics of the whole architecture of an application system and the personalized requirements of the application system. The Web server and the WAS server cooperate to perform request distribution as a common structure, and the Web server forwards the received request to the WAS through a connector.
A WAS cluster is a collection of multiple WAS servers that participate in workload management, with the cluster being responsible for balancing the workload among the servers.
Double-machine hot standby: a solution applied to a server is that a host computer and a slave computer are connected through a TCP/IP network, and when the host computer is in a working state, the slave computer is in a monitoring state to monitor whether each node of the host computer operates normally or not. Once the slave finds that the host is abnormal, the slave replaces the host to realize the function of the host and provide service for the access request.
Hash (Hash) result: translation is typically hashed, or transliterated into a hash, which is the transformation of an arbitrary length input (also called pre-mapped pre-image) into a fixed length output, the output being the hash value, by a hashing algorithm. This transformation is a compressed mapping, i.e. the hash value is much smaller in space than the input, and different inputs will hash to the same output. In summary, the Hash result is a function of a message digest that compresses messages of arbitrary length to a fixed length.
Session hold (Session hold): session in a computer refers specifically to the time interval between an end user communicating with an interactive system, typically the time elapsed between registering with the system and logging out of the system. Session is actually a specific time concept. Session maintenance refers to ensuring that each client side accesses the same application server of the back end fixedly when load balancing performs request distribution.
JAVA server page (JavaServerPages, JSP): the Web page is deployed on a Web server, can respond to a request sent by a client, can dynamically generate a Web page of an HTML, XML or other format document according to the request content, and can then return to a requester. The JSP technology uses Java language as a scripting language to provide services for HTTP requests of users, and can process complex business requirements together with other Java programs on the server.
Web container custom properties: the Web container is a service program, and a program for providing a corresponding service is provided at one port of the server, and the program processes a request sent from a client, such as a Tomcat container in JAVA, and the IIS or PWS of the ASP is such a container.
Fig. 1 is a schematic structural diagram of an application service access system according to an embodiment of the present application, where, as shown in fig. 1, the system at least includes: application server 110, terminal 120.
The terminal 120 is used to access an application service provided by the application server 110. The terminal 120 may be a device with communication capability, such as a mobile phone, a tablet computer, a portable computer, etc., and the embodiment does not limit the device type of the terminal 120.
The terminal 120 stores an access address of the application server 110 in advance, and when it is necessary to access an application service provided by the application server 110, an application access request is sent to the application server 110 based on the access address.
The application server 110 is a WAS server. In the present application, the application server 110 is pre-installed with the nginix proxy service 111, and the nginix proxy service 111 can monitor a preset service port of the application server 110. The preset service port is a port configured in the application server 110 and used for monitoring an application access request, and the access address corresponds to the preset service port. In the running process, the application server 110 calls the nginnx proxy service 111 to monitor a preset service port of the application server 110, so as to receive an application access request sent by the terminal according to the access address.
The nginnx proxy service 111 is software (or called a program) running in the application server 110, and the nginnx proxy service 111 has a function of an nginnx server.
At least one service providing node is operated in the application server 110, and each service providing node is an application program operated in the application server 110 and is used for providing application services for the terminal.
In one example, application server 110 is a primary server in a WAS cluster that listens for application access requests. Of course, other application servers may be included in the application service access system that are communicatively coupled to the nmginx proxy service 111 for processing application access requests assigned by the nmginx proxy service 111. Of course, at least one service providing node may also be running in each other application server.
After the nginnx proxy service 111 monitors the application access request, the application access request is distributed to the service providing nodes in the application server 110 based on the load balancing principle; or to service providing nodes in other application servers.
In addition, to implement dual hot standby, the application service access system also includes at least one standby server 130. The standby server 130 is also a WAS server, and a standby nginnx proxy service 131 is installed in the standby server 130 in advance. The standby Nginx proxy service 131 is software running in the standby server 130 and has the same function as the Nginx proxy server.
The standby nginnx proxy service 131 may monitor a preset standby service port of the standby server 130; and is communicatively coupled to the nginnx proxy service 111. When an abnormality occurs in each service providing node to which the ngjnx proxy service 111 is connected, the ngjnx proxy service 111 may send an application access request to the standby ngjnx proxy service 131, so that the standby ngjnx proxy service 131 distributes the application access request to the service providing node in the standby server 130 based on a load balancing principle.
Of course, other backup application servers may also be included in the application service access system that are communicatively coupled to the backup nmginx proxy service 111 for processing application access requests assigned by the nmginx proxy service 111. Of course, at least one service providing node may also be running in each other standby application server.
In this embodiment, by installing the ngjnx proxy service in the application server 110 to monitor the preset service port of the application server 110, the terminal can access the application service through the ngjnx proxy service by using the access address of the application server 110, and on the premise of ensuring the load balancing effect, the terminal is not required to modify the access address, thereby improving the access efficiency of the application service.
In addition, by connecting the nginnx proxy service 111 with the standby server 130 in a communication manner, a process of automatically switching the standby server when the application server 110 cannot provide services is realized, so that the possibility of overall downtime of the application access system can be reduced, and the access stability of the application access system can be improved.
Fig. 2 is a flowchart of an application service access method according to an embodiment of the present application, where the method is applied to the application service access system shown in fig. 1, and the execution subject of each step is illustrated as an application server 110 in the system. The method at least comprises the following steps:
and step 201, calling a pre-installed Nginx proxy service to monitor a preset service port of the application server.
The preset service port is a port configured in the application server and used for monitoring application access requests.
The application access request is a request sent by the terminal based on the access address of the application server, and is used for requesting the application server to provide application services. The access address includes: the IP address and a port number of a preset service port.
Optionally, the application access request is sent to the application server in a message form, and the application server receives the application access request; and providing corresponding application services for the terminal sending the application access request.
In this embodiment, the ng ix proxy service needs to be installed before invoking the pre-installed ng ix proxy service. The nginix proxy service refers to a software program running in an application server, and has a function of distributing terminal access requests to achieve load balancing.
The process of installing the nginnx proxy service includes: acquiring a port number of a preset service port; installing the Nginx proxy service, and setting the port number of the monitoring port of the Nginx proxy service as the port number of the preset service port.
In one example, the port number of the preset service port may be set to 80.
Of course, the application server may also perform other configurations in order to ensure that the nginnx proxy service normally provides proxy services.
Such as: terminal information such as an IP address of a terminal is acquired, and the terminal information is set as a proxy message header, namely, the Nginx proxy service changes a request allocation address on the proxy message header of an application access request, so that JSP can jump to a correct application server and node. The message is a transmission form of an application access request, and comprises a head part and a body part. After the terminal sends out the access request, the server obtains the target IP address of the access request through the identification message header. The Nginx proxy service changes the head part of the message, namely, sets a proxy message header.
And, for example: to ensure that JSP can jump correctly, two Web container custom attributes are added for all service providing nodes, namely com.ibm.ws.webcon coolant. At least the following objects can be achieved by setting two Web container custom properties: 1. returning a port number from the requesting uniform resource location system (uniformresource locato, URL); 2. the requesting host head returns a port number, thereby reducing the likelihood of JSP jumps to the wrong host and port.
In one example, the configuration procedure of the nmginx proxy service is represented by the following fields:
Wherein, "listen 80" means that the port number listened to is 80; "server_name 10.10.34.60" represents the IP address of the device to which the nginnx proxy service belongs; "proxy_set_ headerHost $host: $server_port" means that the terminal information is set to the proxy header.
Optionally, in order to ensure that the access IP address and port number of the nginix proxy service are consistent with the IP address and port number of the application server, when the port number of the preset server port is 80, setting the port number of the listening port of the nginix proxy service to 80; when the port number of the preset server port is not 80, for example: 9081, the port number of the nmginx proxy service listening port is changed to 9081.
And 202, when an application access request sent by the terminal based on a preset access address is monitored, distributing the application access request to the service providing node through the Nginx proxy service.
The access address corresponds to a preset service port. Such as: the access address is the IP address of the application server + the port number of the preset server port.
Optionally, the service providing nodes include a main service node and a standby service node, where the main service node is a service providing node running in the application server and a service providing node running in other application servers; the standby service nodes are service providing nodes running in the standby application server and service providing nodes running in other standby application servers. At this time, the application access request is distributed to the service providing node through the nginix proxy service, including: when the main service providing node comprises at least one service providing node which operates normally, distributing an application access request to the main service node which operates normally through the Nginx proxy service; when the operation of the main service node is abnormal, the access address of the standby service node is obtained through the Nginx proxy service; the application access request is allocated to the standby service node based on the access address by the ngjnx proxy service such that the standby ngjnx proxy service determines a service providing node that processes the application access request from the standby service node based on the application access request, as shown in fig. 3. At this time, the application server needs to invoke the nginnx proxy service to detect whether each service providing node (main service node) operates normally; and determining that the service providing node is offline when the abnormal operation of the service providing node is detected, so that the Nginx proxy service determines the service providing node for processing the application access request from other normal service providing nodes.
Wherein, invoking the Nginx proxy service to detect whether the service providing node operates normally comprises: calling Nginx proxy service to send a detection request to each service providing node every preset detection duration; determining that the operation of the service providing node is abnormal when the number of times of receiving feedback information of the detection request in the preset detection time is less than or equal to the preset number of times; when the number of times of receiving feedback information of the detection request in the preset detection time is greater than the preset number of times, determining that the service providing node operates normally; the preset detection time length is longer than the preset detection time length.
In one example, the configuration process of an application server is represented by the following fields:
The "server 10.10.34.50:80backup" indicates a standby application server indicated by a backup key, when a main service node is not available, the standby application server will be automatically jumped to (in this embodiment, 10.10.34.50:80 is a standby application server (or referred to as a standby application service cluster), and 4 standby service providing nodes are operated, where "ip_hash" is used to indicate that each application access request is allocated according to the hash result of the access IP, so that each visitor fixedly accesses an application service node, and the problem of Session maintenance can be solved, and "max_fail=2fail_timeout=5" indicates that 2 failures occur within 5 seconds, and the state of the corresponding service providing node will be set to be the configuration field that the down-line down.nmginx proxy service can read and thus allocate and/or forward the application access request.
In this embodiment, when the application server node can normally operate, the terminal sends an application access request to the ngjnx proxy service, and when the ngjnx proxy service monitors the application access request, the application access request is distributed to a corresponding main service providing node, and the main service providing node provides a service for the application access request.
When the Nginx proxy service detects that the main service node part is abnormal, determining the abnormal main service node as off-line; the application access request is distributed to other running normal primary service nodes. In order to ensure that the nginn proxy service successfully forwards the application access request, before the access address of the standby service providing node is acquired through the nginn proxy service, the access address of the standby nginn proxy service needs to be configured for the nginn proxy service so as to be read and accessed in the running process of the nginn proxy service.
When the primary service providing nodes are all determined to be offline, the Nginx proxy service will apply an allocation (or forwarding) of access requests to the standby Nginx proxy service. The standby nmginx proxy service distributes access requests to the standby service nodes that are operating properly.
Of course, the standby nginnx proxy service may also detect whether the operation of the standby service node is normal, and the detection mode refers to the description of the nginnx proxy service, which is not described herein.
It should be noted that the standby service node runs in a separate server from the application server. When the application server fails, the standby service providing node replaces the operation of the main service providing node in the application server, and double-machine hot standby is realized.
And 203, providing application services for the terminal through the service providing node.
In summary, in the application service access method provided in this embodiment, by calling the pre-installed nginnx proxy service, the nginnx proxy service monitors a preset service port of the application server, where the preset service port is configured in the application server and is used for monitoring an application access request; when an application access request sent by a terminal based on a preset access address is monitored, the application access request is distributed to a service providing node through an Nginx proxy service; the access address corresponds to a preset service port; the service providing node is a node for providing application services; providing application service for the terminal through the service providing node; the method can solve the problem that the access success rate of the application service is affected by the fact that the application service can be accessed through the Nginx proxy service only by modifying the access address of the terminal in the existing application access system; the terminal can access the application service through the Nginx proxy service by using the access address of the application server by installing the Nginx proxy service in the application server to monitor the preset service port of the application server, and the terminal is not required to modify the access address on the premise of ensuring the load balancing effect, so that the access success rate and the efficiency of the application service are improved.
In addition, by connecting the Nginx proxy service with the standby server in a communication manner, the process of automatically switching the standby server when the application server cannot provide service is realized, the possibility of overall downtime of the application access system can be reduced, and the access stability of the application access system is improved.
Fig. 4 is a block diagram of an application service access apparatus according to an embodiment of the present application, and this embodiment is described by taking an application server 110 of the application service access system shown in fig. 1 as an example. The device at least comprises the following modules: an application request listening module 410, an application request distribution module 420 and an application service providing module 430.
An application request monitoring module 410, configured to invoke a pre-installed nginnx proxy service to monitor a preset service port of the application server, where the preset service port is a port configured in the application server and used for monitoring an application access request;
The application request allocation module 420: when an application access request sent by a terminal based on a preset access address is monitored, distributing the application access request to a service providing node through the Nginx proxy service; wherein, the access address corresponds to the preset service port; the service providing node is a node for providing application services;
The application service providing module 430: and the service providing node is used for providing application services for the terminal.
For relevant details reference is made to the method embodiments described above.
It should be noted that: in the application service access device provided in the above embodiment, only the division of the above functional modules is used for illustration when performing application service access, and in practical application, the above functional allocation may be performed by different functional modules according to needs, that is, the internal structure of the application service access device is divided into different functional modules, so as to complete all or part of the functions described above. In addition, the application service access device and the application service access method embodiment provided in the foregoing embodiments belong to the same concept, and specific implementation processes of the application service access device and the application service access method embodiment are detailed in the method embodiment, which is not repeated herein.
Fig. 5 is a block diagram of an application service access apparatus, which may be the application server 110 in the application service access system shown in fig. 1, according to an embodiment of the present application. The apparatus comprises at least a processor 501 and a memory 502.
The processor 501 may include one or more processing cores, such as: 4 core processor, 6 core processor, etc. The processor 501 may be implemented in at least one hardware form of DSP (Digital SignalProcessing ), FPGA (Field-Programmable GateArray, field programmable gate array), PLA (Programmable LogicArray ). The processor 501 may also include a main processor and a coprocessor, where the main processor is a processor for processing data in an awake state, and is also called a CPU (Central Processing Unit ); a coprocessor is a low-power processor for processing data in a standby state. In some embodiments, the processor 501 may also include an AI (ARTIFICIAL INTELLIGENCE ) processor for processing computing operations related to machine learning.
Memory 502 may include one or more computer-readable storage media, which may be non-transitory. Memory 502 may also include high-speed random access memory, as well as non-volatile memory, such as one or more magnetic disk storage devices, flash memory storage devices. In some embodiments, a non-transitory computer readable storage medium in memory 502 is used to store at least one instruction for execution by processor 501 to implement the application service access method provided by the method embodiments of the present application.
In some embodiments, the application service access apparatus may further optionally include: a peripheral interface and at least one peripheral. The processor 501, memory 502, and peripheral interfaces may be connected by buses or signal lines. The individual peripheral devices may be connected to the peripheral device interface via buses, signal lines or circuit boards. Illustratively, peripheral devices include, but are not limited to: radio frequency circuitry, touch display screens, audio circuitry, and power supplies, among others.
Of course, the application service access apparatus may also include fewer or more components, which is not limited in this embodiment.
Optionally, the present application further provides a computer readable storage medium, in which a program is stored, the program being loaded and executed by a processor to implement the application service access method of the above method embodiment.
Optionally, the present application further provides a computer product, where the computer product includes a computer readable storage medium, where a program is stored, and the program is loaded and executed by a processor to implement the application service access method of the above method embodiment.
The technical features of the above embodiments may be arbitrarily combined, and all possible combinations of the technical features in the above embodiments are not described for brevity of description, however, as long as there is no contradiction between the combinations of the technical features, they should be considered as the scope of the description.
The foregoing examples illustrate only a few embodiments of the application, which are described in detail and are not to be construed as limiting the scope of the application. It should be noted that it will be apparent to those skilled in the art that several variations and modifications can be made without departing from the spirit of the application, which are all within the scope of the application. Accordingly, the scope of protection of the present application is to be determined by the appended claims.

Claims (9)

1. An application service access method, for use in an application server, the method comprising:
Calling a pre-installed Nginx proxy service to monitor a preset service port of the application server, wherein the preset service port is configured in the application server and used for monitoring application access requests;
when an application access request sent by a terminal based on a preset access address is monitored, distributing the application access request to a service providing node through the Nginx proxy service; wherein, the access address corresponds to the preset service port; the service providing node is a node for providing application services;
Providing application services for the terminal through the service providing node;
The service providing node comprises a main service node and a standby service node, the standby service node is in communication connection with a standby Nginx proxy service which is created in advance, the application access request is distributed to the service providing node through the Nginx proxy service, and the service providing node comprises:
When the operation of the main service node is abnormal, the access address of the standby Nginx proxy service is obtained through the Nginx proxy service;
and sending the application access request to the standby Nginx proxy service through the Nginx proxy service based on the access address, so that the standby Nginx proxy service determines a service providing node for processing the application access request from the standby service nodes based on the application access request.
2. The method of claim 1, wherein before invoking the pre-installed nginnx proxy service, further comprising:
acquiring a port number of the preset service port;
And installing the Nginx proxy service, and setting the port number of the monitoring port of the Nginx proxy service as the port number of the preset service port.
3. The method according to claim 1, wherein the method further comprises:
Invoking the Nginx proxy service to detect whether the operation of each service providing node is normal;
And when the service providing node with abnormal operation is detected, determining that the service providing node with abnormal operation is offline, so that the Nginx proxy service determines the service providing node for processing the application access request from other normal service providing nodes.
4. A method according to claim 3, wherein said invoking the nginnx proxy service to detect whether the service providing node is functioning properly comprises:
calling the Nginx proxy service to send a detection request to each service providing node every preset detection duration;
determining that the operation of the service providing node is abnormal when the number of times of receiving the feedback information of the detection request in the preset detection time is less than or equal to the preset number of times;
when the number of times of receiving feedback information of the detection request in a preset detection time is greater than a preset number of times, determining that the service providing node operates normally;
the preset detection time period is longer than the preset detection time period.
5. The method of claim 1, wherein prior to the obtaining, by the nginn proxy service, an access address for a standby nginn proxy service, further comprising:
And configuring the access address of the standby Nginx proxy service to be read and accessed in the running process of the Nginx proxy service.
6. The method of claim 1, wherein the standby service node operates in a separate server from the application server.
7. An application service access apparatus, the apparatus comprising:
The application request monitoring module is used for calling a pre-installed Nginx proxy service to monitor a preset service port of an application server, wherein the preset service port is a port which is configured in the application server and used for monitoring application access requests;
An application request distribution module: when an application access request sent by a terminal based on a preset access address is monitored, distributing the application access request to a service providing node through the Nginx proxy service; wherein, the access address corresponds to the preset service port; the service providing node is a node for providing application services;
an application service providing module: the service providing node is used for providing application services for the terminal;
The service providing node comprises a main service node and a standby service node, the standby service node is in communication connection with a standby Nginx proxy service which is created in advance, the application access request is distributed to the service providing node through the Nginx proxy service, and the service providing node comprises:
When the operation of the main service node is abnormal, the access address of the standby Nginx proxy service is obtained through the Nginx proxy service;
and sending the application access request to the standby Nginx proxy service through the Nginx proxy service based on the access address, so that the standby Nginx proxy service determines a service providing node for processing the application access request from the standby service nodes based on the application access request.
8. An application service access apparatus, the apparatus comprising a processor and a memory; stored in the memory is a program that is loaded and executed by the processor to implement the application service access method of any one of claims 1 to 6.
9. A computer-readable storage medium, characterized in that the storage medium has stored therein a program for implementing the application service access method according to any one of claims 1 to 6 when executed by a processor.
CN202010405536.7A 2020-05-14 2020-05-14 Application service access method, device and storage medium Active CN113676502B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010405536.7A CN113676502B (en) 2020-05-14 2020-05-14 Application service access method, device and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010405536.7A CN113676502B (en) 2020-05-14 2020-05-14 Application service access method, device and storage medium

Publications (2)

Publication Number Publication Date
CN113676502A CN113676502A (en) 2021-11-19
CN113676502B true CN113676502B (en) 2024-05-14

Family

ID=78537133

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010405536.7A Active CN113676502B (en) 2020-05-14 2020-05-14 Application service access method, device and storage medium

Country Status (1)

Country Link
CN (1) CN113676502B (en)

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103686198A (en) * 2013-12-30 2014-03-26 优视科技有限公司 Video data processing method, device and system
CN105376107A (en) * 2014-08-29 2016-03-02 腾讯科技(深圳)有限公司 Terminal test method and proxy server
CN109194749A (en) * 2018-09-11 2019-01-11 福建天泉教育科技有限公司 Monitor method, the storage medium of network request
WO2019028683A1 (en) * 2017-08-08 2019-02-14 深圳前海达闼云端智能科技有限公司 Method and system for acquiring and collecting client local dns server

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103686198A (en) * 2013-12-30 2014-03-26 优视科技有限公司 Video data processing method, device and system
CN105376107A (en) * 2014-08-29 2016-03-02 腾讯科技(深圳)有限公司 Terminal test method and proxy server
WO2019028683A1 (en) * 2017-08-08 2019-02-14 深圳前海达闼云端智能科技有限公司 Method and system for acquiring and collecting client local dns server
CN109194749A (en) * 2018-09-11 2019-01-11 福建天泉教育科技有限公司 Monitor method, the storage medium of network request

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
基于Nginx负载均衡实现tomcat集群部署;王思平;鲍正德;李晨曦;唐娅雯;;饮食科学;20190323(06);全文 *

Also Published As

Publication number Publication date
CN113676502A (en) 2021-11-19

Similar Documents

Publication Publication Date Title
KR102681644B1 (en) Blockchain message processing methods and devices, computers and readable storage media
CN111459749B (en) Prometheus-based private cloud monitoring method and device, computer equipment and storage medium
CN106921754B (en) Load balancing method, device, medium and electronic equipment of cluster system
CN112118315A (en) Data processing system, method, device, electronic equipment and storage medium
CN112543222B (en) Data processing method and device, computer equipment and storage medium
CN112346980B (en) Software performance testing method, system and readable storage medium
CN111064626A (en) Configuration updating method, device, server and readable storage medium
CN115102857A (en) Method, device, equipment and storage medium for updating client configuration data
CN112671554A (en) Node fault processing method and related device
WO2021169264A1 (en) Automatic scheduling method and apparatus for database access layer middleware
CN109788251B (en) Video processing method, device and storage medium
CN114553900A (en) Distributed block storage management system and method and electronic equipment
WO2024103943A1 (en) Service processing method and apparatus, storage medium, and device
CN113676502B (en) Application service access method, device and storage medium
CN111416851A (en) Method for session synchronization among multiple load balancers and load balancer
CN110990213A (en) Method and device for monitoring user logs in cluster environment in real time
KR20210044281A (en) Method and apparatus for ensuring continuous device operation stability in cloud degraded mode
CN113452948B (en) Conference terminal control method, device, equipment and storage medium
CN115629909A (en) Service data processing method and device, electronic equipment and storage medium
CN113377710B (en) Data acquisition method and device and electronic equipment
CN114331445A (en) API (application programming interface), method, storage medium and electronic equipment for accessing massive users
CN114138895A (en) Data synchronization method and device for multiple data sources, computer equipment and storage medium
CN111416852A (en) Method for session synchronization among multiple load balancers and load balancer
CN110768855B (en) Method and device for testing linkmzation performance
CN115250276A (en) Distributed system and data processing method and device

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
GR01 Patent grant