CN116112437A - Traffic scheduling method and device, electronic equipment and medium - Google Patents

Traffic scheduling method and device, electronic equipment and medium Download PDF

Info

Publication number
CN116112437A
CN116112437A CN202310119208.4A CN202310119208A CN116112437A CN 116112437 A CN116112437 A CN 116112437A CN 202310119208 A CN202310119208 A CN 202310119208A CN 116112437 A CN116112437 A CN 116112437A
Authority
CN
China
Prior art keywords
machine room
domain name
main machine
request
standby
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202310119208.4A
Other languages
Chinese (zh)
Inventor
黄勇
王辉
张纪金
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Baidu Netcom Science and Technology Co Ltd
Original Assignee
Beijing Baidu Netcom Science and Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing Baidu Netcom Science and Technology Co Ltd filed Critical Beijing Baidu Netcom Science and Technology Co Ltd
Priority to CN202310119208.4A priority Critical patent/CN116112437A/en
Publication of CN116112437A publication Critical patent/CN116112437A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L47/00Traffic control in data switching networks
    • H04L47/10Flow control; Congestion control
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L1/00Arrangements for detecting or preventing errors in the information received
    • H04L1/22Arrangements for detecting or preventing errors in the information received using redundant apparatus to increase reliability

Landscapes

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

Abstract

The disclosure provides a flow scheduling method, a flow scheduling device, electronic equipment and a flow scheduling medium, relates to the technical field of artificial intelligence, in particular to the field of cloud computing, and is suitable for service disaster recovery scenes. The flow scheduling method is executed by a standby machine room in a cloud platform, wherein the cloud platform comprises a domain name system, a main machine room and the standby machine room; the method comprises the following steps: acquiring a first request to be processed from the domain name system; the first request is obtained by rewriting a second request through the domain name system under the condition that the input port of the main machine room has network abnormality; and sending the first request to the main machine room through a data channel between the standby machine room and the main machine room, and processing the first request by the main machine room to obtain a processing result. The method and the device can improve the usability of the business service and reduce the disaster recovery cost of the business service.

Description

Traffic scheduling method and device, electronic equipment and medium
Technical Field
The present disclosure relates to the field of artificial intelligence, and in particular, to the field of cloud computing.
Background
The cloud computing platform such as the cloud mobile phone PaaS (Platform as a Service) platform can externally provide service services such as task execution, control and scheduling of the cloud mobile phone. The cloud computing platform comprises dozens of hundreds of machine rooms distributed in each region, business services are generally deployed in the main machine room, the business services are vital in the whole cloud computing platform, and once the network of the main machine room fails, the whole cloud computing platform cannot provide business access to the outside.
Disclosure of Invention
The disclosure provides a traffic scheduling method, a traffic scheduling device, electronic equipment and a medium.
According to an aspect of the present disclosure, there is provided a traffic scheduling method performed by a backup machine room in a cloud platform, the cloud platform including a domain name system, a main machine room, and a backup machine room; the method comprises the following steps:
acquiring a first request to be processed from the domain name system; the first request is obtained by rewriting a second request through the domain name system under the condition that the input port of the main machine room has network abnormality;
and sending the first request to the main machine room through a data channel between the standby machine room and the main machine room, and processing the first request by the main machine room to obtain a processing result.
According to another aspect of the disclosure, there is provided a traffic scheduling device configured in a backup machine room in a cloud platform, the cloud platform including a domain name system, a primary machine room, and a backup machine room; the device comprises:
the request acquisition module is used for acquiring a first request to be processed from the domain name system; the first request is obtained by rewriting a second request through the domain name system under the condition that the input port of the main machine room has network abnormality;
And the request sending module is used for sending the first request to the main machine room through a data channel between the standby machine room and the main machine room, and the main machine room processes the first request to obtain a processing result.
According to another aspect of the present disclosure, there is provided an electronic 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 to enable the at least one processor to perform the traffic scheduling method of any one of the embodiments of the present disclosure.
According to another aspect of the present disclosure, there is provided a non-transitory computer-readable storage medium storing computer instructions for causing a computer to perform the traffic scheduling method according to any one of the embodiments of the present disclosure.
According to another aspect of the present disclosure, there is provided a computer program product comprising a computer program which, when executed by a processor, implements the traffic scheduling method according to any of the embodiments of the present disclosure.
According to the technology disclosed by the invention, the availability of business service can be improved, and meanwhile, the disaster recovery cost of the business service can be reduced.
It should be understood that the description in this section is not intended to identify key or critical features of the embodiments of the disclosure, nor is it intended to be used to limit the scope of the disclosure. Other features of the present disclosure will become apparent from the following specification.
Drawings
The drawings are for a better understanding of the present solution and are not to be construed as limiting the present disclosure. Wherein:
fig. 1 is a flowchart of a flow scheduling method provided according to an embodiment of the present disclosure;
FIG. 2 is a flow chart of another method of traffic scheduling provided in accordance with an embodiment of the present disclosure;
FIG. 3A is a flow chart of another method of traffic scheduling provided in accordance with an embodiment of the present disclosure;
FIG. 3B is a schematic diagram of a cloud computing platform provided according to an embodiment of the present disclosure;
fig. 4 is a schematic structural diagram of a flow scheduling device according to an embodiment of the present disclosure;
fig. 5 is a block diagram of an electronic device used to implement a traffic scheduling method of an embodiment of the present disclosure.
Detailed Description
Exemplary embodiments of the present disclosure are described below in conjunction with the accompanying drawings, which include various details of the embodiments of the present disclosure to facilitate understanding, and should be considered as merely exemplary. Accordingly, one of ordinary skill in the art will recognize that various changes and modifications of the embodiments described herein can be made without departing from the scope and spirit of the present disclosure. Also, descriptions of well-known functions and constructions are omitted in the following description for clarity and conciseness.
Fig. 1 is a flowchart of a flow scheduling method according to an embodiment of the present disclosure, where the embodiment of the present disclosure is applicable to a case where an input port of a main machine room has a network abnormality. The method can be executed by a flow dispatching device, and the device can be realized in a software and/or hardware mode and is configured in a standby machine room of the cloud computing platform. As shown in fig. 1, the traffic scheduling method of the present embodiment may include:
s101, acquiring a first request to be processed from the domain name system; the first request is obtained by rewriting a second request through the domain name system under the condition that the input port of the main machine room has network abnormality;
s102, the first request is sent to the main machine room through a data channel between the standby machine room and the main machine room, and the main machine room processes the first request to obtain a processing result.
The service is deployed in the main machine room, and optionally, the service comprises a scheduling service and a micro service. The scheduling service is used for scheduling the access traffic, scheduling the access traffic to other machine rooms, and processing the access traffic by the other machine rooms based on the micro-services deployed in the main machine room. The micro-service is used for supporting the cloud computing platform to externally provide services such as resource management, application management, operation and maintenance management, access management and the like.
The other machine rooms refer to machine rooms except the main machine room in the cloud computing platform. Optionally, in all the rooms included in the cloud computing platform, the business service is only deployed in the main room, and the business service is not deployed in other rooms.
And in the cloud computing platform, other machine rooms in the cloud computing platform are in communication connection with the main machine room through an internal interface. The other machine rooms access the main machine room through an internal interface (private API) configured in the main machine room, and access business services deployed in the main machine room. Optionally, the other room invokes the internal interface in http (Hyper Text Transfer Protocol ) manner.
Optionally, other machine rooms with data channels between the main machine room and the standby machine room are standby machine rooms, the number of the standby machine rooms is at least one, the specific number of the standby machine rooms is not limited herein, the specific number of the standby machine rooms is determined according to actual situations, and a plurality of standby machine rooms can be set in the cloud computing platform under the condition that communication cost is not considered.
The main machine room is provided with an input port, and the input port of the main machine room refers to a network inlet of the main machine room. The access flow obtained from the outside can be input into the main machine room through the input port of the main machine room, and service access is provided for the outside through the main machine room. And in the cloud computing platform, the standby machine room and the main machine room perform data interaction based on the data channel. The data channel between the standby machine room and the main machine room is a special channel between the standby machine room and the main machine room. The data channel is independent of the input port of the main machine room, and whether the data channel is available is independent of the availability of the input port of the main machine room. Under the condition that the input interface of the main machine room is abnormal, the standby machine room can send a first request to the main machine room through the data channel.
The first request is obtained by rewriting the second request through a domain name system when the network abnormality exists in the input port of the main machine room. Optionally, the domain name system rewrites the domain name to which the second request is directed. If the input port of the main machine room has no network abnormality, the domain name system does not need to rewrite the second request, and the second request is directly sent to the main machine room through the domain name system.
The first request and the second request belong to access requests which are generated by a user end and are used for requesting the cloud computing platform to provide business services. The first request is different from the domain name to which the second request is directed, specifically, the first request is directed to the domain name of the standby machine room, and the second request is directed to the domain name of the main machine room. The first request is sent to the main machine room through the standby machine room, and the second request is sent to the main machine room through the domain name system.
It will be appreciated that in the event of an abnormality in the input interface of the main machine room, the second request directed to the main machine room cannot be input to the main machine room through the input interface. And rewriting the domain name pointed by the second request through a domain name system to obtain a first request, so that the first request is pointed to the standby machine room.
Optionally, the standby machine room is also provided with an input interface. The domain name system sends a first request to the standby machine room through an input interface of the standby machine room, the standby machine room sends the first request to the main machine room through a data channel between the standby machine room and the main machine room, and the main machine room processes the first request to obtain a processing result. The method is equivalent to that the scheduling service deployed in the main machine room is called through the standby machine room to schedule the first request, and the micro service deployed in the main machine room is utilized to provide matched business service for the first request. It is noted that only the input port in the main machine room has network abnormality, and the business services such as dispatch service and micro service deployed in the main machine room have no abnormality.
In an alternative embodiment, the data path is obtained by creating a peer-to-peer connection between the primary and backup rooms.
Wherein, the peer-to-peer connection refers to a network connection between two virtual private clouds (VPC, virtualPrivate Cloud), and when two parties of the peer-to-peer connection perform data communication, the two parties do not distinguish which party is a service request party and which party is a service provider. By creating a peer-to-peer connection between the primary and backup rooms, a data path between the two can be obtained. It will be appreciated that the data channel between the backup room and the primary room may be created in other ways, and is not limited to the peer-to-peer connection, and is not limited herein, and is specifically determined according to actual service requirements. It is noted that no matter how the data channel is created, in case of an abnormality in the input interface of the main machine room, the availability of the data channel needs to be ensured. The technical scheme provides a feasible data channel creation scheme, so that the standby machine room can call the service deployed in the main machine room under the condition that the network abnormality exists in the input port of the main machine room, and technical support is provided for ensuring the availability of the service in the cloud computing platform.
The embodiment of the disclosure provides a service disaster recovery scheme, by setting a data channel between a standby machine room and a main machine room, under the condition that an input port of the main machine room is abnormal in network, the standby machine room can acquire a first request to be processed from a domain name system through the data channel, the first request is sent to the main machine room, and the main machine room processes the first request to obtain a processing result, so that the availability of service in a cloud computing platform is improved.
FIG. 2 is a flow chart of another method of traffic scheduling provided in accordance with an embodiment of the present disclosure; this embodiment is an alternative to the embodiments described above. In particular, embodiments of the present disclosure refine how the first request is generated.
Referring to fig. 2, the flow scheduling method provided in this embodiment includes:
s201, when the domain name system detects that the network abnormality exists in the input port of the main machine room, the domain name system acquires the alias record of the main machine room.
The domain name system detects the network state of the input port of the main machine room, and if the domain name system detects that the input port of the main machine room has network abnormality, the domain name system acquires the alias record of the main machine room.
Among other things, alias records (CNAMEs) allow mapping multiple names to the same server IP. In the case where multiple domain names point to the same server IP, one domain name may be referred to as an a record to that server IP, and then the other domain names may be referred to as aliases (i.e., CNAMEs) to the domain names of the a records. When the server IP address is changed, the domain name pointing need not be changed one by one, only the domain name recorded by A needs to be changed to the new IP of the server, and the domain names which are aliased (i.e. CNAME) automatically point to the new IP address.
And S202, modifying the alias records based on the standby domain name of the standby machine room through the domain name system to rewrite the domain name pointed by the second request to obtain the first request.
The main machine room is used as a key machine room for traffic scheduling, and the second request in the cloud computing platform is input into the main machine room preferentially and then is scheduled to other machine rooms through scheduling services deployed in the main machine room. That is, the second request is directed generally to the primary domain name. The main domain name refers to a domain name of a main machine room. The domain name system modifies the alias records based on the backup domain name of the backup machine room, which refers to the domain name of the backup machine room. Specifically, the domain name system modifies the a record associated with the alias record based on the backup domain name of the backup machine room. The domain name to which the second request is directed is modified from the primary domain name to the backup domain name.
The first request may be obtained by modifying the domain name to which the second request is directed by the domain name system. The second request and the first request are only directed to domain names that are different. The second request is directed to the primary domain name and the first request is directed to the backup domain name. The first request is input into the standby machine room through an input port of the standby machine room, the first request is sent to the main machine room through the standby machine room, and the main machine room processes the first request to obtain a processing result.
According to the method and the device for processing the first request, when the network abnormality of the input port of the main machine room is detected through the domain name system, the alias record of the main machine room is obtained through the domain name system, the alias record is modified through the domain name system based on the standby domain name of the standby machine room, the domain name pointed by the second request is rewritten to obtain the first request, the first request can be obtained by the standby machine room, the first request is sent to the main machine room through the standby machine room, and then the first request is processed through the main machine room. According to the method and the device for the domain name resolution, the domain name pointed by the second request is rewritten by modifying the alias record, so that the domain name resolution efficiency is improved, the domain name resolution time is shortened, and the influence of primary-standby switching on business services is reduced.
In an alternative embodiment, the method further comprises: checking the network states of the main machine room and at least two candidate machine rooms through the domain name system; if the domain name system detects that the input port of the main machine room has network abnormality, a standby machine room is selected from the candidate machine rooms based on the detection result of the candidate machine rooms through the domain name system, and the standby domain name of the standby machine room is determined.
The candidate machine room and the main machine room are in communication connection through a data channel, and the standby machine room is generated in the candidate machine room. And checking the network states of the main machine room and at least two candidate machine rooms through a domain name system, and checking whether network abnormality exists in input ports of the main machine room and the standby machine room or not to obtain a checking result of the main machine room and a checking result of the standby machine room. Wherein the inspection results include an input port network anomaly and an input port network anomaly.
If the inspection result of the main machine room is that the input port network is abnormal, selecting a standby machine room from the candidate machine rooms through a domain name system based on the inspection result of the standby machine room, specifically, selecting the candidate machine room with the inspection result of the input port network being normal from the candidate machine rooms as the standby machine room through the domain name system, so that the cloud computing platform can provide external service.
According to the technical scheme, the network states of the main machine room and at least two candidate machine rooms are checked through the domain name system, the standby machine room can be selected under the condition that the network abnormality of the input port of the main machine room is detected, and the service deployed in the main machine room is called through the standby machine room, so that the fault tolerance and the stability of the cloud computing platform are improved.
FIG. 3A is a flow chart of another method of traffic scheduling provided in accordance with an embodiment of the present disclosure; this embodiment is an alternative to the embodiments described above. Specifically, the implementation of the present disclosure is applicable to a situation that an output port of a main machine room has network abnormality. Referring to fig. 3A, the flow scheduling method provided in this embodiment includes:
s301, under the condition that the output port of the main machine room is abnormal in network, the processing result is obtained from the main machine room through a data channel between the standby machine room and the main machine room.
The output port is configured in the main machine room, and the main machine room can call the callback micro-service to feed back the processing result based on the output port. And processing the second request through the main machine room to obtain a processing result. Once the output port of the main machine room has network abnormality, the main machine room cannot feed back the processing result, and the cloud computing platform is influenced to provide business services to the outside.
And under the condition that the output port of the main machine room is abnormal in network, the standby machine room obtains a processing result from the main machine room through a data channel between the standby machine room and the main machine room.
S302, feeding back the processing result through the callback micro-service deployed in the standby machine room.
Callback micro-services are deployed in the standby machine room and the main machine room, and are used for calling a user interface, and processing results are fed back to the user end through the user interface. Optionally, the callback micro-service is deployed in an HA mode on the basis of the main machine room and the standby machine room which are in communication connection with the data channel. The HA is a Highly Available abbreviation, is a double-computer cluster system abbreviation, and is an effective solution for ensuring service continuity.
Under the condition that the network abnormality exists in the input interface of the main machine room, the callback micro-service deployed in the main machine room cannot be called, the standby machine room obtains the processing result from the main machine room through the data channel, and the processing result is fed back through the callback micro-service deployed in the standby machine room.
According to the technical scheme, when the network abnormality exists in the output port of the main machine room, and the processing result cannot be fed back through the callback micro-service deployed in the main machine room, the processing result obtained from the main machine room is fed back to the user side through the callback micro-service deployed in the standby machine room, and the availability of business service in the cloud computing platform is improved.
In an optional embodiment, feeding back the processing result through a callback micro service deployed in the standby machine room includes: the processing result is also associated with a target micro-service; the target micro-service is obtained by selecting from candidate micro-services deployed in a main machine room; determining a target callback interface associated with the target micro-service based on an association relationship between the candidate micro-service and the candidate callback interface in the callback micro-service; and feeding back the processing result through the target callback interface.
The processing result is obtained by processing the access request through the main machine room, and the processing result needs to be fed back. The micro-services are used for supporting the cloud computing platform to provide business services to the outside, the different micro-services have different business functions, and the micro-services can be distinguished based on the business functions. Illustratively, micro service 1, micro service 2, and micro service 3 may be used for resource management, application management, and operation and maintenance management, respectively. And the main machine room responds to the access request, determines a target micro-service for processing the access request from the candidate micro-services, and processes the access request based on the target micro-service to obtain a processing result. Wherein the access request may be a first request or a second request. Under the condition that the input interface of the main machine room has network abnormality, the access request is a first request; and under the condition that the input interface of the main machine room has no network abnormality, the access request is a second request.
The processing result is associated with the target micro-service, in the embodiment of the present disclosure, the candidate callback interface in the callback micro-service is split according to the architecture of the candidate micro-service, so as to obtain an association relationship between the candidate micro-service and the candidate callback interface in the callback micro-service, the target callback interface associated with the target micro-service is determined based on the association relationship between the candidate micro-service and the candidate callback interface, and the processing result is fed back through the target callback interface. Optionally, the target callback interface is invoked in a manner of rpc (Remote Procedure Call ).
According to the technical scheme, the target callback interfaces associated with the target micro service are determined based on the association relation between the candidate micro service and the candidate callback interfaces in the callback micro service, and the processing result is fed back through the target callback interfaces, so that the coupling between the candidate callback interfaces in the callback micro service is reduced, and the fault tolerance capability of the cloud computing platform is improved.
Fig. 3B is a schematic structural diagram of a cloud computing platform provided according to an embodiment of the present disclosure, referring to fig. 3B, the cloud computing platform includes a domain name system, a primary machine room, and a backup machine room. The domain name system is respectively in communication connection with the main machine room and the standby machine room. The domain name system is used for checking the network states of the main machine room and the standby machine room; optionally, the domain name system checks the input interfaces of the main machine room and the standby machine room to check whether the input interfaces have network anomalies. Domain name systems are also used to distribute traffic to the primary and backup rooms. In the process of traffic distribution of the domain name system, the main machine room has a first priority, and the standby machine room has a second priority, wherein the first priority is higher than the second priority. Specifically, under the condition that an input interface of the main machine room is free from network abnormality, the flow is preferentially distributed to the main machine room; and distributing the flow to the standby machine room only when the network abnormality exists in the input interface of the main machine room.
And under the condition that the domain name system detects that the input port of the main machine room has network abnormality, acquiring the alias record of the main machine room. Optionally, the domain name system includes a user domain name system, an authoritative domain name system, and a dispatch domain name system. And the user domain name system responds to the access request sent by the user terminal, and obtains the alias record of the main machine room from the authority domain name system. And the user domain name system sends the obtained alias records belonging to the main machine room to the dispatching domain name system. The dispatch domain name system modifies the alias record based on the backup domain name of the backup machine room to rewrite the domain name to which the second request is directed to obtain the first request. Wherein the second request is directed to the primary domain name and the first request is directed to the backup domain name. And sending the first request to the main machine room through the standby machine room, wherein the main machine room and the standby machine room are in communication connection based on the data channel.
The second request is example. Com, the second request points to 10.0.0.1, and the user domain name system feeds back 10.0.0.1 to the user side in case that the input interface of the main machine room has no network abnormality; under the condition that the input interface of the main machine room has network abnormality, the user domain name system obtains an alias record such as cname. Example. Com of the main machine room from the authority domain name system, and sends the obtained alias record to the dispatching domain name system, and the dispatching domain name system modifies the domain name direction of the second request based on the alias record to obtain a first request, so that the first request is directed to 20.0.0.1, wherein 10.0.0.1 corresponds to the main machine room, and 20.0.0.1 corresponds to the standby machine room.
Business services are deployed in the main machine room, wherein the business services comprise dispatch services and micro-services. The scheduling service is used for carrying out centralized scheduling on the access requests and scheduling the access requests to other machine rooms. Wherein the access request may be a first request or a second request. The other machine rooms refer to machine rooms except the main machine room in the cloud computing platform. The machine room services are deployed in other machine rooms, and long connection can be adopted for communication between the machine room services with interaction requirements. The machine room service is used for issuing synchronous tasks or asynchronous tasks to the ARM equipment, and the ARM equipment executes the synchronous tasks or the asynchronous tasks and returns or reports processing results. In general, a large number of ARM devices are deployed in each machine room of the cloud computing platform, and tens of ARM devices are fewer and tens of ARM devices are more than ten thousands of ARM devices. Other machine rooms in the cloud computing platform are accessed into the main machine room based on an internal interface (Private API) configured in the main machine room, and micro services deployed in the main machine room are called, so that data interaction is carried out on each machine room in the cloud computing platform. Optionally, the other machine rooms call the micro service deployed in the main machine room in an http manner based on the internal interface.
The main machine room is also provided with a public interface (Open API) so that an external user can access the main machine room and call the micro-service deployed in the main machine room. Alternatively, an external user may invoke the micro-service deployed in the host room in rpc based on the common interface.
Optionally, the microservices deployed in the main machine room have association relations with the internal interfaces and the public interfaces respectively, and the internal interfaces and the public interfaces can be split based on the association relations to obtain internal interface packets (Private API packets) and public interface packets (Open API packets). Before an external user and/or other machine rooms call the micro-service deployed in the main machine room, registering the micro-service deployed in the main machine room, and an internal interface group and a public interface group corresponding to the micro-service to a registration center in the main machine room.
Optionally, callback micro-services are deployed in the main machine room and the standby machine room, output interfaces are configured in the main machine room and the standby machine room, and the callback micro-services can be called to feed back processing results based on the output interfaces. Under the condition that the network abnormality exists in the input interface of the main machine room, the callback micro-service deployed in the main machine room cannot be called, the standby machine room obtains the processing result from the main machine room through the data channel, and the processing result is fed back through the callback micro-service deployed in the standby machine room. Optionally, load balancing is further deployed in the main machine room and the standby machine room to balance flow so as to achieve high service availability.
The service disaster recovery scheme provided by the related art for the cloud computing platform generally comprises the following two types: 1. business service master and slave deployment: and a set of complete business service is deployed in the main machine room and the standby machine room to serve as a main machine room and a standby machine room, and the business service is provided by the standby machine room when the business service in the main machine room cannot be accessed. 2. Business service multi-activity deployment: the business services are distributed in a plurality of machine rooms, data are synchronized among the plurality of machine rooms, and all the machine rooms can provide business services. The main disadvantages of the above two schemes are as follows: 1. business service master and slave deployment: the resource utilization rate is low, a set of services are in an idle state, and the domain name resolution takes effect for a long time when the main and standby are switched; 2. business service multi-activity deployment: the cloud computing platform is very sensitive to the state of the equipment, and network delay caused by cross-region data synchronization can influence the service.
According to the embodiment of the disclosure, the business service is deployed to the main machine room, the data channel is created between the main machine room and the standby machine room, and the standby machine is used for accessing the business service in the main machine room based on the data channel room under the condition that the business service in the main machine room cannot be accessed, so that the resource utilization rate is improved. According to the embodiment of the disclosure, the domain name direction of the access request is modified based on the alias records to realize the active-standby switching, so that the effective duration of domain name resolution is shortened. The embodiment of the disclosure supports that only one set of business service is deployed in the cloud computing platform, the cost required by the scheme provided by the disclosure is only 20% of that of the business service active-standby deployment scheme in the related technology, and the embodiment of the disclosure effectively reduces the service disaster recovery cost.
Fig. 4 is a schematic structural diagram of a flow scheduling device according to an embodiment of the present disclosure. The embodiment of the disclosure is suitable for the condition that the network abnormality exists in the input port of the main machine room. The device can be implemented by software and/or hardware, and the device can implement the flow scheduling method according to any embodiment of the disclosure. As shown in fig. 4, the traffic scheduling device 400 includes:
a request acquisition module 401, configured to acquire a first request to be processed from the domain name system; the first request is obtained by rewriting a second request through the domain name system under the condition that the input port of the main machine room has network abnormality;
and the request sending module 402 is configured to send the first request to the main machine room through a data channel between the standby machine room and the main machine room, and the main machine room processes the first request to obtain a processing result.
The embodiment of the disclosure provides a service disaster recovery scheme, by setting a data channel between a standby machine room and a main machine room, under the condition that an input port of the main machine room is abnormal in network, the standby machine room can acquire a first request to be processed from a domain name system through the data channel, the first request is sent to the main machine room, and the main machine room processes the first request to obtain a processing result, so that the availability of service in a cloud computing platform is improved.
Optionally, the data channel is obtained by creating a peer-to-peer connection between the primary machine room and the backup machine room.
Optionally, the apparatus further includes: the result acquisition module is used for acquiring the processing result from the main machine room through a data channel between the standby machine room and the main machine room under the condition that the output port of the main machine room is abnormal in network; and the result feedback module is used for feeding back the processing result through the callback micro-service deployed in the standby machine room.
Optionally, the processing result is also associated with a target micro-service; the target micro-service is obtained by selecting from candidate micro-services deployed in a main machine room; a result feedback module comprising: an interface determining submodule, configured to determine a target callback interface associated with the target micro service based on an association relationship between a candidate micro service and candidate callback interfaces in the callback micro service; and the result feedback sub-module is used for feeding back the processing result through the target callback interface.
Optionally, the apparatus further includes a request generation module, configured to generate the first request; the request generation module comprises: the alias record acquisition sub-module is used for acquiring the alias record of the main machine room through the domain name system under the condition that the network abnormality exists in the input port of the main machine room through the domain name system; and the domain name pointing modification sub-module is used for modifying the alias record based on the standby domain name of the standby machine room through the domain name system so as to rewrite the domain name pointed by the second request to obtain the first request.
Optionally, the apparatus further includes: the network state checking module is used for checking the network states of the main machine room and at least two candidate machine rooms through the domain name system; and the standby machine room determining submodule is used for selecting a standby machine room from the candidate machine rooms through the domain name system based on the checking result of the candidate machine rooms and determining the standby domain name of the standby machine room if the domain name system detects that the network abnormality exists in the input port of the main machine room.
The flow scheduling device provided by the embodiment of the disclosure can execute the flow scheduling method provided by any embodiment of the disclosure, and has the corresponding functional modules and beneficial effects of executing the flow scheduling method.
In the technical scheme of the disclosure, the related user information is collected, stored, used, processed, transmitted, provided, disclosed and the like, all conform to the regulations of related laws and regulations, and the public order is not violated.
According to embodiments of the present disclosure, the present disclosure also provides an electronic device, a readable storage medium and a computer program product.
Fig. 5 illustrates a schematic block diagram of an example electronic device 500 that may be used to implement embodiments of the present disclosure. Electronic devices are intended to represent various forms of digital computers, such as laptops, desktops, workstations, personal digital assistants, servers, blade servers, mainframes, and other appropriate computers. The electronic device may also represent various forms of mobile devices, such as personal digital processing, cellular telephones, smartphones, wearable devices, and other similar computing devices. The components shown herein, their connections and relationships, and their functions, are meant to be exemplary only, and are not meant to limit implementations of the disclosure described and/or claimed herein.
As shown in fig. 5, the electronic device 500 includes a computing unit 501 that can perform various appropriate actions and processes according to a computer program stored in a Read Only Memory (ROM) 502 or a computer program loaded from a storage unit 508 into a Random Access Memory (RAM) 503. In the RAM 503, various programs and data required for the operation of the electronic device 500 may also be stored. The computing unit 501, ROM 502, and RAM 503 are connected to each other by a bus 504. An input/output (I/O) interface 505 is also connected to bus 504.
A number of components in electronic device 500 are connected to I/O interface 505, including: an input unit 506 such as a keyboard, a mouse, etc.; an output unit 507 such as various types of displays, speakers, and the like; a storage unit 508 such as a magnetic disk, an optical disk, or the like; and a communication unit 509 such as a network card, modem, wireless communication transceiver, etc. The communication unit 509 allows the electronic device 500 to exchange information/data with other devices via a computer network such as the internet and/or various telecommunication networks.
The computing unit 501 may be a variety of general and/or special purpose processing components having processing and computing capabilities. Some examples of computing unit 501 include, but are not limited to, a Central Processing Unit (CPU), a Graphics Processing Unit (GPU), various specialized Artificial Intelligence (AI) computing chips, various computing units running machine learning model algorithms, a Digital Signal Processor (DSP), and any suitable processor, controller, microcontroller, etc. The computing unit 501 performs the various methods and processes described above, such as the traffic scheduling method. For example, in some embodiments, the traffic scheduling method may be implemented as a computer software program tangibly embodied on a machine-readable medium, such as the storage unit 508. In some embodiments, part or all of the computer program may be loaded and/or installed onto the electronic device 500 via the ROM 502 and/or the communication unit 509. When a computer program is loaded into RAM 503 and executed by computing unit 501, one or more steps of the traffic scheduling method described above may be performed. Alternatively, in other embodiments, the computing unit 501 may be configured to perform the traffic scheduling method by any other suitable means (e.g. by means of firmware).
Various implementations of the systems and techniques described here above may be implemented in digital electronic circuitry, integrated circuit systems, field Programmable Gate Arrays (FPGAs), application Specific Integrated Circuits (ASICs), application Specific Standard Products (ASSPs), systems On Chip (SOCs), load programmable logic devices (CPLDs), computer hardware, firmware, software, and/or combinations thereof. These various embodiments may include: implemented in one or more computer programs, the one or more computer programs may be executed and/or interpreted on a programmable system including at least one programmable processor, which may be a special purpose or general-purpose programmable processor, that may receive data and instructions from, and transmit data and instructions to, a storage system, at least one input device, and at least one output device.
Program code for carrying out methods of the present disclosure may be written in any combination of one or more programming languages. These program code may be provided to a processor or controller of a general purpose computer, special purpose computer, or other programmable traffic scheduling apparatus such that the program code, when executed by the processor or controller, causes the functions/operations specified in the flowchart and/or block diagram to be implemented. The program code may execute entirely on the machine, partly on the machine, as a stand-alone software package, partly on the machine and partly on a remote machine or entirely on the remote machine or server.
In the context of this disclosure, a machine-readable medium may be a tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. The machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. The machine-readable medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any suitable combination of the foregoing. More specific examples of a machine-readable storage medium would include an electrical connection based on one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
To provide for interaction with a user, the systems and techniques described here can be implemented on a computer having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to a user; and a keyboard and pointing device (e.g., a mouse or trackball) by which a user can provide input to the computer. Other kinds of devices may also be used to provide for interaction with a user; for example, feedback provided to the user may be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user may be received in any form, including acoustic input, speech input, or tactile input.
The systems and techniques described here can be implemented in a computing system that includes a background component (e.g., as a data server), or that includes a middleware component (e.g., an application server), or that includes a front-end component (e.g., a user computer having a graphical user interface or a web browser through which a user can interact with an implementation of the systems and techniques described here), or any combination of such background, middleware, or front-end components. The components of the system can be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: local Area Networks (LANs), wide Area Networks (WANs), and the internet.
The computer system may include a client and a server. The client and server are typically remote from each other and typically interact through a communication network. The relationship of client and server arises by virtue of computer programs running on the respective computers and having a client-server relationship to each other. The server may be a cloud server, a server of a distributed system, or a server incorporating a blockchain.
Artificial intelligence is the discipline of studying the process of making a computer mimic certain mental processes and intelligent behaviors (e.g., learning, reasoning, thinking, planning, etc.) of a person, both hardware-level and software-level techniques. Artificial intelligence hardware technologies generally include technologies such as sensors, dedicated artificial intelligence chips, cloud computing, distributed storage, big data processing, and the like; the artificial intelligent software technology mainly comprises a computer vision technology, a voice recognition technology, a natural language processing technology, a machine learning/deep learning technology, a big data processing technology, a knowledge graph technology and the like.
Cloud computing (cloud computing) refers to a technical system that a shared physical or virtual resource pool which is elastically extensible is accessed through a network, resources can comprise servers, operating systems, networks, software, applications, storage devices and the like, and resources can be deployed and managed in an on-demand and self-service mode. Through cloud computing technology, high-efficiency and powerful data processing capability can be provided for technical application such as artificial intelligence and blockchain, and model training.
It should be appreciated that various forms of the flows shown above may be used to reorder, add, or delete steps. For example, the steps recited in the present disclosure may be performed in parallel or sequentially or in a different order, provided that the desired results of the technical solutions of the present disclosure are achieved, and are not limited herein.
The above detailed description should not be taken as limiting the scope of the present disclosure. It will be apparent to those skilled in the art that various modifications, combinations, sub-combinations and alternatives are possible, depending on design requirements and other factors. Any modifications, equivalent substitutions and improvements made within the spirit and principles of the present disclosure are intended to be included within the scope of the present disclosure.

Claims (15)

1. The flow scheduling method is executed by a standby machine room in a cloud platform, wherein the cloud platform comprises a domain name system, a main machine room and the standby machine room; the method comprises the following steps:
acquiring a first request to be processed from the domain name system; the first request is obtained by rewriting a second request through the domain name system under the condition that the input port of the main machine room has network abnormality;
and sending the first request to the main machine room through a data channel between the standby machine room and the main machine room, and processing the first request by the main machine room to obtain a processing result.
2. The method of claim 1, wherein the data channel is obtained by creating a peer-to-peer connection between the primary and backup rooms.
3. The method of claim 1, the method further comprising:
under the condition that the output port of the main machine room is abnormal in network, the processing result is obtained from the main machine room through a data channel between the standby machine room and the main machine room;
and feeding back the processing result through the callback micro-service deployed in the standby machine room.
4. The method of claim 3, wherein feeding back the processing result through a callback micro-service deployed in the backup room comprises:
the processing result is also associated with a target micro-service; the target micro-service is obtained by selecting from candidate micro-services deployed in a main machine room;
determining a target callback interface associated with the target micro-service based on an association relationship between the candidate micro-service and the candidate callback interface in the callback micro-service;
and feeding back the processing result through the target callback interface.
5. The method of claim 1, wherein the first request is generated by:
acquiring an alias record of the main machine room through the domain name system under the condition that the network abnormality exists in the input port of the main machine room through the domain name system;
And modifying the alias record based on the standby domain name of the standby machine room through the domain name system to rewrite the domain name pointed by the second request to obtain the first request.
6. The method of claim 5, the method further comprising:
checking the network states of the main machine room and at least two candidate machine rooms through the domain name system;
if the domain name system detects that the input port of the main machine room has network abnormality, a standby machine room is selected from the candidate machine rooms based on the detection result of the candidate machine rooms through the domain name system, and the standby domain name of the standby machine room is determined.
7. The flow dispatching device is configured in a standby machine room in a cloud platform, wherein the cloud platform comprises a domain name system, a main machine room and the standby machine room; the device comprises:
the request acquisition module is used for acquiring a first request to be processed from the domain name system; the first request is obtained by rewriting a second request through the domain name system under the condition that the input port of the main machine room has network abnormality;
and the request sending module is used for sending the first request to the main machine room through a data channel between the standby machine room and the main machine room, and the main machine room processes the first request to obtain a processing result.
8. The apparatus of claim 7, wherein the data channel is obtained by creating a peer-to-peer connection between the primary and backup rooms.
9. The apparatus of claim 7, the apparatus further comprising:
the result acquisition module is used for acquiring the processing result from the main machine room through a data channel between the standby machine room and the main machine room under the condition that the output port of the main machine room is abnormal in network;
and the result feedback module is used for feeding back the processing result through the callback micro-service deployed in the standby machine room.
10. The apparatus of claim 9, wherein the processing result is further associated with a target micro-service; the target micro-service is obtained by selecting from candidate micro-services deployed in a main machine room;
a result feedback module comprising: an interface determining submodule, configured to determine a target callback interface associated with the target micro service based on an association relationship between a candidate micro service and candidate callback interfaces in the callback micro service;
and the result feedback sub-module is used for feeding back the processing result through the target callback interface.
11. The apparatus of claim 7, wherein the apparatus further comprises a request generation module to generate the first request;
The request generation module comprises:
the alias record acquisition sub-module is used for acquiring the alias record of the main machine room through the domain name system under the condition that the network abnormality exists in the input port of the main machine room through the domain name system;
and the domain name pointing modification sub-module is used for modifying the alias record based on the standby domain name of the standby machine room through the domain name system so as to rewrite the domain name pointed by the second request to obtain the first request.
12. The apparatus of claim 11, the apparatus further comprising:
the network state checking module is used for checking the network states of the main machine room and at least two candidate machine rooms through the domain name system;
and the standby machine room determining submodule is used for selecting a standby machine room from the candidate machine rooms through the domain name system based on the checking result of the candidate machine rooms and determining the standby domain name of the standby machine room if the domain name system detects that the network abnormality exists in the input port of the main machine room.
13. An electronic 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 enable the at least one processor to perform the traffic scheduling method of any one of claims 1-6.
14. A non-transitory computer readable storage medium storing computer instructions for causing a computer to perform the flow scheduling method of any one of claims 1-6.
15. A computer program product comprising a computer program which, when executed by a processor, implements the traffic scheduling method according to any one of claims 1-6.
CN202310119208.4A 2023-02-01 2023-02-01 Traffic scheduling method and device, electronic equipment and medium Pending CN116112437A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202310119208.4A CN116112437A (en) 2023-02-01 2023-02-01 Traffic scheduling method and device, electronic equipment and medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202310119208.4A CN116112437A (en) 2023-02-01 2023-02-01 Traffic scheduling method and device, electronic equipment and medium

Publications (1)

Publication Number Publication Date
CN116112437A true CN116112437A (en) 2023-05-12

Family

ID=86255821

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202310119208.4A Pending CN116112437A (en) 2023-02-01 2023-02-01 Traffic scheduling method and device, electronic equipment and medium

Country Status (1)

Country Link
CN (1) CN116112437A (en)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20190356693A1 (en) * 2018-05-21 2019-11-21 International Business Machines Corporation Selectively providing mutual transport layer security using alternative server names
CN111526038A (en) * 2020-03-26 2020-08-11 口碑(上海)信息技术有限公司 Service request distribution method and device, computer equipment and readable storage medium
CN112260853A (en) * 2020-09-17 2021-01-22 北京大米科技有限公司 Disaster recovery switching method and device, storage medium and electronic equipment
CN115309497A (en) * 2021-05-08 2022-11-08 中国移动通信集团浙江有限公司 Request scheduling method, device, equipment and storage medium
CN115665263A (en) * 2022-10-19 2023-01-31 上海浦东发展银行股份有限公司 Flow allocation method, device, server and storage medium

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20190356693A1 (en) * 2018-05-21 2019-11-21 International Business Machines Corporation Selectively providing mutual transport layer security using alternative server names
CN111526038A (en) * 2020-03-26 2020-08-11 口碑(上海)信息技术有限公司 Service request distribution method and device, computer equipment and readable storage medium
CN112260853A (en) * 2020-09-17 2021-01-22 北京大米科技有限公司 Disaster recovery switching method and device, storage medium and electronic equipment
CN115309497A (en) * 2021-05-08 2022-11-08 中国移动通信集团浙江有限公司 Request scheduling method, device, equipment and storage medium
CN115665263A (en) * 2022-10-19 2023-01-31 上海浦东发展银行股份有限公司 Flow allocation method, device, server and storage medium

Similar Documents

Publication Publication Date Title
CN113742031B (en) Node state information acquisition method and device, electronic equipment and readable storage medium
CN110262902B (en) Information processing method and system, medium, and computing device
CN107534570A (en) Virtualize network function monitoring
US9628505B2 (en) Deploying a security appliance system in a high availability environment without extra network burden
WO2019210580A1 (en) Access request processing method, apparatus, computer device, and storage medium
CN110995504A (en) Micro-service node exception handling method, device and system
CN108600344A (en) A kind of network access request dispatching method, device and storage medium
US8521861B2 (en) Migrating device management between object managers
CN114911598A (en) Task scheduling method, device, equipment and storage medium
CN111770176A (en) Traffic scheduling method and device
CN108650337B (en) Server detection method, system and storage medium
CN113849361A (en) Method, device, equipment and storage medium for testing service node
CN113242299A (en) Disaster recovery system, method, computer device and medium for multiple data centers
CN112596897A (en) Method and system for multi-tenant isolation
CN115514718B (en) Data interaction method, control layer and equipment based on data transmission system
CN116112437A (en) Traffic scheduling method and device, electronic equipment and medium
CN115225634A (en) Data forwarding method and device under virtual network and computer program product
CN114760360B (en) Request response method, request response device, electronic equipment and computer readable storage medium
US11494239B2 (en) Method for allocating computing resources, electronic device, and computer program product
CN114205414A (en) Data processing method, device, electronic equipment and medium based on service grid
CN113726881A (en) Communication connection establishment method, related device and computer program product
CN113726902A (en) Calling method and system of microservice
CN113612643A (en) Network configuration method, device, equipment and storage medium of cloud mobile phone
CN113556370A (en) Service calling method and device
CN112596922B (en) Communication management method, device, equipment and medium

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