CN112054923A - Service request detection method, device and medium - Google Patents
Service request detection method, device and medium Download PDFInfo
- Publication number
- CN112054923A CN112054923A CN202010858849.8A CN202010858849A CN112054923A CN 112054923 A CN112054923 A CN 112054923A CN 202010858849 A CN202010858849 A CN 202010858849A CN 112054923 A CN112054923 A CN 112054923A
- Authority
- CN
- China
- Prior art keywords
- scheduling
- service request
- server
- target server
- indication information
- 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.)
- Granted
Links
Images
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L41/00—Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
- H04L41/02—Standardisation; Integration
- H04L41/0246—Exchanging or transporting network management information using the Internet; Embedding network management web servers in network elements; Web-services-based protocols
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L12/00—Data switching networks
- H04L12/28—Data switching networks characterised by path configuration, e.g. LAN [Local Area Networks] or WAN [Wide Area Networks]
- H04L12/40—Bus networks
- H04L12/40143—Bus networks involving priority mechanisms
- H04L12/4015—Bus networks involving priority mechanisms by scheduling the transmission of messages at the communication node
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L47/00—Traffic control in data switching networks
- H04L47/50—Queue scheduling
Landscapes
- Engineering & Computer Science (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Computer And Data Communications (AREA)
Abstract
The application relates to the technical field of cloud, in particular to a service request detection method, equipment and a medium, wherein the method can be applied to a content distribution network and comprises the following steps: respectively acquiring scheduling order indication information of each first service request from scheduling parameters carried in each first service request; the scheduling parameter of each first service request is obtained from the scheduling response of the scheduling server by the client, and the scheduling order indication information is used for indicating the order of the scheduling server for scheduling the target server corresponding to the service request; acquiring scheduling order indication information of a second service request according to the acquired scheduling order indication information; and sending the scheduling order indication information of the second service request to the decision server, and reducing storage occupation, search overhead and the like in the service request detection process by detecting and reporting the relevant information of the missed service request through the target server.
Description
Technical Field
The application relates to the technical field of cloud, in particular to the technical field of network scheduling, and provides a service request detection method, equipment and a medium.
Background
In a Content Delivery Network (CDN), a decision server may adjust or determine a corresponding scheduling decision according to a situation in which a scheduling server schedules each target server and a situation in which each target server processes a service request, where the scheduling decision prohibits scheduling of a certain target server, for example.
Currently, a decision server generally determines the processing condition of each target server for a service request according to the log of each target server and the log of each scheduling server, but in this method, the decision server needs to store a large amount of logs and needs to spend a large amount of time to search the stored logs. It can be seen that, at present, the storage occupation of the method for detecting the service request is high, and the search overhead is large.
Disclosure of Invention
The embodiment of the application provides a service request detection method, equipment and a medium, which are used for reducing storage occupation cost and search cost.
In one aspect, a method for detecting a service request is provided, which is applied to a target server, and the method includes:
respectively acquiring scheduling order indication information of each first service request from scheduling parameters carried in each first service request; the scheduling server is used for scheduling the target servers corresponding to the service requests according to the scheduling order indication information;
acquiring scheduling order indication information of a second service request according to the acquired scheduling order indication information; the second service request refers to an unattained service request;
and sending the scheduling order indication information of the second service request to a decision server so that the decision server determines the second service request which does not reach the target server according to the scheduling order indication information of the second service request.
In one aspect, a method for detecting a service request is provided, where the method is applied in a scheduling server, and the method includes:
respectively receiving scheduling requests of all clients and determining a target server scheduled for all the clients;
obtaining scheduling parameters corresponding to each target server; each scheduling parameter comprises scheduling order indication information, and the scheduling order indication information is used for indicating the order of scheduling target servers by a scheduling server;
respectively sending scheduling responses carrying scheduling parameters of corresponding target servers to each client so that each client respectively sends service requests carrying the scheduling parameters to the corresponding target servers, so that each target server respectively obtains scheduling order indication information of second service requests according to a first service request carrying the scheduling parameters, and respectively sends the scheduling order indication information of the obtained second service requests to a decision server; the first service request refers to a service request received by the target server, and the second service request refers to a service request which does not reach the target server.
In one aspect, a method for detecting a service request is provided, which is applied to a decision server, and the method includes:
receiving scheduling order indication information of second service requests sent by each target server; the scheduling order indication information of the second service request of each target server is obtained according to the received scheduling parameters carried by the first service request of the client, the scheduling parameters carried by each first service request are obtained after the client receives the scheduling response sent by the corresponding scheduling server, each scheduling parameter comprises the scheduling order indication information corresponding to the service request, the scheduling order indication information is used for indicating the order of the scheduling server for scheduling the target server, and the second service request is the service request which does not reach the target server;
and determining the service requests which do not reach the target servers according to the scheduling order indication information of the second service requests.
In one aspect, a method for detecting a service request is provided, which is applied to a client, and the method includes:
sending a scheduling request to a scheduling server, and receiving a scheduling response sent by the scheduling server; the scheduling response carries address information of a target server scheduled for the client and scheduling parameters corresponding to the target server, wherein the scheduling parameters comprise scheduling order indication information, and the scheduling order indication information is used for indicating the order of the target server scheduled by the scheduling server this time;
sending a service request carrying the scheduling parameter to the target server according to the address information, so that the target server generates scheduling order indication information of a second service request according to the scheduling parameter carried in the first service request, and sends the scheduling order indication information of the second service request to a decision server; the first service request refers to a service request received by the target server, and the second service request refers to a service request which does not reach the target server.
An embodiment of the present application provides a service request detection apparatus, including:
the obtaining module is used for obtaining the scheduling order indication information of each first service request from the scheduling parameters carried in each first service request; the scheduling server is used for scheduling the target servers corresponding to the service requests according to the scheduling order indication information;
an obtaining module, configured to obtain scheduling order indication information of the second service request according to the obtained scheduling order indication information; the second service request refers to an unattained service request;
and the sending module is used for sending the scheduling order indication information of the second service request to the decision server so that the decision server determines the second service request which does not reach the target server according to the scheduling order indication information of the second service request.
In a possible embodiment, the obtaining module is specifically configured to:
buffering each first service request in a preset time length before the current time;
and determining scheduling order indication information corresponding to a second service request which exceeds the preset time length and is not reached according to the scheduling order indication information in each first service request in the preset time length.
In a possible embodiment, the target server caches an array and a first queue, where the array includes multiple scheduling orders and a flag bit corresponding to each scheduling order, the flag bit is used to indicate whether a service request corresponding to the scheduling order reaches the target server, the first queue is used to cache a maximum scheduling order that the array has been set when being written in each unit time, and a time length required for the array to be written in the first queue is the preset time length; and the obtaining module is specifically configured to:
setting a flag bit of the scheduling order indicated by the first service request in the array according to the scheduling order indication information in each first service request;
performing write operation on the first queue according to the set maximum scheduling order in the array in unit time;
and if the first queue is determined to be full, moving the pointer to a head element of the first queue, detecting whether each scheduling sequence is set or not in the pointer moving process, and determining the unset scheduling sequence.
In a possible embodiment, the scheduling parameter of each first service request further carries identification information of a scheduling server, and the target server caches an array of each scheduling server; the obtaining module is specifically configured to: determining a scheduling server corresponding to each first service request according to the identification information of the corresponding scheduling server in each first service request;
and setting the scheduling order in the array corresponding to each first service request according to the scheduling order indicated by each first service request.
An embodiment of the present application provides a service request detection apparatus, including:
the receiving module is used for respectively receiving the scheduling requests of the clients;
the determining module is used for determining a target server scheduled for each client;
the obtaining module is used for obtaining scheduling parameters corresponding to each target server; each scheduling parameter comprises scheduling order indication information, and the scheduling order indication information is used for indicating the order of scheduling target servers by a scheduling server;
a sending module, configured to send scheduling responses carrying scheduling parameters of corresponding target servers to each client, so that each client sends a service request carrying the scheduling parameters to the corresponding target server, so that each target server obtains scheduling order indication information of a second service request according to a first service request carrying the scheduling parameters, and sends the scheduling order indication information of the obtained second service request to a decision server; the first service request refers to a service request received by the target server, and the second service request refers to a service request which does not reach the target server.
In a possible embodiment, the obtaining module obtains the scheduling parameter of any target server specifically by:
if the scheduling parameters of any target server are stored, updating scheduling order indication information in the stored scheduling parameters;
if the scheduling parameter of any target server is not stored, generating a scheduling identifier for scheduling any target server, and generating the scheduling parameter of any target server according to the scheduling identifier and the initial scheduling order indication information.
In a possible embodiment, the sending module is further configured to:
and sending the scheduling information carrying the corresponding scheduling parameters of each target server to a decision server so that the decision server determines the service request achievement rate of each target server according to the scheduling information of each target server and the scheduling order indication information of the second service request of the corresponding target server.
An embodiment of the present application provides a service request detection apparatus, including:
the receiving module is used for receiving scheduling order indication information of the second service requests sent by each target server; the scheduling order indication information of the second service request of each target server is obtained according to the received scheduling parameters carried by the first service request of the client, the scheduling parameters carried by each first service request are obtained after the client receives the scheduling response sent by the corresponding scheduling server, each scheduling parameter comprises the scheduling order indication information corresponding to the service request, the scheduling order indication information is used for indicating the order of the scheduling server for scheduling the target server, and the second service request is the service request which does not reach the target server;
and the determining module is used for determining the service requests which do not reach the target servers according to the scheduling order indication information of the second service requests.
In a possible embodiment, the receiving module is further configured to receive scheduling information sent by each scheduling server; each piece of scheduling information comprises scheduling parameters of a corresponding target server;
the determining module is further configured to determine a service request achievement rate of each target server according to the scheduling parameter sent by each scheduling server and the second service request of each target server;
and the determining module is further used for determining the scheduling decision corresponding to each target server according to the service request achievement rate.
In a possible embodiment, each piece of scheduling information further includes identification information of a client corresponding to the scheduling parameter; the determination module is further to:
detecting a second service request associated with each client according to the identification information of each client;
determining the service request reaching rate of each client according to the second service request associated with each client and the scheduling parameters sent by each scheduling server;
and determining a scheduling decision corresponding to each client according to the service request reaching rate of each client.
In a possible embodiment, the decision server caches a second queue corresponding to each scheduling server, each second queue caches a maximum scheduling order indicated by a scheduling parameter obtained from the corresponding scheduling server in each unit time, and a time length for filling the second queue is a preset time length; and the device also comprises a deleting module and a writing module, wherein:
the writing module is used for writing the second queues corresponding to the scheduling servers according to the maximum scheduling order corresponding to each scheduling server obtained in unit time;
and the deleting module is used for deleting the identification information of the client corresponding to the head element of the second queue, the scheduling order of which is less than that of the second queue, if the second queue is determined to be full.
An embodiment of the present application provides a service request detection apparatus, including:
the sending module is used for sending a scheduling request to the scheduling server;
the receiving module is used for receiving the scheduling response sent by the scheduling server; the scheduling response carries address information of a target server scheduled for the client and scheduling parameters corresponding to the target server, wherein the scheduling parameters comprise scheduling order indication information, and the scheduling order indication information is used for indicating the order of the target server scheduled by the scheduling server this time;
the sending module is further configured to send a service request carrying the scheduling parameter to the target server according to the address information, so that the target server generates scheduling order indication information of a second service request according to the scheduling parameter carried in the first service request, and sends the scheduling order indication information of the second service request to the decision server; the first service request refers to a service request received by the target server, and the second service request refers to a service request which does not reach the target server.
An embodiment of the present application provides a computer device, including:
at least one processor, and
a memory communicatively coupled to the at least one processor;
wherein the memory stores instructions executable by the at least one processor, the at least one processor implementing any of the service request detection methods as discussed above by executing the instructions stored by the memory.
Embodiments of the present application provide a storage medium storing computer instructions, which when run on a computer, cause the computer to perform any of the service request detection methods as discussed above.
Due to the adoption of the technical scheme, the embodiment of the application has at least the following technical effects:
in the embodiment of the application, the scheduling order indication information of the target server allocated to the client is carried in the scheduling response fed back by the scheduling server from the client, and the scheduling order indication information is also carried in the service request sent by the client to the target server, so that the target server can determine the scheduling order of the service request which is not reached according to the received service request and report the scheduling order to the decision server, the decision server can directly determine the service request which does not reach the target server, the service request which does not reach the target server is not required to be determined through a large number of logs of the target server, the storage overhead of the decision server is reduced, the search overhead of the search logs of the decision server is reduced, and the process of detecting the service request is simpler and more efficient. And, because the processing time of the decision server is shorter, the time delay of detecting the service request is reduced.
Drawings
FIG. 1A is a system diagram illustrating cut-through scheduling according to an embodiment of the present invention;
fig. 1B is a schematic deployment diagram of each device shown in fig. 1 according to an embodiment of the present application;
FIG. 2A is a schematic diagram of a system 302 for scheduling according to an embodiment of the present application;
fig. 2B is a schematic deployment diagram of each device shown in fig. 3 according to an embodiment of the present application;
fig. 3 is a diagram of an interaction process between the devices in fig. 1B according to an embodiment of the present application;
fig. 4 is a schematic diagram of a process of generating scheduling parameters according to an embodiment of the present application;
fig. 5 is a diagram illustrating an example of a structure for generating scheduling parameters according to an embodiment of the present application;
fig. 6 is a schematic process diagram for detecting that a scheduling order of service requests is not reached according to an embodiment of the present application;
FIG. 7 is a schematic diagram of a flag bit in a set array according to an embodiment of the present disclosure;
FIG. 8 is an exemplary diagram of a write first queue provided by an embodiment of the present application;
FIG. 9 is a schematic diagram illustrating a process of detecting whether an ordinal number is set according to an embodiment of the present application;
fig. 10 is a diagram illustrating an interaction process between the devices in fig. 2B according to an embodiment of the present disclosure;
fig. 11 is a first schematic structural diagram of a service request detection apparatus according to an embodiment of the present application;
fig. 12 is a schematic structural diagram of a service request detection apparatus according to an embodiment of the present application;
fig. 13 is a schematic structural diagram three of a service request detection apparatus according to an embodiment of the present application;
fig. 14 is a schematic structural diagram of a service request detection apparatus according to an embodiment of the present application;
fig. 15 is a schematic structural diagram of a computer device according to an embodiment of the present application.
Detailed Description
In order to better understand the technical solutions provided by the embodiments of the present application, the following detailed description is made with reference to the drawings and specific embodiments.
To facilitate better understanding of the technical solutions of the present application for those skilled in the art, the following terms related to the present application are introduced.
Cloud technology (Cloud technology): the management method is a management technology for unifying series resources such as hardware, software, network and the like in a wide area network or a local area network to realize the calculation, storage, processing and sharing of data. Based on the general names of network technology, information technology, integration technology, management platform technology, application technology and the like applied in the cloud computing business model, a resource pool can be formed and used as required, and the cloud computing business model is flexible and convenient. Cloud computing technology will become an important support. Background services of the technical network system require a large amount of computing and storage resources, such as video websites, picture-like websites and more web portals. With the high development and application of the internet industry, each article may have its own identification mark and needs to be transmitted to a background system for logic processing, data in different levels are processed separately, and various industrial data need strong system background support and can be realized through cloud computing.
A distributed cloud storage system (hereinafter, referred to as a storage system) refers to a storage system that integrates a large number of storage devices (storage devices are also referred to as storage nodes) of different types in a network through application software or application interfaces to cooperatively work by using functions such as cluster application, grid technology, and a distributed storage file system, and provides a data storage function and a service access function to the outside.
At present, a storage method of a storage system is as follows: logical volumes are created, and when created, each logical volume is allocated physical storage space, which may be the disk composition of a certain storage device or of several storage devices. The client stores data on a certain logical volume, that is, the data is stored on a file system, the file system divides the data into a plurality of parts, each part is an object, the object not only contains the data but also contains additional information such as data identification (ID, ID entry), the file system writes each object into a physical storage space of the logical volume, and the file system records storage location information of each object, so that when the client requests to access the data, the file system can allow the client to access the data according to the storage location information of each object.
The process of allocating physical storage space for the logical volume by the storage system specifically includes: physical storage space is divided in advance into stripes according to a group of capacity measures of objects stored in a logical volume (the measures often have a large margin with respect to the capacity of the actual objects to be stored) and Redundant Array of Independent Disks (RAID), and one logical volume can be understood as one stripe, thereby allocating physical storage space to the logical volume. The embodiment of the application can be applied to resource scheduling in a content distribution network realized based on cloud storage, for example, a target server stores resources required by a client based on a cloud storage technology, and the client can request the corresponding target server to provide content service for the client through a scheduling server.
Content Delivery Network (CDN): the present invention relates to a computer network system interconnected via the internet, which uses the service of a server user closest to a user to more quickly and reliably send music, pictures, movies, applications and other files to the user, thereby providing high-performance, extensible and low-cost network content delivery to the user.
Service request: refers to a request sent by a client to a target server for requesting the provision of a business service. For convenience of description, the service request received by the target server is referred to as a first service request, and the first service request may also be referred to as a reach service request. The theoretical client should send a service request to the target server, but the target server does not reach the target server for other reasons, and this kind of service request may be referred to as a second service request, which may also be referred to as a non-reached service request or a non-reached service request.
Scheduling parameters: the scheduling parameter is a scheduling parameter corresponding to a scheduling server scheduling target server. The scheduling parameter includes scheduling order indication information. The scheduling order indication information is used to indicate an order in which the scheduling server schedules the target server, such as first scheduling, second scheduling, and the like. The scheduling order indication information may be the scheduling order itself or information for indirectly indicating the scheduling order. When the scheduling order changes, the scheduling order indicated by the scheduling order indication information is also different. The scheduling parameter further includes one or both of a Dispatcher Identification (Dispatcher ID) or a Dispatcher Identification (seq ID) of the dispatch server. The Dispatcher ID may adopt, for example, an IP address of the dispatch server, and the seq ID is a unique identifier representing the dispatch process, and may be specifically generated according to a timestamp and a preset algorithm. When the target server is multiple, each target server corresponds to a respective scheduling parameter. When the scheduling server includes a plurality of scheduling servers, each scheduling server may maintain the scheduling parameter corresponding to each target server.
The following is a description of the design concept of the embodiments of the present application.
The scheduling server is used for scheduling a target server for the client, and the client accesses the target server to provide service for the target server. In the service process, the decision server needs to adjust the scheduling decision corresponding to the target server according to the condition that the target server processes the service request, so that the target server can provide better service for the client.
For this reason, in the related art, the decision server collects all access logs corresponding to the service request that is reached by each target server, and collects the scheduling records of the scheduling server. And according to each scheduling record, positioning to a corresponding target server, and further determining the service request reaching condition corresponding to the target server. However, the following disadvantages exist in this way of detecting a service request:
the decision server needs to record the access log of each target server, so that the storage occupation of the decision server is high. In addition, the decision server searches for each scheduling request, so that the scheduling records reported by the scheduling server are matched with the corresponding access logs. And each access log may be searched repeatedly many times during the search process. Furthermore, the amount of access logs and the number of scheduling requests are difficult to control, which results in a large amount of time spent by the decision server for processing, and a delay of detecting the service request at least above the minute level. And the detection of the lack of real-time performance of the scheduling request leads to the failure of timely correct scheduling decision for the target server, which may further affect the use of the user.
In view of this, an embodiment of the present application provides a method for detecting a service request, in which a scheduling server feeds back, to a client, a scheduling parameter corresponding to an allocated target server, where the scheduling parameter carries scheduling order indication information of the scheduling target server, and when the client sends a service request to the target server, the service request carries the scheduling parameter, so that the target server can identify an unreachable service request in real time according to the scheduling parameter in the received service request, and then report the unreachable service request to a decision server, and the decision server can quickly and directly obtain the service request that has not yet reached the target server. Furthermore, the scheduling server can synchronize the scheduling parameters corresponding to each target server to the decision server in real time, so that the decision server can acquire the scheduling condition in real time and determine the service request reaching rate of each target server. In addition, the scheduling server can report the identification information of the clients corresponding to the scheduling parameters to the decision server, so that the decision server can determine the service request achievement condition corresponding to each client, and further determine the scheduling decision corresponding to the client.
In the method, firstly, the target server identifies the relevant information of the service request which does not arrive according to the scheduling order indication information in the service request which has arrived, only reports the relevant information of the service request which does not arrive, and does not need to report all access logs to the decision server, but the proportion of the service request which does not arrive and the total service request is generally less than 1%, and the method also does not need to detect or report the non-service request, so the data volume reported by the target server to the decision service is reduced by more than 99% compared with the related technology. Secondly, the decision server does not need to search a great amount of scheduling requests or access logs, so that the searching expense is reduced. Thirdly, the detection time delay in the method depends on the detection time delay of the target server and the interaction time among all the devices, when the target server detects the service requests which are not arrived, only the scheduling sequence indication information in the arrived service requests needs to be processed in sequence, the detection time delay is in the second level, the detection time delay is configurable, and the interaction time among all the devices is in the second level, so that the method realizes the instantaneity of the second level. And fourthly, the decision server stores the scheduling parameters and the identification information of the corresponding client in an associated manner, so that the service reaching condition of the client can be determined only by retrieving the identification information corresponding to the client, the detection mode of the decision server is changed from the mode of processing logs of each device in a centralized manner by the decision server in the related art into a distributed processing mode, and the efficiency of detecting service requests is improved.
Based on the above design concept, an application scenario of the service request detection method according to the embodiment of the present application is introduced below.
The service request detection method related to the embodiment of the application can be applied to various scheduling scenarios including but not limited to a server scheduling scenario in a CDN. However, due to the fact that some target servers are down or the client cannot access the scheduling resources of the CDN, the client may not normally access the scheduling resources, for example, the scheduling resource type of the CDN includes a service port, the scheduling resource of the CDN uses a non-standard service port, but the client is located in an intranet environment where access to the non-standard port is limited, and for the client, the client cannot be scheduled to the non-standard service port. The service request detection method in the embodiment of the application can be suitable for detecting the service request reaching condition so as to determine the corresponding scheduling decision scene.
The service request detection method in the embodiment of the application can be applied to direct scheduling or 302 scheduling in the CDN. Referring to fig. 1A, a system architecture diagram corresponding to express dispatch or an application scenario applicable to the service request detection method in the embodiment of the present application is illustrated, where the application scenario includes a client 110, a dispatch server 120, a target server 130, and a decision server 140. To more clearly show the deployment diagrams of the respective devices, the following describes an example of the functions of the respective devices with reference to the device deployment diagram shown in fig. 1B.
The client 110 is disposed in the terminal 100, and fig. 1B illustrates that the client 110 includes a first client 111 and a second client 112, and the terminal 100 is, for example, a mobile phone, a personal computer, or the like. The client 110 may be a web page version client, a client pre-installed in the terminal 100, a client embedded in a third party application, or the like. Clients 110 include clients that broadly refer to various types of functionality, such as video playback clients, social clients, and the like.
The scheduling server 120, the target server 130, and the decision server 140 may be independent physical servers, may also be a server cluster or a distributed system formed by a plurality of physical servers, and may also be cloud servers providing basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, CDNs, and big data and artificial intelligence platforms. In fig. 1B, the scheduling server 120 includes a first scheduling server 121 and a second scheduling server 122, the target server 130 includes a first target server 131 and a second target server 132, and the decision server 140 includes one, which is not limited to the number of devices.
With continued reference to fig. 1A, the interaction process between the devices in the direct scheduling will be briefly described.
1. The client 110 sends a scheduling request to the scheduling server 120.
The scheduling request is used to request allocation of the target server 130 to the client 110, so that the target server 130 provides the corresponding service for the client 110.
2. The scheduling server 120 feeds back the scheduling response to the client 110.
After receiving the scheduling request, the scheduling server 120 determines a corresponding target server 130 for the client 110 according to the scheduling rule, and feeds back the address information of the target server 130 and the scheduling parameter corresponding to the target server 130 carried in the scheduling response to the client 110. The Address information of the target server 130 in the cut-through scheduling is specifically an Internet Protocol Address (IP) of the target server 130. The content of the scheduling server 120 obtaining the scheduling parameters will be described below.
3. The client 110 sends a service request to the target server 130.
After obtaining the scheduling response, the client 110 establishes a connection with the target server 130 through the IP address of the target server 130, and sends a service request carrying the scheduling parameter to the target server 130. The service request is used to request the target server 130 to provide a corresponding service for the client terminal 110.
4. The target server 130 feeds back the relevant information of the missed service request to the decision server 140.
The target server 130 determines scheduling order indication information of the service requests which are not reached according to the scheduling parameters in the received service requests, and reports the scheduling order indication information to the decision server 140, and the decision server 140 determines the service requests which do not reach each target server according to the information reported by the target server 130. The service request of the target server 130, which determines that the service request does not reach each target server, will be described below.
5. The scheduling server 120 reports the scheduling information to the decision server 140.
After the scheduling server 120 feeds back the scheduling response, the scheduling parameter of the target server may be fed back to the decision server 140, in addition, the scheduling server 120 may also feed back the identification information of the client to the decision server 140, and the decision server 140 may determine, according to the received scheduling information and the related information, the service request reaching situation of the target server, the service reaching request situation of the client 110, and the like, so as to generate a corresponding scheduling decision, and the like.
6. The decision server 140 sends the scheduling decision to the scheduling server 120.
The decision server 140 sends the scheduling decision to the scheduling server 120 in order for the scheduling server 120 to execute the scheduling decision.
After the express scheduling is introduced, the relevant contents related to the 302 scheduling will be described below.
Referring to fig. 2A, a corresponding system architecture diagram is scheduled for 302, or may be understood as an application scenario diagram applicable to the service request detection method in the embodiment of the present application, where the application scenario includes the client 110, the scheduling server 120, the target server 130, the access server 200, and the decision server 140. To more clearly show the deployment diagrams of the respective devices, the following describes an example of the functions of the respective devices with reference to the device deployment diagram shown in fig. 2B.
The contents of the client 110, the scheduling server 120, the target server 130, and the decision server 140 may refer to the contents discussed in fig. 1B, which are not described herein again. Fig. 2B illustrates the client 110 including the first client 111 and the second client 112, fig. 2B illustrates the scheduling server 120 including the first scheduling server 121 and the second scheduling server 122, fig. 2B illustrates the target server 130 including the first target server 131 and the second target server 132, and fig. 2B illustrates the decision server 140 including one example, and fig. 2B illustrates the access server 200 including the first access server 211 and the second access server 212. The implementation of the access server 200 may refer to the implementation of the server discussed above, and will not be described herein.
With continued reference to fig. 2A, the interaction process of each device in the 302 scheduling scenario is briefly described below.
1. The client 110 sends a scheduling request to the access server 200.
2. The access server 200 sends a scheduling request to the scheduling server 120.
3. The scheduling server 120 transmits a scheduling response to the access server 200.
The scheduling server 120 determines a target server allocated to the client 110, and feeds back a scheduling parameter of the target server and address information of the target server, which is a Domain Name System (DNS) address of the target server, to the access server 200 in a scheduling response.
4. The access server 200 sends a scheduling response to the client 110.
5. The client 110 sends a service request to the target server 130.
The service request carries the scheduling parameters of the target server 130.
6. The target server 130 feeds back the relevant information of the missed service request to the decision server 140.
The content of the relevant information and the relevant information that has not been reported to the service request may refer to the content discussed above, and will not be described herein again.
7. The scheduling server 120 reports the scheduling information to the decision server 140.
The scheduling information can refer to the content discussed above, and is not described herein again.
8. The decision server 140 sends the scheduling decision to the scheduling server 120.
The decision server 140 sends the scheduling decision to the scheduling server 120 in order for the scheduling server 120 to execute the scheduling decision.
Fig. 1A to fig. 2B illustrate application scenarios related to an embodiment of the present application, and actually do not limit the application scenarios of the service request detection method in the present application.
The interaction between the devices involved in the embodiments of the present application is illustrated below based on the devices discussed in fig. 1B. Please refer to fig. 3, which is a schematic diagram illustrating interaction among the devices in fig. 1B.
S301, the first client 111 sends a first scheduling request to the first scheduling server 121.
The first client 111 transmits a first scheduling request to the first scheduling server 121 to request the target server 130 to provide a server therefor. The first scheduling request may include identification information of the first client 111, such as an IP address of the first client 111, so that the first scheduling server 121 can determine the client 110 corresponding to the scheduling request according to the first scheduling request.
S302, the first scheduling server 121 feeds back the first scheduling response to the first client 111.
After the first scheduling server receives the scheduling request, the first target server 131 allocated to the first client 111 may be determined according to the scheduling rule according to the scheduling request. The first scheduling server 121 caches the scheduling order corresponding to each target server 130, and when the first scheduling server 121 is restarted, the scheduling order of each target server 130 may be lost, and the scheduling order corresponding to each target server 130 may be newly accumulated and scheduled. The first scheduling server 121 obtains from the cache the scheduling order (Seq) of the first target server 131, which may be an increasing number from 0, identifying the number of times the scheduling server schedules the target server. And generating scheduling parameters according to the scheduling order, and carrying the address information of the first target server 131 and the corresponding scheduling parameters in a scheduling response, and sending the scheduling response to the first client 111.
Here, the scheduling parameter includes at least scheduling order indication information for indicating a scheduling order in which the first scheduling server 121 schedules the first target server 131, and the scheduling order indication information may be the scheduling order itself or information for indirectly indicating the scheduling order. The scheduling order may be sequentially incremented for the first target server 131 or incremented according to a preset function. The scheduling parameter may further include identification information of the first scheduling server 121 or a scheduling identification corresponding to the scheduling process. The scheduling identifier does not change in the continuous scheduling process, and once the first scheduling server 121 goes down, the scheduling identifier for each target server 130 may be regenerated, so as to re-count the scheduling order of each scheduling server.
The following describes an example of a process in which the first scheduling server 121 obtains the scheduling parameter of the first target server 131. Referring to fig. 4, an exemplary process for generating the scheduling parameter of the first target server 131 includes:
s401, the first scheduling server 121 caches a scheduling order corresponding to each target server.
Each scheduling server 120 has the authority to schedule each target server 130, and therefore, the first scheduling server 121 buffers the scheduling order of each target server. In addition, the scheduling identifier (Seq ID) for each target server 130 may be cached, and the scheduling identifier (Seq ID) identifies the scheduling process of one scheduling server to one target server, and is fixed after being generated for the first time. For example, the first scheduling server 121 caches the following duplets for each target server 130:
identification information of target server ═ scheduling identification, scheduling order > (1)
The identification information (Target ID) of the Target server refers to the identification information of the Target server 130 corresponding to the binary group.
S402, the first scheduling server 121 determines the first target server 131 scheduled this time.
After the first scheduling server 121 determines to allocate the first Target server 131 to the first client 111, the binary group indexed to the first Target server 131 by the Target ID of the first Target server 131 may be used to obtain the scheduling order corresponding to the first Target server 131. S403, the first scheduling server 121 determines whether the scheduling order of the first target server 131 is stored. If the first scheduling server 121 determines that the scheduling order of the first target server 131 is stored, S404 is performed, that is, the scheduling parameter of the first target server 131 is generated according to the stored scheduling order. If the first scheduling server 121 determines that the scheduling order of the first target server 131 is not stored, S405 is performed, a scheduling flag is generated, and scheduling parameters are generated according to the scheduling flag and the initial scheduling order.
If the first scheduling server 121 stores the tuple of the first target server 131, the scheduling order corresponding to the first target server 131 is obtained from the tuple, and the scheduling order is added, so that scheduling order indication information is generated according to the scheduling order, and scheduling parameters are generated according to the scheduling order indication information.
If the first scheduling server 121 does not store the tuple of the first target server 131, for example, the first scheduling server 121 may be restarted due to a scenario such as upgrade and downtime, and the tuple shown in equation (1) above may be lost, at this time, the first scheduling server 121 may set the initial value of Seq to be a fixed value, and start incrementing the fixed value again. Meanwhile, the first scheduling server 121 generates a Seq ID using the available time stamp. If the Seq ID exists, the target server 130 may obtain the re-counted scheduling order, thereby ensuring that the service request detection process does not make an error due to the failure of the first scheduling server 121.
For one embodiment, since there are multiple dispatch servers 120 that are not necessarily capable of synchronizing data in real time, and multiple dispatch servers 120 may dispatch the same target server 130 at the same time, a sequence of Seq increments corresponding to multiple target servers 130 is stored on one dispatch server 120. In this case, in order to distinguish the schedules of different scheduling servers 120, identification information (Dispatcher ID) of the scheduling server 120 may also be included in the scheduling parameter.
When the scheduling parameter is generated, the scheduling order information, the identifier information (Dispatcher ID) of the dispatch server 120, the scheduling identifier, and the like may be directly combined arbitrarily to obtain the scheduling parameter.
Further, in order to facilitate subsequent analysis of the scheduling parameter, bits occupied by each piece of information in the scheduling parameter may be relatively fixed, and the scheduling server 120 constructs the scheduling parameter according to the bits occupied by each piece of information when generating the scheduling parameter.
For example, the first scheduling server 121 occupies a bit for the scheduling identifier in the scheduling process of the first target server 131, and records that the identifier information of the first scheduling server 121 occupies b bits, and the first scheduling server 121 constructs the scheduling parameter arivie Key according to the following formula:
Arrive Key=(Seq<<(a+b))|(Seq ID<<b)|Dispatcher ID (2)
wherein "< <" in the formula (2) represents how many bits are left-shifted by bit, and "|" represents concatenation.
For example, the scheduling parameters spliced by the above equation (2) may be represented as shown in fig. 5, and the scheduling parameters sequentially include Seq, Seq ID, and Dispatcher ID. Fig. 5 is only an example of the scheduling parameter, and does not limit the arrangement order of the Seq, the Seq ID, and the Dispatcher ID.
As discussed above, the scheduling request further includes identification information of the client 110, and in order to facilitate the subsequent correspondence of the scheduling parameter to the client 110, the first scheduling server 121 may store, in addition to the binary group in the above equation (1), an identification information list of the client corresponding to each target server 130, where the identification information list of the client is used to indicate a category formed by identification information of all clients scheduled to each target server 130. The identification information of the client 110 may specifically be represented by an IP address of the client 110.
S303, the first client 111 sends the first service request to the first target server 131.
After receiving the scheduling response, the first client 111 may send a first service request carrying the scheduling parameter to the first target server 131 according to the address information of the first target server 131 in the scheduling response.
Since the first target server 131 may receive other requests besides the service request, the first target server 131 in this embodiment may determine whether the request includes the scheduling parameter after receiving each request, and determine that the request belongs to the service request if the request includes the scheduling parameter. If the request does not include the scheduling parameter, the request is determined not to be a service request, thereby avoiding a large amount of analysis processing on the request which is not a service request.
S304, the second client 112 sends a second scheduling request to the first scheduling server 121.
The second client 112 transmits a second scheduling request to the first scheduling server 121 to request the target server 130 to provide a server therefor. The second scheduling request includes identification information of the second client 112.
It should be noted that the order in which the scheduling requests and the service requests are sent by the respective clients 110 may be arbitrary.
S305, the first scheduling server 121 feeds back the scheduling response to the second client 112.
The first scheduling server 121 receives the scheduling request of the second client 112, determines to allocate the first target server 131 to the scheduling request, obtains the scheduling parameter of the first target server 131, and feeds the scheduling parameter carried in the scheduling response back to the second client 112. The manner in which the first scheduling server 121 obtains the scheduling parameter of the first target server 131 may refer to the manner in which the scheduling parameter is obtained discussed above, and is not described here again.
Under normal circumstances, the second client 112 should send the service request to the first target server 131, but the second client 112 does not successfully send the service request to the first target server 131, possibly due to a breakdown of the first target server 131, a problem of a communication link between the first target server 131 and the second client 112, or a problem of limited access of the second client 112.
S306, the first target server 131 determines the scheduling order indication information of the second service request.
After receiving the first service request sent by the first client 111, the first target server 131 may obtain scheduling order indication information according to the scheduling parameters carried in each reached first service request, that is, obtain the scheduling order corresponding to the first service request, thereby determining that the scheduling order corresponding to the second service request that does not reach the first target server 131. The second service request may understand a service request that has not been received by the first target server 131 for more than a preset time. For example, the first target server 131 may sort the scheduling order indicated by the scheduling order indication information according to the already obtained scheduling order indication information and according to a preset order, determine a scheduling order that is not obtained in the sorting, and determine a service request corresponding to the scheduling order that is not obtained as the second service request. The scheduling order indication information of the second service request may be understood as missing from the obtained scheduling order indication information according to the ordering.
After determining that the reached request is a service request or directly receiving a first service request, the first target server 131 may parse the corresponding first scheduling parameter from the first service request.
For example: the first service request received by the first target server 131 comprises the following code segments:
>GET/example.txt?example_args&arrive_key=1205406105
the first target server 131 may obtain the scheduling parameter 1205406105 from the code segment, and the first target server 131 may parse the scheduling parameter according to the above equation (2), so as to obtain the scheduling order, the identification information of the first scheduling server 121, the scheduling identification, and the like, which are referred to in the above equation (2), where specific examples of field values corresponding to the three parameters are as follows:
Seq=Arrive Key>>(a+b) (3)
Seq ID=(Arrive Key>>b)&(1<<a-1) (4)
Dispatcher ID=Arrive Key&(1<<b–1) (5)
in the above description, "> >" indicates a few bits shifted to the left, and "< <" indicates a few bits shifted to the right.
The scheduling parameter is 1205406105, and the first target server 131 converts the scheduling parameter into a binary number, specifically: 01000111110110010000100110011001, for example, a takes 8 and b takes 8, the first 16 bits of "0100011111011001" corresponding to the scheduling order corresponding to the first service request is analyzed according to the above formulas (3) to (5), and the result is converted to decimal and expressed as 18393, and so on, the scheduling identifier and the identifier information corresponding to the scheduling server 120 are analyzed respectively.
In this way, after the first target server 131 can obtain the scheduling order of each reached first service request, because the scheduling order is increased, the first target server 131 determines the scheduling order corresponding to the second service request that has not been reached within the preset time length, so as to obtain the scheduling order indication information of the second service request. The value of the preset duration may be predefined by the first target server 131, and the value of the preset duration may be set according to a required communication duration between the first target server 131 and the client 110, for example, the preset duration is set to be greater than the communication duration.
Specifically, the first target server 131 maintains a sliding time window corresponding to a preset time duration t, the sliding time window records service requests received within the preset time duration, and the first target server 131 may record the time of each first service request and a scheduling order corresponding to each first service request, and determines that a service request corresponding to a second scheduling order that is adjacent to and before the first scheduling order indicated by the first service request does not arrive within the preset time duration, and then determines that the service request corresponding to the second scheduling order is unreachable.
For example, the time of arrival of the first service request is 10:00, the first scheduling order indicated by the scheduling order indication information in the first service request is 26, the preset time duration is 2min, and the first target server 131 determines that the service request with the scheduling order of 25 is still not received at 10:02, and determines that the service request with the scheduling order of 25 does not arrive.
In another specific embodiment, the first target server 131 caches an array for each scheduling server 120, where the array is used to record the scheduling order, and a flag bit corresponding to each scheduling order is used to indicate whether the service request indicating the scheduling order has arrived at the first target server 131. The first target server 131 caches a first queue including the maximum scheduling order that has been set in the array per unit time, and the time required for the first queue to be full is the preset time discussed above. Wherein, the first queue can be a first-in first-out queue.
When the first target server 131 determines that the first queue is full, it indicates that the first target server 131 has not received the service request corresponding to the scheduling order before the head-of-line element of the first queue in the array within the preset time length, so that the first target server 131 obtains the scheduling order that does not reach the service request.
In specific implementation, because the first target server 131 caches the first queue and the array for each scheduling server 120, after obtaining the scheduling parameter in the first service request, the first target server 131 can identify the scheduling of the first service request originating from the first scheduling server 121 according to the identification information of the first scheduling server 121 in the scheduling parameter, and index the array and the first queue corresponding to the first scheduling server 121 by the scheduling identifier of the first scheduling server 121, and after indexing the array and the first queue corresponding to the first scheduling server 121, the first target server 131 can determine the scheduling order of the second service request that does not reach according to the array and the first queue, which is described below with reference to a flowchart of a method for detecting the second service request shown in fig. 6:
s601, setting the flag bit of the scheduling order in the array.
After obtaining the first scheduling order indicated by the first service request, the first target server 131 sets the flag bit corresponding to the first scheduling order in the array. The flag bit of the scheduling order is set to indicate that the service request corresponding to the scheduling order reaches the first target server 131, and the flag bit of the scheduling order is not set to indicate that the service request corresponding to the scheduling order does not reach the first target server 131.
For example, referring to fig. 7, a is a schematic diagram illustrating a process of setting a flag bit of a scheduling order in an array for the first target server 131, where a in fig. 7 shows the array before setting, the array includes the scheduling orders 47 to 55, and the flag bit of whether the service request corresponding to each scheduling order has been reached, the flag bit of "0" indicates that the flag bit corresponding to the scheduling order has not been reached, and the flag bit of "1" indicates that the flag bit corresponding to the scheduling order has been reached. After obtaining a first service request, the first target server 131 determines that the first scheduling order of the first service request is 50, and sets the flag bit of the first scheduling order in the array shown by a from "0" to "1".
As an example, the first target server 131 may maintain a Pmax pointer in the array, which points to the maximum scheduling order that has been set in the array, i.e. the maximum scheduling order indicated in the currently reached service request. When the array is set, whether the Pmax pointer is moved is judged.
And if the currently set scheduling order is larger than the maximum scheduling order corresponding to the Pmax pointer, moving the Pmax to the currently set scheduling order. If the currently set scheduling order is less than the maximum scheduling order corresponding to the Pmax pointer, the Pmax pointer is not moved.
S602, writing operation is carried out on the first queue.
The first target server 131 writes the scheduling order corresponding to the Pmax pointer every unit time, so that the elements in the first queue are not non-decreasing. For example, the scheduling order corresponding to the Pmax pointer does not change in consecutive time periods, and the same scheduling order will be written repeatedly in the first queue.
For example, when the array continues to refer to the example shown in fig. 7, the first target server 131 sets the first scheduling order 50, determines that 50 is smaller than 52 corresponding to the Pmax pointer, determines that the Pmax pointer in the array is not moved, and repeatedly writes 52 corresponding to the Pmax pointer into the first queue, which is specifically shown in fig. 8.
S603, whether the first queue is full is determined.
When writing into the first queue, the first target server 131 determines whether the first queue is full, and if it is determined that the first queue is full, S604 is executed, that is, kicks out a head-of-queue element in the first queue, moves the Pmin pointer in the array from the current position to the head-of-queue element, detects whether each scheduling order from the current position to the head-of-queue element is set during the movement of the Pmin pointer, and determines that the service request corresponding to the scheduling order that is not set is not reached. If the first queue is determined not to be full, the process is not performed, the next service request received by the first target server 131 is processed, and the steps of S601 to S604 are repeated.
Specifically, before writing elements into the first queue every unit time, if the first queue is full, the time required for writing the first queue to the full is the first preset time t. For example, if the first queue is full with 3 elements, then when the first queue includes 3 elements, then it is determined that the first queue is full, then the head of line element is kicked out, and it is determined that the head of line element has arrived t seconds ago. And moving the Pmin pointer in the array from left to right to a position corresponding to the head element of the array, detecting whether each scheduling order of the array is set or not in the moving process, if not, indicating that the service request corresponding to the scheduling order still does not access the first target server 131 for at least t seconds after scheduling, recording the corresponding scheduling order, and determining that the service request corresponding to the scheduling order does not reach.
For example, with continued reference to the examples shown in fig. 7 and 8, referring to the example diagram of the array shown in fig. 9, before the write-in module 52 repeatedly writes into the first queue, it is determined that the first queue is full, the head-of-line element in the first queue is kicked out, the Pmin pointer in the array is moved from the current position 41 to the position corresponding to the head-of-line element 47, flag bits corresponding to the scheduling orders in 41 to 47 are detected, and it is determined that the unset service request corresponding to 43 does not reach the first target server 131.
In the embodiment of the present application, the first time, the PMin pointer is less than or equal to the PMax pointer, and the time window from the PMin pointer to the PMax pointer is the latest t seconds, so the array only needs to store each scheduling order in the interval from the PMin pointer to the PMax pointer and the corresponding flag bit, the size of the interval corresponds to the latest t seconds, the first scheduling server 121 schedules the service request corresponding to the first target server 131, and the size is limited and controllable, so that the array can adopt a ring array with a fixed length, thereby avoiding unnecessary memory occupation and limiting the size of the occupied memory. Similarly, the length of the first queue Q cannot be increased infinitely, and a plurality of corresponding elements within a preset time length are saved at most. The first target server 131 maintains the array and the first queue for each scheduling server 120 at most, so that the memory overhead of the first target server 131 is reduced and controllable.
Secondly, if the reporting delay is ignored, a service request which does not arrive is detected by the target server 130 within a preset time t after scheduling, the target server 130 reports the service request to the decision server 140 in time for decision making, and the t parameter is configurable, so that the detection delay can be controlled, and the real-time performance of the detection process is improved.
Further, when the first target server 131 detects that the scheduling identifier of the first scheduling server 121 changes, it indicates that the scheduling order of the first scheduling server is reset, and the front-back incremental relationship is broken, at this time, the first target server 131 may reinitialize the scheduling order corresponding to the first scheduling server 121 according to the new scheduling identifier generated by the first scheduling server 121, and continue to detect the reachable condition of the first scheduling server 121 for scheduling the service request of the first target server 131.
The time complexity of the target server 130 detecting the service request reachable condition in the above embodiment is analyzed as follows:
assuming that the number of service requests received by the target server is n, and the time complexity of parsing each service request, indexing to the corresponding array, setting the array, and moving Pmax by the first target server 131 is O (1), the time complexity corresponding to n service requests is O (n). Assuming a total of m scheduling servers, the time complexity for updating, dequeuing and enqueuing the first queue Q is O (1), the time complexity corresponding to n scheduling servers is generally O (m), the time complexity for moving the PMin pointer is generally O (n), and since m is usually much smaller than n, the time complexity of the whole process is O (n).
The first target server 131 can obtain the scheduling order indication information of the missed service request, and each scheduling server 120 corresponds to a first queue and an array, so that the first target server 131 can obtain the scheduling server 120 corresponding to the scheduling order while detecting the missed scheduling order of the service request.
S307, the first target server 131 sends the scheduling order indication information of the second service request to the decision server 140.
The first target server 131 may detect the scheduling order of the second service request through any manner of S306, generate corresponding scheduling order indication information according to the scheduling order of the second service request, and report the scheduling order indication information to the decision server 140, so that the decision server 140 may directly obtain the missed service request corresponding to each target server 130.
Further, in order to reduce the data amount reported by the first target server 131, the first target server may report the scheduling order of the second service request and the maximum scheduling order of the first service request that has been received currently for incremental reporting. The incremental reporting means that the first target server 131 only reports data different from the last reported data, instead of reporting all data together each time. After the first target server 131 reports the corresponding data, the reported data may be deleted, thereby reducing the occupation of the storage space in the first target server 131.
For example, the first target server 131 reports the data shown in the following table 1 to the decision server 140:
TABLE 1
Further, the first target server 131 may further determine the scheduling server 120 corresponding to the second service request and the corresponding scheduling identifier according to the scheduling server corresponding to the array, so that the first target server 131 may send the identifier information of the scheduling server 120 corresponding to the second service request and the identifier information of the first target server 131 to the decision server 140.
For example, referring to fig. 3, the first target server 131 detects that the service request with the scheduling order 43 has not been reached, and determines that the scheduling order corresponds to the first scheduling server 121, so that the scheduling order, the identification information of the first scheduling server 121, and the identification information of the first target server 131 may be sent to the decision server 140 together.
S308, the first scheduling server 121 sends scheduling information to the decision-making server.
The first scheduling server 121 may generate the scheduling information according to the scheduling parameter and the identification information of the client 110 associated with the scheduling parameter, and the scheduling parameter and the identification information of the associated client 110 may refer to the foregoing discussion, which is not described herein again. In order to reduce the amount of reported data, the first scheduling server 121 may also report the scheduling information in an incremental reporting manner.
For example, the scheduling information stored by the first scheduling server 121 is as shown in table 2 below:
TABLE 2
S309, the second client 112 sends a third scheduling request to the second scheduling server 122.
The second client 112 sends a third dispatch request to the second dispatch server 122 to request the target server 130 to service it.
S310, the second scheduling server 122 feeds back the third scheduling response to the second client 112.
S311, the second client 112 sends the first service request to the second target server 132.
S312, the second target server 132 determines the scheduling order indication information of the second service request.
The manner in which the second target server 132 determines the scheduling order indication information of the second service request may refer to the manner in which the first target server 131 determines, which is discussed above and will not be described herein again.
S313, the second target server 132 sends the scheduling order indication information of the second service request to the decision server 140.
S314, the second scheduling server 120 sends scheduling information to the decision server 140.
S315, the decision server 140 determines a corresponding scheduling decision.
The decision server 140 may further determine that the second service request does not reach each target server 130 according to the scheduling order indication information of the second service request reported by each target server 130. In addition, the decision server 140 may count the total scheduling number of each target server 130 and the total scheduling number corresponding to each client 110 according to the scheduling information of the scheduling server 120, and the decision server 140 may detect the service request achievement rate of each target server 130 according to the number of non-second service requests of each target server 130 and the total scheduling number corresponding to the target server 130, so that the decision server 140 may detect the service request achievement rate of each target server. Similarly, the decision server 140 may obtain the service request achievement rate corresponding to each client 110, and further determine whether to execute a corresponding scheduling decision on the target server 130 or the client 110.
Specifically, after the decision server 140 receives scheduling order indication information of the service requests that have not been reported by each target server 130 and scheduling information of each scheduling server, the following data is cached for each scheduling server 120:
<Dispatcher ID,Target ID>=><Seq ID,Last Seq,client IP list> (6)
the Seq ID and Last Seq may be directly assigned as the latest values synchronized from the respective scheduling servers, the Client IP List refers to an identification information List of the Client, and the Client IP List may add an incremental List synchronized from the scheduling servers.
As an embodiment, the scheduling order may be selected from a part of the identification information of the client. For example, the end item of the identification information of the client, so that the identification information of the corresponding client can be indexed by the scheduling order within a constant time complexity.
Since the target server 130 detects the scheduling order of the second service request and needs to rely on the scheduling order corresponding to the subsequently arrived first service request, the target server 130 cannot report the scheduling order information corresponding to the second service request in time, and at this time, it appears that the maximum scheduling order of the reached first service request reported by the target server 130 is not updated for a long time. To solve this problem, the decision server 140 in the embodiment of the present application maintains a second queue for different scheduling servers 120, where the second queue records the maximum scheduling order obtained from the scheduling server 120. The second queue may be a first-in-first-out queue.
Specifically, after the decision server 140 receives the scheduling order indication information of the second service request, it may index the second queue according to the Target ID of the Target server 130, detect whether the second queue is full, and if so, indicate that the preset time duration has been reached, confirm that the scheduling order before the element smaller than the head of the queue has been detected, so that the head of the queue element may be kicked out, and delete the identification information of the client associated with the element whose scheduling order is smaller than the head of the queue element.
Further, for each item in the report information reported by each Target server 130, the corresponding record in (6) above may be indexed by the Target ID and the Dispatcher ID corresponding to the service request that has not been reached, and if the Seq ID is different from the Seq ID of the corresponding record, the report item is ignored. And if the Seq ID is the same as the corresponding recorded Seq ID, counting the unreached service requests of the target server 130, indexing the corresponding Client IP from the Client IP List according to the scheduling order of the unreachable requests, and increasing the count of the unreached service requests of the Client IP.
As an embodiment, in order to reduce the amount of data stored by the decision server 140, the decision server 140 may delete the identification information of the client of the detected service request. But relates to how the decision server 140 determines which service requests have been detected to be fulfilled, the following example illustrates:
for the scheduling server 120, recording a maximum scheduling order Last Seq of the detected service request reaching request, recording the maximum scheduling order Last Seq as an initialized detected scheduling order Detect Seq, recording a scheduling order reached before T seconds as T Last Seq, where a value of the T Last Seq is a head element of the second queue in the foregoing text, and the decision server 140 executes the following codes at intervals of unit time:
Detect Seq=Max(Detect Seq,Max seq)
IF Detect Seq < T Last Seq: if the detected scheduling order of the current record is less than the head-of-line element of the second queue;
For seq in(Detect Seq,T last seq):
the scheduling order is smaller than the head-of-line elements of the second queue, the service requests corresponding to the missed scheduling order are regarded as missed service requests, and the number of the missed service requests is accumulated for the target servers and the clients corresponding to the missed service requests;
Detect Seq=T Last Seq。
the service requests with the scheduling order smaller than the tlast Seq are determined to have reached the detection, and the decision server 140 may delete the Client IP corresponding to the service requests from the Client IP List, so that the Client IP List of the decision server 140 may store the Client IP within the preset time at most, and the amount of data stored by the decision server 140 is reduced.
S316, the decision server 140 sends scheduling decisions to the respective scheduling servers 120.
When the service request achievement rate of a certain target server is less than or equal to the first threshold, it indicates that the service request achievement rate of the target server 130 is low, and therefore it may be determined that a target server scheduling forbidding decision is performed on the target server, and specifically, the target server scheduling forbidding decision is that the scheduling server 120 does not schedule the target server 130 any more.
Alternatively, when the total scheduling number of each target server 130 is not much different, the decision server 140 may determine to execute the target server scheduling disabling decision on the target servers 140 whose total number of second service requests exceeds a certain number directly according to the total number of second service requests of each target server 140.
Similarly, the decision server 140 may determine the service request achievement rate of each client, or may accumulate the total number of the missed service requests of the clients, and when the service request achievement rate of the client is less than or equal to the second threshold, or the total number of the missed service requests of the client exceeds a certain number, determine to execute the client scheduling forbidding decision on the target server. In a cut-through scheduling scenario, the client scheduling disabling decision may be that the scheduling server 120 no longer responds to the scheduling request of the client 110.
As an example, S308, S314, S316, and S317 discussed in fig. 3 are optional steps.
In the embodiment discussed in fig. 3, in the cut-through scheduling scenario, the target server 130 may determine scheduling order indication information corresponding to the second service request according to the scheduling order indication information in the received service request, so as to directly report the condition of the service request that is not reached to the decision server 140, thereby avoiding the decision server 140 from storing and searching a large number of logs, and improving the storage overhead and the search overhead of detecting the service request.
The following is an example presentation of the interaction between the various devices discussed in connection with FIG. 2B:
please refer to fig. 10, which is a schematic diagram illustrating interaction among the devices in fig. 2B.
S1001, the first client 111 sends a first scheduling request to the first scheduling server 121 through the access server 200.
Unlike the express dispatch scenario, in the 302 dispatch scenario, the client 110 does not interact directly with the dispatch server 10, but instead interacts with the dispatch server 120 through the access server 200. The first scheduling request may specifically be in a format and content of a Uniform Resource Locator (URL) request. Similarly, the first scheduling request is used to request the access server 200 to provide service for the first scheduling request. The first scheduling request carries identification information of the first client.
After receiving the first scheduling request, the access server 200 does not directly provide service to the first ue 111, but passes the first scheduling request through to the first scheduling server 121.
S1002, the first scheduling server 121 sends the first scheduling response to the first client 111 through the access server 200.
The first scheduling server 121 may allocate the first target server 131 allocated to the first client 111 according to the scheduling rule after receiving the first scheduling request. After the first scheduling server 121 determines the corresponding target server 130, the scheduling parameter corresponding to the first target server 131 may be generated, and the manner of generating the scheduling parameter and the content of the scheduling parameter may refer to the foregoing discussion, which is not described herein again. After generating the scheduling parameter corresponding to the first target server 131, the first scheduling server 121 generates a first scheduling response, where the first scheduling response carries the scheduling parameter and may further include a domain name address of the first target server 131. The first scheduling response may specifically be a 302 response carrying the scheduling parameter, and specifically may be a redirect URL response. The first scheduling server 121 sends the first scheduling response to the access server 200, and the access server 200 sends the first scheduling response to the first client 111.
S1003, the first client 111 sends the first service request to the first target server 131.
After receiving the first scheduling response, the first client 111 redirects to the first target server 131 according to the first scheduling response, that is, the first client 111 can directly redirect to the first target server 131 without analyzing the first scheduling response, that is, without improving the client 110, thereby reducing the application cost of the service request detection method according to the embodiment of the present application.
For example, the first service request example is as follows:
>GET/example.txt?example_args&arrive_key=1205406105
HTTP/1.1
>User-Agent:curl/7.29.0
>Accept:*/*
>Host:example.com。
the first service request in the above example comprises scheduling parameters, a URL request sent by the first client 111, etc.
After receiving the service request, the first target server 131 may obtain a corresponding scheduling parameter according to the service request.
S1004, the second client 112 transmits the second scheduling request to the first scheduling server 121 through the access server 200.
The relevant content of the second scheduling request may refer to the first scheduling request, which is not described herein again.
S1005, the first scheduling server 121 sends the second scheduling response to the second client 112 through the access server 200.
The second client 112 should normally send the service request to the first target server 131, but the second client 112 does not successfully send the service request to the first target server 131, possibly due to communication problems between the second client 112 and the first target server 131.
S1006, the first target server 131 determines scheduling order indication information of the second service request.
The content of the first target server 131 determining the scheduling order indication information of the second service request may refer to the content discussed above, and is not described herein again.
S1007, the first target server 131 sends the scheduling order indication information of the second service request to the decision server 140.
While sending the scheduling order indication information of the missed service request, the scheduling server 120 corresponding to the missed service request and the identification information of the first target server 131 may also be associated and sent to the decision server 140.
S1008, the first scheduling server 121 sends the scheduling information to the decision server 140.
The scheduling information and the manner of generating the scheduling information may refer to the foregoing discussion, and are not described herein again.
S1009, the third client 113 transmits the third scheduling request to the second scheduling server 122 through the access server 200.
The related content of the third scheduling request may refer to the first scheduling request, which is not described herein again.
S1010, the second scheduling server 122 sends the third scheduling response to the third client 113 through the access server 200.
S1011, the third client 113 sends the first service request to the second target server 132.
S1012, the second target server 132 determines scheduling order indication information of the second service request.
The content of the second target server 132 determining the scheduling order indication information of the second service request may refer to the content discussed above, and is not described herein again.
S1013, the second target server 132 sends the scheduling order indication information of the second service request to the decision server 140.
While the scheduling order indication information of the second service request is sent, the scheduling server 120 corresponding to the second service request and the identification information of the second target server 132 may also be sent to the decision server 140 in an associated manner.
S1014, the second scheduling server 122 sends the scheduling information to the decision server 140.
The scheduling information and the manner of generating the scheduling information may refer to the foregoing discussion, and are not described herein again.
S1015, the decision server 140 determines a corresponding scheduling decision.
The content of determining the scheduling decision can refer to the content discussed in the foregoing, and is not described in detail here. The scheduling decision includes one or a combination of a disabled schedule for client 110, a disabled schedule for target server 130. The disabled schedule for a client 110 may be to deny the corresponding client 110 or may instruct the schedule server 120 to be serviced by the access server 200 for the client 110.
S1016, the decision server 140 sends scheduling decisions to the respective scheduling servers 120.
As an example, S1008, S1014, S1016, and S1017 discussed in fig. 3 are optional steps.
Based on the same inventive concept, an embodiment of the present application provides a service request detection apparatus, which is equivalently disposed in the target server 130 discussed above, please refer to fig. 11, where the service request detection apparatus 1100 includes:
an obtaining module 1101, configured to obtain scheduling order indication information of each first service request from scheduling parameters carried in each first service request; the scheduling server is used for scheduling the target servers corresponding to the service requests according to the scheduling order indication information;
an obtaining module 1102, configured to obtain scheduling order indication information of the second service request according to the obtained scheduling order indication information; the second service request refers to an unattained service request;
a sending module 1103, configured to send the scheduling order indication information of the second service request to the decision server, so that the decision server determines, according to the scheduling order indication information of the second service request, the second service request that does not reach the target server.
In a possible embodiment, the obtaining module 1102 is specifically configured to:
buffering each first service request in a preset time length before the current time;
and determining scheduling order indication information corresponding to a second service request which exceeds the preset time length and is not reached according to the scheduling order indication information in each first service request in the preset time length.
In one possible embodiment, the target server caches an array and a first queue, the array includes multiple scheduling orders and a flag bit corresponding to each scheduling order, the flag bit is used for indicating whether a service request corresponding to the scheduling order reaches the target server, the first queue is used for caching the maximum set scheduling order written into the array in each unit time, and the time required for writing the first queue is preset time; and, the obtaining module 1102 is specifically configured to:
setting a flag bit of the scheduling order indicated by the first service request in the array according to the scheduling order indication information in each first service request;
writing the first queue according to the set maximum scheduling order in the array in unit time;
and if the first queue is determined to be full, moving the pointer to the head element of the first queue, detecting whether each scheduling sequence is set or not in the pointer moving process, and determining the scheduling sequence which is not set.
In a possible embodiment, the scheduling parameter of each first service request further carries identification information of a scheduling server, and the target server caches an array of each scheduling server; the obtaining module 1102 is specifically configured to:
setting the flag bit of the scheduling order indicated by the corresponding service request in the array according to the scheduling order indication information in each service request specifically includes:
determining a scheduling server corresponding to each first service request according to the identification information of the corresponding scheduling server in each first service request;
and setting the scheduling order in the array corresponding to each first service request according to the scheduling order indicated by each first service request.
Based on the same inventive concept, an embodiment of the present application provides a service request detection apparatus, which is equivalently disposed in the scheduling server discussed above, please refer to fig. 12, where the service request detection apparatus 1200 includes:
a receiving module 1201, configured to receive scheduling requests of each client respectively;
a determining module 1202, configured to determine a target server scheduled for each client;
an obtaining module 1203, configured to obtain scheduling parameters corresponding to each target server; each scheduling parameter comprises scheduling order indication information, and the scheduling order indication information is used for indicating the order of scheduling target servers by a scheduling server;
a sending module 1204, configured to send scheduling responses carrying the scheduling parameters of the corresponding target servers to the respective clients, so that the respective clients send service requests carrying the scheduling parameters to the corresponding target servers, so that the respective target servers respectively obtain scheduling order indication information of the second service requests according to the first service requests carrying the scheduling parameters, and respectively send the scheduling order indication information of the obtained second service requests to the decision server; the first service request refers to a service request received by the target server, and the second service request refers to a service request which does not reach the target server.
In a possible embodiment, the obtaining module 1203 obtains the scheduling parameter of any target server specifically by:
if the scheduling parameters of any target server are stored, updating scheduling order indication information in the stored scheduling parameters;
and if the scheduling parameter of any target server is not stored, generating a scheduling identifier for scheduling any target server, and generating the scheduling parameter of any target server according to the scheduling identifier and the initial scheduling order indication information.
In a possible embodiment, the sending module 1204 is further configured to:
and sending the scheduling information carrying the corresponding scheduling parameters of each target server to the decision server so that the decision server determines the service request achievement rate of each target server according to the scheduling information of each target server and the scheduling order indication information of the second service request of the corresponding target server.
Based on the same inventive concept, an embodiment of the present application provides a service request detection apparatus, which is equivalently disposed in the decision server discussed above, referring to fig. 13, where the service request detection apparatus 1300 includes:
a receiving module 1301, configured to receive scheduling order indication information of the second service request sent by each target server; the scheduling order indication information of the second service request of each target server is obtained according to the received scheduling parameters carried by the first service request of the client, the scheduling parameters carried by each first service request are obtained after the client receives the scheduling response sent by the corresponding scheduling server, each scheduling parameter comprises the scheduling order indication information corresponding to the service request, the scheduling order indication information is used for indicating the order of the scheduling server for scheduling the target server, and the second service request is the service request which does not reach the target server;
a determining module 1302, configured to determine, according to the scheduling order indication information of each second service request, a service request that does not reach each target server.
In a possible embodiment, the receiving module 1301 is further configured to receive scheduling information sent by each scheduling server; each piece of scheduling information comprises scheduling parameters of a corresponding target server;
the determining module 1302 is further configured to determine a service request achievement rate of each target server according to the scheduling parameter sent by each scheduling server and the second service request of each target server;
the determining module 1302 is further configured to determine a scheduling decision corresponding to each target server according to the service request achievement rate.
In a possible embodiment, each piece of scheduling information further includes identification information of a client corresponding to the scheduling parameter; the determining module 1302 is further configured to:
detecting a second service request associated with each client according to the identification information of each client;
determining the service request reaching rate of each client according to the second service request associated with each client and the scheduling parameters sent by each scheduling server;
and determining a scheduling decision corresponding to each client according to the service request reaching rate of each client.
In a possible embodiment, the decision server caches a second queue corresponding to each scheduling server, each second queue caches a maximum scheduling order indicated by a scheduling parameter obtained from the corresponding scheduling server in each unit time, and the time length for writing the second queue is a preset time length; and, the apparatus 1300 further comprises a write module 1303 and a delete module 1304, wherein:
a write-in module 1303, configured to perform write-in operation on the corresponding second queue according to the maximum scheduling order corresponding to the corresponding scheduling server obtained in the unit time;
a deleting module 1304, configured to delete, if it is determined that the second queue is full, the identification information of the client corresponding to the head-of-queue element whose scheduling order is smaller than that of the second queue.
Based on the same inventive concept, an embodiment of the present application provides a service request detection apparatus, which is equivalently disposed in the client terminal discussed above, referring to fig. 14, where the service request detection apparatus 1400 includes:
a sending module 1401, configured to send a scheduling request to a scheduling server;
a receiving module 1402, configured to receive a scheduling response sent by a scheduling server; the scheduling response carries address information of a target server scheduled for the client and scheduling parameters corresponding to the target server, wherein the scheduling parameters comprise scheduling order indication information, and the scheduling order indication information is used for indicating the order of the scheduling server for scheduling the target server at this time;
a sending module 1401, configured to send a service request carrying a scheduling parameter to a target server according to the address information, so that the target server generates scheduling order indication information of a second service request according to the scheduling parameter carried in the first service request, and sends the scheduling order indication information of the second service request to the decision server; the first service request refers to a service request received by the target server, and the second service request refers to a service request which does not reach the target server.
Based on the same inventive concept, the embodiment of the present application provides a service request detection system, which includes the respective devices in fig. 11 to fig. 13, and the system is equivalent to include the scheduling server 120, the target server 130, and the decision server 140 discussed above.
Based on the same inventive concept, the embodiment of the application also provides computer equipment. Referring to FIG. 15, a computing device 1500 is shown in the form of a general purpose computing device. Components of computer device 1500 may include, but are not limited to: at least one processor 1510, at least one memory 1520, and a bus 1530 that connects the various system components (including the processor 1510 and the memory 1520).
The memory 1520 may include readable media in the form of volatile memory, such as Random Access Memory (RAM)1521 and/or cache memory 1522, and may further include Read Only Memory (ROM) 1523. Memory 1520 may also include a program/utility 1526 having a set (at least one) of program modules 1525, such program modules 1525 including, but not limited to: an operating system, one or more application programs, other program modules, and program data, each of which, or some combination thereof, may comprise an implementation of a network environment. The processor 1510 is configured to execute program instructions and the like stored in the memory 1520 to implement any of the service request detection methods discussed above or to implement the functions of any of the devices in fig. 11-14.
The computer device 1500 may also communicate with one or more external devices 1540 (e.g., keyboard, pointing device, etc.), with one or more devices that enable the terminal to interact with the computer device 1500, and/or with any devices (e.g., router, modem, etc.) that enable the computer device 1500 to communicate with one or more other devices. Such communication may occur via input/output (I/O) interface 1550. Also, computer device 1500 may communicate with one or more networks (e.g., a Local Area Network (LAN), a Wide Area Network (WAN), and/or a public network, such as the internet) via network adapter 1560. As shown, the network adapter 1560 communicates with the other modules for the computer device 1500 over the bus 1530. It should be understood that although not shown in the figures, other hardware and/or software modules may be used in conjunction with computer device 1500, including but not limited to: microcode, device drivers, redundant processors, external disk drive arrays, RAID systems, tape drives, and data backup storage systems, among others.
Based on the same inventive concept, embodiments of the present application provide a storage medium storing computer instructions, which when executed on a computer, cause the computer to perform the service request detection method discussed above.
Based on the same inventive concept, the embodiments of the present application provide a computer program product, which includes computer instructions stored in a computer-readable storage medium. The processor of the computer device reads the computer instructions from the computer-readable storage medium, and executes the computer instructions, so that the computer device executes the service request detection method.
As will be appreciated by one skilled in the art, embodiments of the present application may be provided as a method, system, or computer program product. Accordingly, the present application may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present application may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.
It will be apparent to those skilled in the art that various changes and modifications may be made in the present application without departing from the spirit and scope of the application. Thus, if such modifications and variations of the present application fall within the scope of the claims of the present application and their equivalents, the present application is intended to include such modifications and variations as well.
Claims (14)
1. A service request detection method is applied to a target server, and the method comprises the following steps:
respectively acquiring scheduling order indication information of each first service request from scheduling parameters carried in each first service request; the scheduling server is used for scheduling the target servers corresponding to the service requests according to the scheduling order indication information;
acquiring scheduling order indication information of a second service request according to the acquired scheduling order indication information; the second service request refers to an unattained service request;
and sending the scheduling order indication information of the second service request to a decision server so that the decision server determines the second service request which does not reach the target server according to the scheduling order indication information of the second service request.
2. The method of claim 1, wherein the obtaining scheduling order indication information of the second service request according to the obtained scheduling order indication information comprises:
buffering each first service request in a preset time length before the current time;
and determining scheduling order indication information corresponding to a second service request which exceeds the preset time length and is not reached according to the scheduling order indication information in each first service request in the preset time length.
3. The method of claim 2, wherein the target server caches an array and a first queue, the array includes a plurality of scheduling orders, and a flag bit corresponding to each scheduling order is used to indicate whether service requests corresponding to the scheduling orders reach the target server, the first queue is used to cache the maximum scheduling order in which the array has been set in each unit time, and the time required for writing the first queue to the top is the preset time; and the number of the first and second groups,
the determining, according to the scheduling order indication information in each first service request of the preset duration, scheduling order indication information corresponding to a second service request that exceeds the preset duration and is not yet reached includes:
setting a flag bit of the scheduling order indicated by the first service request in the array according to the scheduling order indication information in each first service request;
performing write operation on the first queue according to the set maximum scheduling order in the array in unit time;
and if the first queue is determined to be full, moving the pointer to a head element of the first queue, detecting whether each scheduling sequence is set or not in the pointer moving process, and determining the unset scheduling sequence.
4. The method of claim 3, wherein the scheduling parameter of each first service request further carries identification information of a scheduling server, and the target server caches an array of each scheduling server;
the setting the flag bit of the scheduling order indicated by the first service request in the array according to the scheduling order indication information in each first service request includes:
determining a scheduling server corresponding to each first service request according to the identification information of the corresponding scheduling server in each first service request;
and setting the scheduling order in the array corresponding to each first service request according to the scheduling order indicated by each first service request.
5. A service request detection method is applied to a scheduling server, and the method comprises the following steps:
respectively receiving scheduling requests of all clients and determining a target server scheduled for all the clients;
obtaining scheduling parameters corresponding to each target server; each scheduling parameter comprises scheduling order indication information, and the scheduling order indication information is used for indicating the order of scheduling target servers by a scheduling server;
respectively sending scheduling responses carrying scheduling parameters of corresponding target servers to each client so that each client respectively sends service requests carrying the scheduling parameters to the corresponding target servers, so that each target server respectively obtains scheduling order indication information of second service requests according to a first service request carrying the scheduling parameters, and respectively sends the scheduling order indication information of the obtained second service requests to a decision server; the first service request refers to a service request received by the target server, and the second service request refers to a service request which does not reach the target server.
6. The method of claim 5, wherein the obtaining the scheduling parameter corresponding to each target server specifically includes obtaining the scheduling parameter of any target server by:
if the scheduling parameters of any target server are stored, updating scheduling order indication information in the stored scheduling parameters;
if the scheduling parameter of any target server is not stored, generating a scheduling identifier for scheduling any target server, and generating the scheduling parameter of any target server according to the scheduling identifier and the initial scheduling order indication information.
7. The method of claim 5 or 6, further comprising:
and sending the scheduling information carrying the corresponding scheduling parameters of each target server to a decision server so that the decision server determines the service request achievement rate of each target server according to the scheduling information of each target server and the scheduling order indication information of the second service request of the corresponding target server.
8. A service request detection method is applied to a decision server, and the method comprises the following steps:
receiving scheduling order indication information of second service requests sent by each target server; the scheduling order indication information of the second service request of each target server is obtained according to the received scheduling parameters carried by the first service request of the client, the scheduling parameters carried by each first service request are obtained after the client receives the scheduling response sent by the corresponding scheduling server, each scheduling parameter comprises the scheduling order indication information corresponding to the service request, the scheduling order indication information is used for indicating the order of the scheduling server for scheduling the target server, and the second service request is the service request which does not reach the target server;
and determining the service requests which do not reach the target servers according to the scheduling order indication information of the second service requests.
9. The method of claim 8, wherein the method further comprises:
receiving scheduling information sent by each scheduling server; each piece of scheduling information comprises scheduling parameters of a corresponding target server;
determining the service request achievement rate of each target server according to the scheduling parameters sent by each scheduling server and the second service request of each target server;
and determining a scheduling decision corresponding to each target server according to the service request reaching rate.
10. The method of claim 9, wherein each scheduling information further includes identification information of a client to which the scheduling parameter corresponds; and, the method further comprises:
detecting a second service request associated with each client according to the identification information of each client;
determining the service request reaching rate of each client according to the second service request associated with each client and the scheduling parameters sent by each scheduling server;
and determining a scheduling decision corresponding to each client according to the service request reaching rate of each client.
11. The method of claim 10, wherein the decision server caches a second queue corresponding to each scheduling server, each second queue caches a maximum scheduling order indicated by the scheduling parameter obtained from the corresponding scheduling server in each unit time, and a time period for which the second queue is filled is a preset time period; and, the method further comprises:
writing a second queue corresponding to the scheduling server according to the maximum scheduling order corresponding to each scheduling server obtained in unit time;
and if the second queue is determined to be full, deleting the identification information of the client corresponding to the queue head element of which the scheduling order is smaller than that of the second queue.
12. A service request detection method is applied to a client, and the method comprises the following steps:
sending a scheduling request to a scheduling server, and receiving a scheduling response sent by the scheduling server; the scheduling response carries address information of a target server scheduled for the client and scheduling parameters corresponding to the target server, wherein the scheduling parameters comprise scheduling order indication information, and the scheduling order indication information is used for indicating the order of the target server scheduled by the scheduling server this time;
sending a service request carrying the scheduling parameter to the target server according to the address information, so that the target server generates scheduling order indication information of a second service request according to the scheduling parameter carried in the first service request, and sends the scheduling order indication information of the second service request to a decision server; the first service request refers to a service request received by the target server, and the second service request refers to a service request which does not reach the target server.
13. A computer device, comprising:
at least one processor, and
a memory communicatively coupled to the at least one processor;
wherein the memory stores instructions executable by the at least one processor to implement the method of any one of claims 1-4, 5-7, 8-11 or 12 by executing the instructions stored by the memory.
14. A storage medium storing computer instructions which, when run on a computer, cause the computer to perform the method of any one of claims 1-4, 5-7, 8-11 or 12.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202010858849.8A CN112054923B (en) | 2020-08-24 | 2020-08-24 | Service request detection method, equipment and medium |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202010858849.8A CN112054923B (en) | 2020-08-24 | 2020-08-24 | Service request detection method, equipment and medium |
Publications (2)
Publication Number | Publication Date |
---|---|
CN112054923A true CN112054923A (en) | 2020-12-08 |
CN112054923B CN112054923B (en) | 2023-08-18 |
Family
ID=73599355
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202010858849.8A Active CN112054923B (en) | 2020-08-24 | 2020-08-24 | Service request detection method, equipment and medium |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN112054923B (en) |
Cited By (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN112615912A (en) * | 2020-12-11 | 2021-04-06 | 中国建设银行股份有限公司 | Node scheduling processing method and device and storage medium |
CN115107042A (en) * | 2022-08-31 | 2022-09-27 | 上海擎朗智能科技有限公司 | Robot scheduling identifier resetting method, device, equipment and storage medium |
CN117149836A (en) * | 2023-10-27 | 2023-12-01 | 联通在线信息科技有限公司 | Cache processing method and device |
Citations (19)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US5613155A (en) * | 1995-06-07 | 1997-03-18 | International Business Machines Corporation | Bundling client write requests in a server |
CN101494579A (en) * | 2008-01-22 | 2009-07-29 | 中兴通讯股份有限公司 | Bus scheduling device and method |
US20120066685A1 (en) * | 2009-06-03 | 2012-03-15 | Hewlett-Packard Development Company, L.P. | Scheduling realtime information storage system access requests |
CN102546267A (en) * | 2012-03-26 | 2012-07-04 | 杭州华三通信技术有限公司 | Automatic configuration method of network device and management server |
JP2013003598A (en) * | 2011-06-10 | 2013-01-07 | Fujitsu Ltd | Request processing program, request processing method and information processing device |
US20140269530A1 (en) * | 2013-03-14 | 2014-09-18 | Cavium, Inc. | Apparatus and Method for Media Access Control Scheduling with a Priority Calculation Hardware Coprocessor |
CN104301140A (en) * | 2014-10-08 | 2015-01-21 | 广州华多网络科技有限公司 | Service request responding method, device and system |
CN105490841A (en) * | 2015-11-26 | 2016-04-13 | 广州华多网络科技有限公司 | Terminal log grasping method, device and system |
CN105550051A (en) * | 2015-12-25 | 2016-05-04 | 北京奇虎科技有限公司 | Asynchronous processing method and device of business request |
CN106603723A (en) * | 2017-01-20 | 2017-04-26 | 腾讯科技(深圳)有限公司 | Request message processing method and device |
CN107317763A (en) * | 2017-06-30 | 2017-11-03 | 郑州云海信息技术有限公司 | Flow control method and device between a kind of client and meta data server |
CN107426302A (en) * | 2017-06-26 | 2017-12-01 | 腾讯科技(深圳)有限公司 | Access scheduling method, apparatus, system, terminal, server and storage medium |
CN107885594A (en) * | 2016-09-30 | 2018-04-06 | 腾讯科技(深圳)有限公司 | Distributed resource scheduling method, scheduling node and access node |
US20190320446A1 (en) * | 2017-01-05 | 2019-10-17 | Motorola Mobility Llc | Scheduling request indication |
CN110365796A (en) * | 2019-08-01 | 2019-10-22 | 腾讯科技(深圳)有限公司 | Service request processing method, device |
CN110362275A (en) * | 2019-07-10 | 2019-10-22 | 深圳大普微电子科技有限公司 | Promote the method and solid state hard disk of solid state hard disk service quality |
CN110381162A (en) * | 2019-07-29 | 2019-10-25 | 腾讯科技(深圳)有限公司 | A kind of method and relevant apparatus of business processing |
KR20190128368A (en) * | 2018-05-08 | 2019-11-18 | 주식회사 애포샤 | Method for handling request in an asynchronous server |
US20200042199A1 (en) * | 2018-08-06 | 2020-02-06 | Datera, Incorporated | Future write in distributed system maintaining data storage integrity |
-
2020
- 2020-08-24 CN CN202010858849.8A patent/CN112054923B/en active Active
Patent Citations (19)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US5613155A (en) * | 1995-06-07 | 1997-03-18 | International Business Machines Corporation | Bundling client write requests in a server |
CN101494579A (en) * | 2008-01-22 | 2009-07-29 | 中兴通讯股份有限公司 | Bus scheduling device and method |
US20120066685A1 (en) * | 2009-06-03 | 2012-03-15 | Hewlett-Packard Development Company, L.P. | Scheduling realtime information storage system access requests |
JP2013003598A (en) * | 2011-06-10 | 2013-01-07 | Fujitsu Ltd | Request processing program, request processing method and information processing device |
CN102546267A (en) * | 2012-03-26 | 2012-07-04 | 杭州华三通信技术有限公司 | Automatic configuration method of network device and management server |
US20140269530A1 (en) * | 2013-03-14 | 2014-09-18 | Cavium, Inc. | Apparatus and Method for Media Access Control Scheduling with a Priority Calculation Hardware Coprocessor |
CN104301140A (en) * | 2014-10-08 | 2015-01-21 | 广州华多网络科技有限公司 | Service request responding method, device and system |
CN105490841A (en) * | 2015-11-26 | 2016-04-13 | 广州华多网络科技有限公司 | Terminal log grasping method, device and system |
CN105550051A (en) * | 2015-12-25 | 2016-05-04 | 北京奇虎科技有限公司 | Asynchronous processing method and device of business request |
CN107885594A (en) * | 2016-09-30 | 2018-04-06 | 腾讯科技(深圳)有限公司 | Distributed resource scheduling method, scheduling node and access node |
US20190320446A1 (en) * | 2017-01-05 | 2019-10-17 | Motorola Mobility Llc | Scheduling request indication |
CN106603723A (en) * | 2017-01-20 | 2017-04-26 | 腾讯科技(深圳)有限公司 | Request message processing method and device |
CN107426302A (en) * | 2017-06-26 | 2017-12-01 | 腾讯科技(深圳)有限公司 | Access scheduling method, apparatus, system, terminal, server and storage medium |
CN107317763A (en) * | 2017-06-30 | 2017-11-03 | 郑州云海信息技术有限公司 | Flow control method and device between a kind of client and meta data server |
KR20190128368A (en) * | 2018-05-08 | 2019-11-18 | 주식회사 애포샤 | Method for handling request in an asynchronous server |
US20200042199A1 (en) * | 2018-08-06 | 2020-02-06 | Datera, Incorporated | Future write in distributed system maintaining data storage integrity |
CN110362275A (en) * | 2019-07-10 | 2019-10-22 | 深圳大普微电子科技有限公司 | Promote the method and solid state hard disk of solid state hard disk service quality |
CN110381162A (en) * | 2019-07-29 | 2019-10-25 | 腾讯科技(深圳)有限公司 | A kind of method and relevant apparatus of business processing |
CN110365796A (en) * | 2019-08-01 | 2019-10-22 | 腾讯科技(深圳)有限公司 | Service request processing method, device |
Non-Patent Citations (1)
Title |
---|
庄一嵘;梁丹华;陈戈;周晓燕;: "TMS地域调度***设计与实现", 广东通信技术, no. 05 * |
Cited By (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN112615912A (en) * | 2020-12-11 | 2021-04-06 | 中国建设银行股份有限公司 | Node scheduling processing method and device and storage medium |
CN112615912B (en) * | 2020-12-11 | 2022-07-12 | 中国建设银行股份有限公司 | Node scheduling processing method and device and storage medium |
CN115107042A (en) * | 2022-08-31 | 2022-09-27 | 上海擎朗智能科技有限公司 | Robot scheduling identifier resetting method, device, equipment and storage medium |
CN117149836A (en) * | 2023-10-27 | 2023-12-01 | 联通在线信息科技有限公司 | Cache processing method and device |
CN117149836B (en) * | 2023-10-27 | 2024-02-27 | 联通在线信息科技有限公司 | Cache processing method and device |
Also Published As
Publication number | Publication date |
---|---|
CN112054923B (en) | 2023-08-18 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN112054923B (en) | Service request detection method, equipment and medium | |
US8745262B2 (en) | Adaptive network content delivery system | |
EP2359536B1 (en) | Adaptive network content delivery system | |
US9774564B2 (en) | File processing method, system and server-clustered system for cloud storage | |
US8612668B2 (en) | Storage optimization system based on object size | |
US20150237113A1 (en) | Method and system for file transmission | |
US7860993B2 (en) | Streaming media content delivery system and method for delivering streaming content | |
US9858124B1 (en) | Dynamic management of data stream processing | |
CN107451853B (en) | Method, device and system for real-time red packet distribution and storage medium | |
US11076181B2 (en) | Systems and methods for resolving manifest file discontinuities | |
CN100346324C (en) | Analysis method for user's request | |
CN107092686B (en) | File management method and device based on cloud storage platform | |
US20200044994A1 (en) | Data storage systems and methods using a real-time messaging system | |
US20180248977A1 (en) | Selective distribution of messages in a publish-subscribe system | |
CN110837423A (en) | Method and device for automatically acquiring data of guided transport vehicle | |
CN112256676A (en) | Method, device, equipment and medium for migrating database | |
US9137780B1 (en) | Synchronizing multicast data distribution on a computing device | |
KR100671635B1 (en) | Service management using multiple service location managers | |
CN114567674B (en) | Data processing method, device, computer equipment and readable storage medium | |
WO2021151294A1 (en) | Document transcoding method and apparatus, and scheduling server and storage medium | |
US11080239B2 (en) | Key value store using generation markers | |
CN113422808B (en) | Internet of things platform HTTP information pushing method, system, device and medium | |
CN111225003B (en) | NFS node configuration method and device | |
CN110798495B (en) | Method and server for end-to-end message push in cluster architecture mode | |
CN113867946A (en) | Method, device, storage medium and electronic equipment for accessing resources |
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 |