Request processing method and device and electronic equipment
By using the first gateway to obtain application identifiers and forward operation requests in a multi-data center architecture, disaster recovery problems during application migration or network link abnormalities are solved, and the normal flow of operation requests and the improvement of system disaster recovery capabilities are achieved.
Patent Information
- Application Number
- CN202411825055.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-10
- Publication Date
- 2025-03-28
- Estimated Expiration
- 2044-12-10
AI Technical Summary
In a multi-data center architecture, when application migration or network link abnormality is applied, the network link needs to be configured manually, resulting in poor disaster recovery capabilities.
By obtaining the application identifier carried by the operation request in the first gateway, the corresponding data center is determined, and when the data center is inconsistent, the operation request is forwarded to the corresponding second data center gateway to ensure the normal flow of the operation request.
It ensures the normal flow of operation requests in abnormal situations, improves the system's disaster recovery capabilities, and avoids interruption of operation request links.
Smart Images

Figure CN119728770A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to application processing technology, and in particular to a request processing method, device and electronic device. Background Art
[0002] With the rapid development of the Internet, various industries have put forward higher requirements for the high availability and business continuity of computer systems. Therefore, the multi-data center architecture has emerged. Each data center can provide hardware hosting services for applications. Applications are usually deployed on the servers of the data center and interact with users through the network links provided by the data center.
[0003] However, when an application is migrated or a network link is abnormal, it is usually necessary to manually configure the correct network link to ensure the normal flow of operation requests for the application. This approach has poor disaster recovery capabilities when an abnormality occurs in the entire system. Summary of the invention
[0004] The embodiments of the present application provide a request processing method, device and electronic device, which can ensure the normal flow of operation requests for applications under abnormal circumstances, thereby improving the disaster recovery capability under abnormal circumstances.
[0005] The technical solution of the embodiment of the present application is implemented as follows:
[0006] The present application embodiment provides a request processing method, which is applied to a first gateway, and the method includes:
[0007] In response to an operation request for a first application, an application identifier carried in the operation request is obtained; a first data center corresponding to the first gateway is determined, and a second data center corresponding to the first application is determined based on the application identifier; if the first data center is inconsistent with the second data center, the operation request is sent to the second data center through a second gateway corresponding to the second data center, so that the second data center performs the operation indicated by the operation request on the first application.
[0008] The embodiment of the present application provides a request processing device, which is arranged in a first gateway, and the request processing device includes:
[0009] an acquisition module, configured to, in response to an operation request for a first application, acquire an application identifier carried in the operation request;
[0010] a determination module, configured to determine a first data center corresponding to the first gateway, and determine a second data center corresponding to the first application based on the application identifier;
[0011] The gateway sending module is used to send the operation request to the second data center through a second gateway corresponding to the second data center if the first data center is inconsistent with the second data center, so that the second data center performs the operation indicated by the operation request on the first application.
[0012] The embodiment of the present application also provides a request processing method, which is applied to the request transfer area, and the method includes:
[0013] In response to an operation request for a first application, a first border agent corresponding to the first application is determined; when the first border agent is normal, the operation request is sent to the first border agent, and the operation request is forwarded to a first gateway through the first border agent, so that the first gateway responds to the operation request, and when it is determined that the first data center corresponding to the first gateway is inconsistent with the second data center to which the first application belongs, the operation request is sent to the second data center through a second gateway corresponding to the second data center, so that the second data center performs the operation indicated by the operation request on the first application.
[0014] The embodiment of the present application further provides a request processing device, which is arranged in a request transfer area, and the request processing device includes:
[0015] an agent determination module, configured to determine, in response to an operation request for a first application, a first edge agent corresponding to the first application;
[0016] an agent sending module, for sending the operation request to the first border agent when the first border agent is normal, and forwarding the operation request to the first gateway through the first border agent so that the first gateway responds to the operation request, and when it is determined that the first data center corresponding to the first gateway is inconsistent with the second data center to which the first application belongs, sending the operation request to the second data center through the second gateway corresponding to the second data center so that the second data center performs the operation indicated by the operation request on the first application.
[0017] An embodiment of the present application provides an electronic device, the electronic device comprising:
[0018] A memory for storing computer executable instructions;
[0019] The processor is used to implement the request processing method provided in the embodiment of the present application when executing the computer executable instructions stored in the memory.
[0020] An embodiment of the present application provides a computer-readable storage medium storing a computer program or computer-executable instructions for implementing the request processing method provided in the embodiment of the present application when executed by a processor.
[0021] An embodiment of the present application provides a computer program product, including a computer program or computer executable instructions. When the computer program or computer executable instructions are executed by a processor, the request processing method provided by the embodiment of the present application is implemented.
[0022] The embodiments of the present application have the following beneficial effects:
[0023] By applying the above embodiment, a corresponding gateway is configured for each data center. The gateway can send a request to the corresponding data center, or forward the request to the gateway of other data centers. In this way, the operation request for each application in the data center is isolated by the gateway. When the gateway receives an operation request that is not for an application in its corresponding data center, the operation request can be forwarded to the corresponding gateway to ensure the normal flow of the operation request. That is, when the first gateway receives an operation request for the first application, it responds to the operation request, determines the first data center corresponding to the first gateway itself, and determines the second data center currently corresponding to the first application through the application identifier carried in the operation request. When the first data center and the second data center are inconsistent, the first gateway can forward the operation request to the second gateway corresponding to the second data center corresponding to the first application, so that the operation request can be accurately sent to the second data center through the second gateway. In this way, the operation request initiated for the first application can be normally and accurately sent to the data center currently corresponding to the first application in the case of application migration, etc., without the problem of link interruption of the operation request, thereby improving the disaster recovery capability under abnormal conditions. BRIEF DESCRIPTION OF THE DRAWINGS
[0024] Figure 1A This is a schematic diagram of the first flow direction of an operation request in the related technology provided by an embodiment of the present application;
[0025] Figure 1B This is a schematic diagram of a second flow direction of an operation request in the related technology provided by an embodiment of the present application;
[0026] Figure 2 It is a schematic diagram of the architecture of the request processing system provided in an embodiment of the present application;
[0027] Figure 3A-3B is a schematic diagram of the structure of an electronic device provided in an embodiment of the present application;
[0028] Figure 4 It is a first flow chart of the request processing method provided in an embodiment of the present application;
[0029] Figure 5 It is a second flow chart of the request processing method provided in an embodiment of the present application;
[0030] Figure 6 This is a first flow diagram of an operation request provided in an embodiment of the present application;
[0031] Figure 7 It is a link diagram of an operation request based on multiple data centers provided in an embodiment of the present application;
[0032] Figure 8 This is a second flow diagram of the operation request provided in an embodiment of the present application.
[0033] It should be pointed out that the above-mentioned "first" and "second" are only used to distinguish different solutions, and do not represent the degree of superiority or inferiority of the solutions or the priority in the implementation process. DETAILED DESCRIPTION
[0034] In order to make the purpose, technical solutions and advantages of the present application clearer, the present application will be further described in detail below in conjunction with the accompanying drawings. The described embodiments should not be regarded as limiting the present application. All other embodiments obtained by ordinary technicians in the field without making creative work are within the scope of protection of this application.
[0035] In the following description, reference is made to “some embodiments”, which describe a subset of all possible embodiments, but it can be understood that “some embodiments” may be the same subset or different subsets of all possible embodiments and may be combined with each other without conflict.
[0036] In the following description, the terms "first\second\third" involved are merely used to distinguish similar objects and do not represent a specific ordering of the objects. It can be understood that "first\second\third" can be interchanged with a specific order or sequence where permitted, so that the embodiments of the present application described here can be implemented in an order other than that illustrated or described here.
[0037] In the embodiments of the present application, the term "module" or "unit" refers to a computer program or a part of a computer program with a predetermined function, and works together with other related parts to achieve a predetermined goal, and can be implemented in whole or in part by using software, hardware (such as processing circuits or memories) or a combination thereof. Similarly, a processor (or multiple processors or memories) can be used to implement one or more modules or units. In addition, each module or unit can be part of an overall module or unit that includes the function of the module or unit.
[0038] Unless otherwise defined, all technical and scientific terms used in the embodiments of the present application have the same meanings as those commonly understood by those skilled in the art. The terms used in the embodiments of the present application are only for the purpose of describing the embodiments of the present application and are not intended to limit the present application.
[0039] The relevant data collection and processing in the embodiments of this application should be strictly in accordance with the requirements of relevant laws and regulations when applied in examples, obtain the informed consent or separate consent of the personal information subject, and carry out subsequent data use and processing within the scope of authorization of laws and regulations and the personal information subject.
[0040] Before further describing the embodiments of the present application in detail, the nouns and terms involved in the embodiments of the present application are explained. The nouns and terms involved in the embodiments of the present application are subject to the following interpretations.
[0041] 1) Data center is a professional facility that provides a reliable and secure environment for hosting and running websites, applications, databases and other information technology services. Data centers are usually operated by third-party service providers, but can also be established and managed by enterprises themselves. The purpose of a data center is to provide a safe, reliable and efficient environment so that users can run their own information technology systems.
[0042] 2) Request transfer zone, also known as network isolation zone, is usually used to isolate sensitive internal networks from public networks to protect internal networks from security threats and attacks from public networks. The request transfer zone is equivalent to creating a buffer zone between the internal network and the external network. The purpose is to improve security, allowing servers in the internal network to provide services to the outside, while limiting direct access to the internal network by the external network. In an embodiment of the present application, the request transfer zone is used to isolate the internal network where the application deployed in the data center is located and the external network used by the user to initiate an operation request for the application.
[0043] 3) Border agent, as an intermediary between the external network and the internal network, can be a network device or server, usually set in the request transfer area. The main functions of the border agent include but are not limited to: request forwarding, security policy, performance optimization, load balancing, and policy control.
[0044] 4) Gateway refers to a service or system located between two or more networks or systems. It acts as an intermediary or bridge between these networks or systems and is responsible for data conversion, transmission, routing and control. In different scenarios, gateways may have different functions and features, but their main purpose is to achieve interconnection between different networks or systems. In the embodiment of the present application, the gateway is used to achieve interconnection between the data center and the request transfer area.
[0045] With the rapid development of the Internet, various industries have put forward higher requirements for the high availability and business continuity of computer systems. Therefore, the multi-data center architecture has emerged. In related technologies, in order to ensure the operational security of applications deployed in the data center, a request transfer area is usually built between the data center and the external network, and the boundary agent corresponding to each data center is deployed in the request transfer area. When a user operates an application in the data center through an external network, the operation request for the application needs to pass through the boundary agent in the request transfer area, and then forward the operation request to the corresponding data center through the boundary agent.
[0046] As an example, Figure 1A Schematic diagram of the first flow of operation request in the related technology provided by the embodiment of the present application. Figure 1A , users can initiate operation requests to the first application through the incoming domain name corresponding to the first application in the external network. The operation request passes through the request transfer zone and is forwarded by the request transfer zone to the edge proxy configured for the data center where the first application is located, and then forwarded to the corresponding data center through the edge proxy. For example, application A is deployed in the first data center (that is, application A belongs to the first data center), and the first data center corresponds to the first edge proxy. Users can initiate operation requests to application A based on the incoming domain name corresponding to application A (such as A.xxx.com) in the external network. The operation request flows to the first data center through the first edge proxy in the request transfer zone.
[0047] In this method of related technology, every time an application in a data center is deployed and migrated or an abnormality occurs in the border agent, it is necessary to manually configure the border agent to correspond to the data center currently corresponding to the application, so as to ensure the normal flow of operation requests initiated by the application. However, before the manual configuration is completed, the entire system is in an abnormal state and normal access to the application cannot be guaranteed (that is, the operation request cannot be sent to the application normally).
[0048] As an example, Figure 1B Schematic diagram of the second flow of operation request in the related technology provided by the embodiment of the present application. Figure 1B Taking application A and application C as an example, application A is initially deployed in the first data center, and the first data center corresponds to the first edge proxy. If application A is migrated to the second data center due to business adjustments, in order to ensure that users can operate application A normally, it is necessary to manually configure the first edge proxy so that the first edge proxy corresponds to the second data center.
[0049] This method in the related art is not convenient for unified management of the flow of operation requests, resulting in poor disaster recovery capabilities of the entire system when applications migrate. In addition, in the solution in the related art, at the request transfer area level, since the incoming domain name of each application is independently resolved in a record manner, during the application migration process, the request transfer area needs to identify the data center to be accessed by all operation requests in the incoming traffic, and perform resolution changes on the operation requests one by one. When the incoming traffic is large, the resolution change of the request transfer area takes a long time and increases the pressure on the request transfer area.
[0050] The embodiments of the present application provide a request processing method, device, electronic device, computer-readable storage medium and computer program product, which can ensure the normal flow of operation requests for applications under abnormal circumstances and improve the disaster recovery capability under abnormal circumstances.
[0051] See also Figure 2 , Figure 2 It is a schematic diagram of the architecture of the request processing system 100 provided in the embodiment of the present application. To support a request processing application, the terminal 401 connects to each data center (e.g., the first data center 210, the second data center 220) through the request transfer area 300 and the gateway (e.g., the first gateway 510, the second gateway 520). At least one application is deployed in each data center. The request transfer area 300 can be a wide area network or a local area network, or a combination of the two. Among them, the request transfer area 300 is provided with a boundary agent corresponding to each data center (e.g., the first boundary agent 310 of the first data center 210, the second boundary agent 320 of the second data center 220).
[0052] The terminal 401 is used to receive an operation instruction initiated by a user for a first application, and in response to the operation instruction, sends an operation request for the first application to the request transfer area. Assuming that the first application is application 2101, the request transfer area 300 is used to respond to the operation request for the first application, determine the first data center 210 to which the first application is pre-assigned, and the first border agent 310 corresponding to the first data center 210.
[0053] When the request transfer area 300 determines that the first edge agent 310 is normal, an operation request is sent to the first edge agent 310, and the operation request is forwarded to the first gateway 510 of the first data center 210 through the first edge agent 310, and then the operation request is sent to the application 2101 in the first data center 210 through the first gateway 510.
[0054] Here, when the first gateway 510 receives an operation request for the first application, if the application 2101 has been migrated from the first data center 210 to the second data center 220, the first gateway 510 responds to the operation request and determines that the first data center 210 is inconsistent with the second data center 220 currently corresponding to the first application, and sends the operation request to the second gateway 520 of the second data center 220; the second gateway 520 is used to send the operation request to the second data center 220.
[0055] In some embodiments, after the second data center 220 receives an operation request for the first application, it can perform the operation requested by the operation request for the first application, and send the result of the operation to the terminal 401 through the corresponding second gateway 520 and the second border agent 320.
[0056] In some embodiments, the terminal 401 can be implemented as various types of terminals such as a laptop computer, a tablet computer, a desktop computer, a set-top box, a smart phone, a smart speaker, a smart watch, a smart TV, a car terminal, etc.
[0057] In some embodiments, the request transfer area 300 can be an independent physical server, or a server cluster or distributed system composed of multiple physical servers, or a cloud server that provides 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, content delivery networks (CDN), and big data and artificial intelligence platforms. The terminal 401 and the request transfer area 300 can be directly or indirectly connected by wired or wireless communication, which is not limited in the embodiments of the present application.
[0058] See also Figure 3A-3B , Figure 3A-3B is a schematic diagram of the structure of an electronic device 400 provided in an embodiment of the present application, Figure 3A-3B The electronic device 400 shown includes: at least one processor 410, a memory 450, at least one network interface 420 and a user interface 430. The various components in the electronic device 400 are coupled together via a bus system 440. It is understood that the bus system 440 is used to achieve connection and communication between these components. In addition to the data bus, the bus system 440 also includes a power bus, a control bus and a status signal bus. However, for the sake of clarity, the bus system 440 is not described in detail. Figure 3A-3B Various buses are labeled as bus system 440 .
[0059] The processor 410 can be an integrated circuit chip with signal processing capabilities, such as a general-purpose processor, a digital signal processor (DSP), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc., where the general-purpose processor can be a microprocessor or any conventional processor, etc.
[0060] The user interface 430 includes one or more output devices 431 that enable presentation of media content, including one or more speakers and / or one or more visual display screens. The user interface 430 also includes one or more input devices 432, including user interface components that facilitate user input, such as a keyboard, mouse, microphone, touch screen display, camera, other input buttons and controls.
[0061] The memory 450 may be removable, non-removable, or a combination thereof. Exemplary hardware devices include solid-state memory, hard disk drives, optical disk drives, etc. The memory 450 may optionally include one or more storage devices that are physically remote from the processor 410.
[0062] The memory 450 includes a volatile memory or a non-volatile memory, and may also include both volatile and non-volatile memories. The non-volatile memory may be a read-only memory (ROM), and the volatile memory may be a random access memory (RAM). The memory 450 described in the embodiments of the present application is intended to include any suitable type of memory.
[0063] In some embodiments, memory 450 can store data to support various operations, examples of which include programs, modules, and data structures, or a subset or superset thereof, as exemplarily described below.
[0064] Operating system 451, including system programs for processing various basic system services and performing hardware-related tasks, such as a framework layer, a core library layer, a driver layer, etc., for implementing various basic services and processing hardware-based tasks;
[0065] A network communication module 452, used to reach other electronic devices via one or more (wired or wireless) network interfaces 420, exemplary network interfaces 420 include: Bluetooth, Wireless Compatibility Certification (WiFi), and Universal Serial Bus (USB), etc.;
[0066] a presentation module 453 for enabling presentation of information via one or more output devices 431 (e.g., display screen, speaker, etc.) associated with the user interface 430 (e.g., a user interface for operating peripherals and displaying content and information);
[0067] The input processing module 454 is used to detect one or more user inputs or interactions from one of the one or more input devices 432 and translate the detected inputs or interactions.
[0068] In some embodiments, the request processing device provided in the embodiments of the present application can be implemented in software. Figure 3A The request processing device 455A stored in the memory 450 is shown, which can be software in the form of a program and a plug-in, etc., and includes the following software modules: an acquisition module 4551, a determination module 4552, and a gateway sending module 4553. These modules are logical, so they can be arbitrarily combined or further split according to the functions implemented. The functions of each module will be described below.
[0069] In some embodiments, the request processing device provided in the embodiments of the present application can be implemented in software. Figure 3B The request processing device 455B stored in the memory 450 is shown, which can be software in the form of a program and a plug-in, etc., and includes the following software modules: an agent determination module 4554, an agent sending module 4555, and these modules are logical, so they can be arbitrarily combined or further split according to the functions implemented. The functions of each module will be described below.
[0070] In other embodiments, the request processing device provided in the embodiments of the present application can be implemented in hardware. As an example, the request processing device provided in the embodiments of the present application can be a processor in the form of a hardware decoding processor, which is programmed to execute the request processing method provided in the embodiments of the present application. For example, the processor in the form of a hardware decoding processor can adopt one or more application specific integrated circuits (Application Specific Integrated Circuit, ASIC), digital signal processors (Digital Signal Processor, DSP), programmable logic devices (Programmable Logic Device, PLD), complex programmable logic devices (Complex Programmable Logic Device, CPLD), field programmable gate arrays (Field-Programmable Gate Array, FPGA) or other electronic components.
[0071] Below, the request processing method provided in the embodiment of the present application will be described in conjunction with the accompanying drawings. As mentioned above, the electronic device that implements the request processing method in the embodiment of the present application can be a gateway (for example, gateway 510, gateway 520), or a request transfer area 300.
[0072] Below, the request processing method of the embodiment of the present application is first described by taking the execution subject as a gateway (such as gateway 510, gateway 520) as an example. Figure 4 , Figure 4 This is a first flow chart of the request processing method provided in the embodiment of the present application, which will be combined with Figure 4 The steps shown are explained.
[0073] In step 101, in response to an operation request for a first application, an application identifier carried in the operation request is obtained.
[0074] In actual implementation, the request processing system includes multiple data centers, and corresponding gateways and border agents are pre-configured for each data center. The border agent and the gateway are used to forward the incoming traffic generated for the corresponding data center to the corresponding data center, and the incoming traffic may include operation requests generated for applications deployed in the data center. The operation request is used to request to perform an operation on the first application, and the operation includes but is not limited to various operations such as access, download, forward, and respond to the first application.
[0075] In actual implementation, the data center in the embodiment of the present application can be built through the Internet Data Center (IDC), which can provide a professional information technology environment to manage and deploy various applications. In each data center, multiple business areas (Areas) can be divided according to actual business needs, and the business functions corresponding to the applications to be deployed can be deployed in the corresponding business areas of the data center.
[0076] In the embodiment of the present application, the relationship between the data center IDC and the application is the relationship between infrastructure and service. The data center IDC provides an operating environment for applications, including computing resources, storage space, network connection and security. Applications are the core content of the data center IDC. They run on the hardware resources provided by the IDC to provide support for daily operations and business development. The business area (Abstracted Runtime Execution Area, Area) can also be called the application operating environment, which usually refers to the software framework or platform that provides the operating environment for the application. It may include operating systems, middleware, database management systems, etc., as well as various tools and interfaces that provide necessary resources and services for applications. In the data center IDC, the business area can be regarded as the software level that supports the operation of applications. It is combined with the hardware resources provided by the data center IDC to form the IT architecture of the enterprise. Applications run in the business area and rely on the infrastructure of the data center IDC to perform their functions. In summary, the data center IDC provides support at the physical and infrastructure levels, while the business area provides support at the software and operating environment levels, and both jointly support the operation of business applications.
[0077] In actual implementation, after building a request processing system and deploying each application to the corresponding data center, application metadata for describing application deployment information can be built based on the configuration of the system. The application metadata may include a mapping relationship between the application identifier of the application and the center identifier of the data center to which the application belongs, and may also include a status table of each data center, which is used to describe whether the data center is in a normal working state.
[0078] As an example, the application metadata may include Table 1 and Table 2. See Table 1 and Table 2.
[0079] Table 1
[0080] Application Identification Center Logo Business area logo Application A Data Center 1 Area1 … … … Application N Data Center M Area*
[0081] Table 1 is a mapping relationship table between application identifiers and center identifiers.
[0082] Table 2
[0083] Center Logo Data Center Status Business area logo Business Area Status Data Center 1 UP Area1 UP Data Center 1 UP Area2 DOWN … … … … Data Center M UP Area1 UP
[0084] Table 2 is a status table of a data center, where UP indicates a normal state and DOWN indicates an abnormal state.
[0085] In actual implementation, the state of the data center, the state of each business area in the data center, and the data center to which each application belongs can be continuously detected. When it is detected that the state of each data center or each business area in each data center has changed, the state table shown in Table 2 is updated; when it is detected that the application has migrated, for example, from data center 1 to data center 2, or from business area Area 1 in data center 1 to business area Area 2 in data center 1, the mapping relationship table shown in Table 2 is updated.
[0086] In actual implementation, different global domain names may be constructed for different applications, which may also be referred to as inbound domain names. Users may initiate a call to the data center through the inbound domain names in the external network to initiate an operation request to the first application. The inbound domain names are collectively referred to as inbound domain names hereinafter.
[0087] As an example, the incoming domain name may be set as a third-level domain name (x.xxx.com), and the incoming domain name includes an application identifier. For example, the incoming domain name set for application A may be A.xxx.com, and the incoming domain name set for application B may be B.xxx.com.
[0088] In actual implementation, if the first gateway receives an operation request for the first application forwarded to it by the first boundary agent, it can parse the operation request, obtain the application identifier in the incoming domain name corresponding to the operation request, and obtain the application metadata of the first application to determine the data center to which the first application currently belongs through the application metadata.
[0089] The first gateway and the first border agent are both configured to correspond to the first data center. In actual implementation, the border agent can only forward the received operation request for the first application to the corresponding gateway.
[0090] In step 102, a first data center corresponding to the first gateway is determined, and a second data center corresponding to the first application is determined based on the application identifier.
[0091] In actual implementation, since the correspondence between the gateway, border agent, and data center is deployed when the request processing system is built, when the border agent receives an operation request, it will directly forward the operation request to the gateway on the same line with it, and the gateway can only send the operation request for the data center corresponding to it to the data center corresponding to it, and the gateway cannot send the operation request to other data centers. Therefore, when the first gateway receives an operation request for the first application, it needs to determine whether the data center corresponding to the first application and the data center corresponding to itself are the same. If they are the same data center, the first gateway can directly send the operation request to the data center corresponding to it; if they are not the same data center, the first gateway needs to forward the operation request to the gateway corresponding to the data center corresponding to the first application.
[0092] It can be understood that the data center corresponding to the first application means that the first application is deployed on the server of the data center, that is, the data center to which the first application belongs.
[0093] In actual implementation, the first gateway may first determine the first data center corresponding to itself, and then, through the application identifier carried in the obtained operation request, search in the application metadata to determine the second data center where the first application is currently deployed, that is, determine the second data center currently corresponding to the first application.
[0094] As an example, since the application metadata is updated in real time according to the real-time status of the data center, business area, and application, the first gateway can obtain the application metadata once each time it receives an operation request to obtain the latest application metadata. In this way, the data center currently corresponding to the first application can be accurately determined through the application metadata.
[0095] As an example, when the first gateway receives an operation request for the first application, it parses the operation request and obtains the application identifier in the incoming domain name corresponding to the operation request. Based on the application identifier, a search is performed in the mapping relationship table shown in Table 1 of the application metadata to obtain the target center identifier and the target business area identifier corresponding to the application identifier. The target center identifier is the identifier of the second data center where the first application is deployed. The first application is deployed in the business area corresponding to the target business area identifier in the second data center.
[0096] In step 103, if the first data center is inconsistent with the second data center, the operation request is sent to the second data center through a second gateway corresponding to the second data center, so that the second data center performs the operation indicated by the operation request on the first application.
[0097] In one case, if the first application is pre-deployed on data center 1, the operation request sent for the first application will be assigned by the request transfer area to the border agent 1 corresponding to data center 1, and the operation request will be forwarded to the gateway 1 corresponding to data center 1 through the border agent 1, and the operation request will be forwarded to data center 1 through gateway 1. Under this premise, if the first application is migrated from data center 1 to data center 2 due to business needs, and the border agent level has not been able to update the application migration in time, at this time, the operation request sent for the first application will still be assigned by the request transfer area to the border agent 1, and the border agent 1 will forward the operation request to gateway 1. At this time, gateway 1 is the first gateway, and data center 1 corresponding to gateway 1 is the first data center. When gateway 1 receives the operation request, it responds to the operation request, obtains the latest application metadata, and determines through the application metadata that the second data center where the first application is currently deployed is data center 2. In this case, there is an inconsistency between the first data center and the second data center. At this time, gateway 1 (i.e., the first gateway) needs to forward the operation request to gateway 2 (i.e., the second gateway) corresponding to data center 2, so as to forward the operation data to data center 2 (i.e., the second data center) through gateway 2, so that the second data center can perform the operation requested by the operation request for the first application.
[0098] In another case, the first application is deployed on data center 1. When the border agent 1 corresponding to data center 1 works normally, the operation request sent to the first application will be assigned to the border agent 1 by the request transfer area, and the operation request will be forwarded to the gateway 1 corresponding to data center 1 through the border agent 1, and the operation request will be forwarded to the data center 1 through the gateway 1. Based on this premise, if the user initiates an operation request for the first application, the border agent 1 has an abnormality and cannot work normally. At this time, the request transfer area will assign the operation request to any other border agent (for example, border agent 3) except the border agent 1, so as to initiate the operation request to the first application through the cross-border agent mode. Since the border agent 3 corresponds to the data center 3, and the data center 3 corresponds to the gateway 3, the border agent 3 will forward the received operation request to the gateway 3. Here, the gateway 3 is the first gateway, and the data center 3 is the first data center. In response to the operation request, the first gateway determines that the first application is still deployed on the data center 1 (that is, the second data center) through the application metadata. In this case, there will be inconsistencies between the first data center and the second data center. At this time, gateway 3 (i.e., the first gateway) needs to forward the operation request to gateway 1 (i.e., the second gateway) to forward the operation request to data center 1 (the second data center) through gateway 1, so that the second data center can perform the operation requested by the operation request for the first application.
[0099] In some embodiments, Figure 4In step 103 shown, "sending the operation request to the second data center through the second gateway corresponding to the second data center" can be implemented in the following manner.
[0100] Determine the second gateway corresponding to the second data center; send an operation request to the second gateway, so that the second gateway determines the second application routing address corresponding to the first application based on the second center identifier and application identifier of the second data center, and sends the operation request to the second application routing address; wherein the second application routing address is the interface address assigned by the second data center to the first application.
[0101] In actual implementation, a routing address mapping table is pre-configured. When each gateway receives an operation request, it can determine the application routing address corresponding to the first application through the routing address mapping table. The application routing address is the interface address assigned to the application by the data center. The application routing address can ensure that the application is correctly accessed in the data center. The application routing address can be a private IP address or a public IP address, depending on whether the application is only used within the data center or needs to be provided to the outside. If the application needs to be accessed from outside the data center, it is usually assigned a public IP address. In order for the application to receive and send data, corresponding routing configuration needs to be performed in the data center network to ensure that the data can be correctly forwarded to the application according to the application routing address corresponding to the application.
[0102] As an example, referring to Table 3, the routing address mapping table configures the mapping relationship between the application identifier, the incoming domain name, the application routing address, and the center identifier.
[0103] Table 3
[0104]
[0105] In Table 3, application A is taken as an example. The incoming domain name corresponding to application A is A.xxx.com. When application A belongs to data center 1, the application routing address corresponding to application A is 1.1.1.11.8080; when application A belongs to data center 2, the application routing address corresponding to application A is 2.1.1.21.8080.
[0106] In actual implementation, when the first gateway determines that the first data center and the second data center are inconsistent, the first gateway first determines the second gateway corresponding to the second data center where the first application is deployed, and forwards the operation request to the second gateway. In response to the operation request, the second gateway obtains the routing address mapping table, searches the routing address mapping table based on the application identifier carried in the operation request and the second center identifier corresponding to the second data center, obtains the application routing address corresponding to the application identifier and the second center identifier, and uses the application routing address as the second application routing address corresponding to the first application. The second gateway forwards the operation request to the second application routing address, so that the operation request can be sent to the first application deployed in the second data center.
[0107] In some embodiments, Figure 4 After step 102 is performed, step 104 may be performed.
[0108] In step 104, when the first data center is consistent with the second data center, an operation request is sent to the first data center, so that the first data center performs the operation requested by the operation request for the first application.
[0109] In actual implementation, if the first data center is consistent with the second data center, it indicates that access to the first application is in normal state. At this time, the first gateway can directly send the operation request to the first data center to perform the operation requested by the operation request on the first application.
[0110] As an example, application A is deployed on data center 1. When an operation request is initiated for application A, the request transfer area will assign the operation request to the border agent 1 corresponding to data center 1, and the border agent 1 will forward the operation request to the gateway 1 corresponding to data center 1. At this time, gateway 1 is the first gateway and data center 1 is the first data center. If gateway 1 determines that application A still belongs to data center 1 through the latest application metadata, then data center 1 is also the second data center, and gateway 1 is also the second gateway. In this case, gateway 1 can directly forward the operation request to data center 1, so that data center 1 performs the operation requested by the operation request for application A.
[0111] In some embodiments, "sending an operation request to the first data center" shown in step 104 may be implemented in the following manner.
[0112] Based on the first center identifier and the application identifier of the first data center, a first application routing address corresponding to the first application is determined; and based on the first application routing address, the operation request is sent to the first data center.
[0113] In actual implementation, the first application routing address is the interface address assigned by the first data center to the first application; the first gateway, in response to the operation request, obtains the routing address mapping table, searches the routing address mapping table based on the application identifier carried in the operation request and the first center identifier corresponding to the first data center, obtains the application routing address corresponding to the application identifier and the first center identifier, and uses the application routing address as the first application routing address corresponding to the first application. The first gateway forwards the operation request to the first application routing address, and thus can send the operation request to the first application corresponding to the first data center.
[0114] Through the above embodiment, a corresponding gateway is configured for each data center, and the gateway can send a request to the corresponding data center, or forward the request to the gateway of other data centers. In this way, the operation request for each application in the data center is isolated by the gateway. When the gateway receives an operation request that is not for an application in its corresponding data center, the operation request can be forwarded to the corresponding gateway to ensure the normal flow of the operation request. That is, when the first gateway receives an operation request for the first application, it responds to the operation request, determines the first data center corresponding to the first gateway itself, and determines the second data center currently corresponding to the first application through the application metadata of the first application. When the first data center and the second data center are inconsistent, the first gateway can forward the operation request to the second gateway corresponding to the second data center to which the first application belongs, so that the operation request can be accurately sent to the second data center through the second gateway. In this way, the operation request initiated for the first application can be sent normally and accurately to the data center currently corresponding to the first application in the case of application migration, etc., without the problem of interruption of the flow of the operation request, thereby improving the disaster recovery capability under abnormal conditions.
[0115] Below, the request processing method of the embodiment of the present application is described by taking the execution subject as the request transfer area as an example. Figure 5 , Figure 5 is a second flow chart of the request processing method provided in the embodiment of the present application, which will be combined with Figure 5 The steps shown are explained.
[0116] In step 201, in response to an operation request for a first application, a first edge agent corresponding to the first application is determined.
[0117] In actual implementation, since the border agent corresponding to each data center is deployed in the request transit area, when the request transit area receives incoming traffic from the external network, it is necessary to determine the border agent to which each operation request in the incoming traffic needs to flow, so as to allocate each operation request to the corresponding border agent.
[0118] In some embodiments, Figure 5 The illustrated step 201 can be implemented by following the steps 2011 to 2012 .
[0119] In step 2011, the application identifier carried in the operation request is obtained.
[0120] In actual implementation, the request transfer zone responds to the operation request for the first application, parses the operation request, and obtains the application identifier in the incoming domain name corresponding to the operation request.
[0121] In step 2012, a first proxy address is determined according to a first mapping table between application identifiers and proxy addresses and the application identifier, and a first border proxy is determined according to the first proxy address.
[0122] In the embodiment of the present application, a first mapping table is pre-configured for the request transfer area, and the first mapping table is configured with a mapping relationship between the application identifier of each application and the proxy address corresponding to each border proxy.
[0123] In some embodiments, the proxy address of the border proxy may be an IP address of the border proxy, such as a virtual IP (VIP) address.
[0124] In actual implementation, the request transfer zone can search the first proxy address corresponding to the application identifier carried in the operation request in the first mapping table based on the application identifier carried in the operation request, and the first proxy address points to the first border proxy. Then, the operation request is forwarded to the first proxy address.
[0125] In some embodiments, before the step of "determining the first proxy address according to the first mapping table between the application identifier and the proxy address and the application identifier" in step 2012 is executed, the first mapping table may be constructed or updated in the following manner.
[0126] Based on the application metadata of the first application, determine the first center identifier of the first data center; based on the second mapping table between the center identifier and the proxy address and the first center identifier, determine the first proxy address; establish a first mapping relationship between the application identifier of the first application and the first proxy address, and add the first mapping relationship to the first mapping table.
[0127] In the embodiment of the present application, when building a request processing system, after determining the correspondence between each data center and the border agent, a second mapping table can be constructed, which configures the mapping relationship between the center identifier of the data center and the agent address of the border agent. In some cases, in order to achieve load balancing, the border agent corresponding to the data center can allocate different agent addresses for different business areas of the data center, so that the border agent can handle the incoming traffic in a balanced manner.
[0128] As an example, referring to Table 4, the second mapping table may further configure a mapping relationship between a center identifier of a data center, a business area identifier of a business area, and a proxy address.
[0129] Table 4
[0130] Center Logo Business area logo Proxy Address Data Center 1 Area1 1.1.1.1 Data Center 1 Area2 1.2.1.1 Data Center 2 Area1 2.1.1.1 … … … Data Center N Area* n.*.1.1
[0131] In actual implementation, when the request transit area first receives an operation request for the first application, the mapping relationship corresponding to the application identifier of the first application does not exist in the first mapping table. At this time, the request transit area needs to parse the operation request received for the first time, obtain the application identifier carried by the operation request, and determine the first proxy address corresponding to the first application through the application metadata and the second mapping table, and then establish a first mapping relationship between the application identifier and the first proxy address, and update the first mapping relationship to the first mapping table.
[0132] Here, when the request transit area first receives an operation request for the first application, it can determine the first center identifier and the first business area identifier of the first data center where the first application is pre-deployed through the application metadata, and then, based on the first center identifier and the first business area identifier, query the second mapping table to obtain the first proxy address corresponding to the first center identifier and the first business area identifier, and the first boundary proxy pointed to by the first proxy address is the boundary proxy corresponding to the first data center.
[0133] In the embodiment of the present application, after the request transfer zone adds the first mapping relationship corresponding to the application identifier of the first application in the first mapping table, when the operation request for the first application is subsequently received, the first boundary agent corresponding to the first application can be directly determined through the first mapping table, and the operation request can be directly assigned to the first agent address of the first boundary agent. In this way, the number of resolutions of the request transfer zone can be reduced, and the load of the request transfer zone can be reduced. When the incoming traffic is large, only the first operation request for a certain application in the incoming traffic needs to be resolved. The above-mentioned resolution process is sufficient, and for other operation requests, the boundary agent to be allocated can be directly determined through the first mapping table, which reduces the time consumption of the request transfer zone resolution and reduces the resolution pressure of the request transfer zone.
[0134] As an example, referring to Table 5(a), the first mapping table may be configured with a mapping relationship between an application identifier and a proxy address.
[0135] Table 5(a)
[0136]
[0137] In some embodiments, a fourth-level domain name may also be constructed for each application, where the fourth-level domain name includes an identifier of a data center where the application is deployed and a business area of the business area.
[0138] As an example, if application A is deployed in business area 1 (business area identifier is Area1) of data center 1 (center identifier is IDC1), then in the application metadata, application A corresponds to the center identifier "IDC1" and the business area identifier "Area1". Then the fourth-level domain name corresponding to application A can be: Area1.IDC1.xxx.com. When the request transfer area responds to an operation request for application A, it can record the incoming domain name "A.xxx.com" corresponding to the operation request as the fourth-level domain name "Area1.IDC1.xxx.com".
[0139] In order to improve the accuracy of determining the proxy address corresponding to the first application through the first mapping table, the fourth-level domain name corresponding to the application can be added to the first mapping table. As an example, referring to Table 5(b), the first mapping table can also be configured as a mapping relationship between the application identifier, the fourth-level domain name, and the proxy address.
[0140] Table 5(b)
[0141]
[0142] The request transit area responds to the operation request for the first application. After determining the data center where the first application is currently deployed and the business area in the data center through the application metadata, the incoming domain name of the first application can be converted into a fourth-level domain name, and based on the fourth-level domain name and the application identifier carried in the operation request, the proxy address of the border agent corresponding to the first application is searched from the first mapping table shown in Table 5(b).
[0143] In actual implementation, due to the migration of applications between different data centers, modification of the correspondence between data centers and edge agents, etc., the request transfer area can update the first mapping table based on the application metadata and the second mapping table.
[0144] In some embodiments, the first mapping table can be updated in the following manner: when the first mapping relationship is invalid, the first mapping relationship is deleted from the first mapping table, and a second mapping relationship is established between the application identifier of the first application and the second proxy address, where the second proxy address corresponds to the second data center; the second mapping relationship is added to the first mapping table.
[0145] Here, the invalidity of the first mapping relationship can be understood as that when an operation request for the first application is received, if the operation request is transmitted through the first mapping relationship, a cross-gateway or cross-border proxy situation may occur. In this case, it means that the first application has been migrated in the data center, or the corresponding relationship between the data center and the border agent has been adjusted.
[0146] In some embodiments, the invalidity of the first mapping relationship can be determined in the following manner: when the first data center corresponding to the first gateway is inconsistent with the second data center to which the first application belongs, the first mapping relationship is determined to be invalid; or when the second mapping table indicates that the proxy address corresponding to the first center identifier is updated from the first proxy address to the second proxy address, the first mapping relationship is determined to be invalid.
[0147] In actual implementation, the second mapping table is configured with the mapping relationship between the central identifier of the data center and the proxy address of the border agent corresponding to the data center, and the second mapping table is adjusted according to the configuration between the data center and the border agent. If the administrator of the request processing system actively modifies the correspondence between the data center and the border agent due to business needs, and also updates the second mapping table according to the modified correspondence, the request transfer area determines that the second mapping table has been updated by detecting the status of the second mapping table, that is, when it is detected that the second mapping table indicates that the proxy address corresponding to the first central identifier has been updated from the first proxy address to the second proxy address, it can be determined that the first mapping relationship is invalid.
[0148] In the event that it is determined that the first mapping relationship is invalid by detecting that the second mapping table indicates that the proxy address corresponding to the first center identifier is updated from the first proxy address to the second proxy address, the first mapping table can be updated in the following manner: in response to the second mapping table indicating that the proxy address corresponding to the first center identifier is updated from the first proxy address to the second proxy address, the first mapping relationship in the first mapping table is canceled (i.e., the first mapping relationship is deleted from the first mapping table); a second mapping relationship between the application identifier of the first application and the second proxy address is established, and the second mapping relationship is added to the first mapping table.
[0149] In actual implementation, the first mapping relationship configures the mapping relationship between the first application and the first proxy address. Therefore, after receiving the operation request for the first application, according to the first mapping relationship, the operation request will be directly sent to the first border agent of the first proxy address for processing, and then the first border agent will send the operation request to the first gateway, and then send it to the first data center through the first gateway. However, if the first application has been migrated from the first data center to the second data center at this time, when the operation request is transmitted through the first mapping relationship, the first gateway can determine through the application metadata that the first application currently belongs to the second data center, and the first gateway will send the operation request to the second gateway corresponding to the second data center, and the second gateway will send the operation request to the second data center. In other words, the flow process of the operation request has a cross-gateway situation, which confirms that the first data center corresponding to the first gateway and the second data center to which the first application belongs are inconsistent. At this time, it can also be confirmed that the first mapping relationship is invalid.
[0150] In some embodiments, the first mapping table can also be updated in the following manner: in response to the inconsistency between the first data center corresponding to the first gateway and the second data center to which the first application belongs, cancel the first mapping relationship in the first mapping table (i.e., delete the first mapping relationship from the first mapping table); establish a second mapping relationship between the application identifier of the first application and the proxy address of the second border agent corresponding to the second data center, and update the second mapping relationship to the first mapping table.
[0151] Based on the application metadata and the second mapping table, the proxy address corresponding to the application identifier is detected to obtain a verification detection result; if the verification detection result indicates that the proxy address corresponding to the application identifier determined by the application metadata and the proxy address mapping table is inconsistent with the first proxy address, an update prompt for the first mapping table is generated.
[0152] In other cases, if the correspondence between the data center and the border agent has not been updated, that is, if the second mapping table has not been detected to be updated, if the application has been migrated, that is, if it is determined that the first data center corresponding to the first gateway is inconsistent with the second data center to which the first application belongs, for example, application A is migrated from data center 1 to data center 2, then the operation request for application A must also be forwarded through the border agent corresponding to data center 2. Therefore, the request transfer area can detect the border agent corresponding to the first application based on the application metadata and the second mapping table, and when it is detected that the border agent corresponding to the first application has changed, the first mapping table is updated to correspond the application identifier of the first application in the first mapping table to the proxy address of the second border agent of the second data center.
[0153] As an example, if the first application is pre-deployed in the first data center, in the first mapping table, the application identifier corresponding to the first application has a first mapping relationship with the first proxy address of the first border agent corresponding to the first data center. In the process of business development, due to business needs, the first application is migrated from the first data center to the second data center. At this time, the center identifier corresponding to the application identifier corresponding to the first application in the application metadata is updated from the first center identifier to the second center identifier of the second data center. In this case, the request transit area performs a proxy address detection based on the application metadata and the second mapping table, and the obtained verification detection result indicates that the application identifier corresponding to the first application determined by the application metadata and the second mapping table corresponds to the second proxy address, and at this time, in the first mapping table, the application identifier corresponding to the first application still corresponds to the first proxy address, and the proxy addresses corresponding to the application identifiers in the two mapping tables are inconsistent, then the first mapping relationship in the first mapping table is canceled, and the second mapping relationship between the application identifier of the first application and the proxy address of the second border agent of the second data center is re-established, and the second mapping relationship is updated to the first mapping table to complete the update of the first mapping table.
[0154] If the request transfer area cannot actively update the first mapping table, the request transfer area may generate an update prompt for the first mapping table, and send the update prompt to the terminal where the administrator is located to prompt the administrator to update the first mapping table.
[0155] Through the above-mentioned embodiment, by constructing the first mapping table and the second mapping table, it is possible to achieve unified management of incoming traffic through the request transfer area in the request processing system, and allocate each operation request in the incoming traffic to the corresponding border agent, solving the problems of chaotic domain name configuration for incoming traffic and unclear operation request flow link in the related technology, and reducing the scenario of operation requests crossing border agents. In addition, when a large number of applications are migrated, the embodiment of the present application only needs to update the application metadata and the first mapping table to complete the migration at the application level and the agent level, which speeds up the migration speed and shortens the application migration period.
[0156] Continue reading Figure 5 , and the description will continue with the above step 201.
[0157] In step 202, when the first border agent is normal, an operation request is sent to the first border agent, and the operation request is forwarded to the first gateway through the first border agent, so that the first gateway responds to the operation request, and when it is determined that the first data center corresponding to the first gateway is inconsistent with the second data center to which the first application belongs, the operation request is sent to the second data center through the second gateway corresponding to the second data center, so that the second data center performs the operation indicated by the operation request on the first application.
[0158] In the embodiment of the present application, if the application is deployed and migrated in the data center, after the application metadata is updated according to the migration situation, it indicates that the application level switch is completed. After the application metadata is updated and the first mapping table is also updated, it indicates that the application level and the proxy level switch are completed.
[0159] In some cases, if the first application is migrated, for example, from the first data center (data center 1) to the second data center (data center 2), then after the application metadata is updated, the update of the first mapping table usually takes a certain amount of time. Therefore, the period in which the application metadata has been updated but the first mapping table has not been updated can be regarded as the application migration period. If the request transfer area receives an operation request for the first application during this application migration period, the request transfer area will still determine the first proxy address corresponding to the application identifier according to the unupdated first mapping table, thereby sending the operation request to the first boundary agent pointed to by the first proxy address, and the first boundary agent will forward the operation request to the first gateway corresponding to the first data center. At this time, the first gateway responds to the operation request, obtains the latest application metadata, and determines the second data center (data center 2) where the first application is currently deployed. At this time, the first data center (data center 1) and the second data center (data center 2) corresponding to the first gateway are inconsistent, then the first gateway forwards the operation request to the second gateway corresponding to the second data center, and sends the operation request to the second data center via the second gateway.
[0160] As an example, Figure 6 This is a first flow diagram of an operation request provided in an embodiment of the present application, see Figure 6 , application A is pre-deployed in business area 1 of data center 1. If the request transit area receives an operation request for application A, in response to the operation request, the application identifier of application A is determined by the incoming domain name corresponding to the operation request, and the proxy address (1.1.1.1) of the border proxy corresponding to data center 1 corresponding to the application identifier is determined by searching in the first mapping table based on the application identifier. Then, the request transit area sends the operation request to the border proxy with the proxy address 1.1.1.1, and the border proxy sends the operation request to the gateway (1.1.1.2) through which the gateway responds to the operation request. The latest application metadata determines that application A is currently deployed in data center 2, so the gateway (1.1.1.2) forwards the operation request to the gateway (2.1.1.2) corresponding to data center 2. The gateway (2.1.1.2) can determine the application routing address (2.1.1.21:8080) corresponding to application A when it is deployed in data center 2 based on the routing address mapping table. Then, the gateway (2.1.1.2) forwards the operation request to the application routing address (2.1.1.21:8080), thus completing the process of sending the operation request of application A to data center 2.
[0161] In some embodiments, the description proceeds to step 201. Figure 5 After step 201 is executed, step 203 may be executed.
[0162] In step 203, when the first border agent is abnormal, a third border agent is determined from the candidate border agents according to the priority parameters of the candidate border agents, and the operation request is forwarded by using the third border agent.
[0163] In some embodiments, "using a third border agent to forward the operation request" in step 203 can be implemented in the following manner: sending an operation request to a third border agent in a third data center, and forwarding the operation request to a third gateway in the third data center through the third border agent, so that the third gateway responds to the operation request, and when it determines that the third data center is inconsistent with the second data center, sends the operation request to the second data center through a second gateway corresponding to the second data center, so that the second data center performs the operation indicated by the operation request on the first application.
[0164] In other cases, the first application is not migrated, but an abnormality occurs in the border proxy corresponding to the data center where the first application is deployed. At this time, the operation request initiated by the user for the first application can be forwarded across the border proxy to the data center where the first application is deployed.
[0165] As an example, if the request transit zone responds to an operation request for the first application, and determines through the first mapping table that the proxy address corresponding to the application identifier is the first proxy address of the first border agent, but the first border agent is in an abnormal state at this time, the request transit zone can assign the operation request to a third border agent other than the first border agent, and forward the operation request to the third gateway corresponding to the third border agent through the third border agent. Here, the third border agent and the third gateway both correspond to the third data center. The third gateway responds to the operation request, obtains the latest application metadata, and determines the second data center where the first application is deployed through the application metadata. When it is determined that the second data center and the third data center are inconsistent, the third gateway forwards the operation request to the second gateway corresponding to the second data center, so as to forward the operation request to the second data center through the second gateway.
[0166] Through the above embodiment, the request transfer area responds to the operation request for the first application, determines the first border agent corresponding to the first application, and when the first border agent is normal, allocates the operation request to the corresponding first border agent, and forwards the operation request to the first gateway through the first border agent, so that when the first gateway receives the operation request for the first application, it responds to the operation request, determines the first data center corresponding to the first gateway itself, and determines the second data center where the first application is currently deployed through the application identifier carried in the operation request. When the first application migrates or sends an operation request across the border agent, resulting in inconsistency between the first data center and the second data center, the first gateway can forward the operation request to the second gateway corresponding to the second data center where the first application is deployed, so that the operation request can be accurately sent to the second data center through the second gateway. In this way, the operation request initiated for the first application can be normally and accurately sent to the data center where the first application is currently deployed in the case of application migration or cross-agent request, without the problem of interruption of the flow of the operation request, thereby improving the disaster recovery capability in abnormal situations.
[0167] In some embodiments, "determining a third border agent from the candidate border agents based on the priority parameters of the candidate border agents" in step 203 can be achieved in the following way: for each candidate border agent among multiple candidate border agents, determining the priority parameter of the candidate border agent; a data processing model predicts the priority of the selected candidate border agent based on the priority parameter; and determining the selected candidate border agent whose priority is higher than the preset priority as the third border agent.
[0168] The priority parameter used to influence the selection priority of each candidate border agent may include at least one of the following: hardware processing resource margin and concurrent request processing volume of the candidate border agent.
[0169] In actual implementation, after determining that the first border agent is abnormal, any candidate border agent other than the first border agent can be used to implement cross-border agent forwarding of the operation request. If there are multiple candidate border agents, a suitable candidate border agent can be selected as the third border agent based on the hardware processing resource margins and concurrent request processing volume of the multiple candidate border agents.
[0170] As an example, when forwarding processing requests, the border agent may be affected by the following factors: the hardware resources of the border agent (such as CPU, memory, network bandwidth, etc.). When the number of requests from the border agent exceeds the processing capacity of the proxy server hardware, a performance bottleneck will occur; the threshold of the preset concurrent request processing volume of the border agent. Exceeding this threshold may cause new requests to be rejected or delayed. Therefore, in the embodiment of the present application, the influencing parameters that can affect the selection priority of each fourth border agent may include at least one of the hardware processing resource margin and the concurrent request processing volume of the fourth border agent.
[0171] The current hardware processing resource margin and concurrent request processing volume of each candidate border agent are obtained, and the selection priority of each candidate border agent is predicted through a pre-trained data processing model to obtain the priority of each candidate border agent. Among them, the principle of prediction through the data processing model can be that the larger the hardware processing resource margin and the smaller the concurrent request processing volume, the higher the selected priority. Then, according to the selected priority of each data processing model, the candidate border agents whose selected priority is higher than the preset priority are screened out, and the third border agent is determined among the screened candidate border agents. Exemplarily, any candidate border agent among the screened candidate border agents can be selected as the third border agent, or the candidate border agent with the highest selected priority among the screened candidate border agents can be selected as the third border agent.
[0172] By selecting the third edge proxy in the above manner, it is possible to reduce the occurrence of request timeouts, the third edge proxy rejecting new request processing, and the increase in processing time of operation requests resulting in slow response speed, thereby improving the processing rate of operation requests for the first application.
[0173] In a specific embodiment, the request processing system may include a first gateway of a first data center, a second gateway of a second data center, and a request transit area, wherein the request transit area is configured with a first edge agent of the first data center.
[0174] The request transfer area is used to respond to an operation request for a first application, determine the first data center where the first application is pre-deployed, and the first border agent corresponding to the first data center, and when the first border agent is normal, send the operation request to the first border agent, and forward the operation request to the first gateway through the first border agent; the first gateway is used to respond to the operation request, and when it is determined that the first data center is inconsistent with the second data center where the first application is currently deployed, send the operation request to the second gateway; the second gateway is used to send the operation request to the second data center.
[0175] In actual application, the request transfer area can be built based on the network isolation Demilitarized Zone (DMZ) technology, and multiple border agents can be built in the request transfer area. The data center is built through the Internet Data Center (IDC), and the corresponding gateway is configured for each data center.
[0176] As an example, Figure 7 Schematic diagram of a link for operation requests based on multiple data centers provided in an embodiment of the present application. Figure 7 , a user can initiate an operation request for the first application (e.g., application A) through the incoming domain name (A.xxx.com) corresponding to the first application (e.g., application A) in the external network, request the transit zone to respond to the operation request for the first application (e.g., application A), determine the center identifier (e.g., data center 1) of the data center corresponding to the first application (e.g., application A) based on the application metadata, and then convert the incoming domain name into a fourth-level domain name (Area1.idc1.xxx.com), determine the first proxy address (e.g., 1.1.1.1) of the first boundary proxy in the first mapping table shown in Table 5(b) based on the application identifier in the incoming domain name corresponding to the operation request and the fourth-level domain name, request the transit zone to forward the operation request to the first gateway (1.xxx), and when the first gateway determines that the data center where the first application is deployed and the data center corresponding to it are both data centers with the center identifier of data center 1, forward the operation request to data center 1.
[0177] As an example, continue to see Figure 7 In the process of requesting the fourth-level domain name in the transit zone to point to the proxy address through the dotted line, it can be achieved by modifying or updating the first mapping table or the second mapping table. This belongs to the switching at the proxy level. In the gateway part, the gateway can forward the operation request to other gateways through the dotted line to ensure that the link of the operation request is not interrupted.
[0178] As an example, Figure 8 : is a second flow diagram of an operation request provided in an embodiment of the present application. In the request processing system of an embodiment of the present application, the flow link of the operation request in the system includes: Figure 8 Four situations are shown.
[0179] Specifically, Figure 8 Take application A in the example as an example. Application A is deployed in data center IDC1, and the corresponding business area is Area1. Based on the request processing process of application A, if application C is deployed in data center IDC2, the corresponding business area is Area2, and the request processing process of application C can be verified in the same way.
[0180] In scenario 1, see Figure 8In Figure (a), application A is currently deployed in Area1 of data center IDC1. The incoming domain name of application A is recorded as the fourth-level domain name Area1.idc1.xxx.com. The incoming traffic corresponding to the operation request of application A is forwarded to the gateway (1.1.1.2) through the border proxy (1.1.1.1) in the request transit area, and then forwarded to the data center IDC1 by the gateway (1.1.1.2). In this scenario, the flow link of the incoming traffic is completely on the line built for data center IDC1.
[0181] In scenario 2, see Figure 8 In Figure (b), application A has been migrated from data center IDC1 to data center IDC2, but the first mapping table has not been updated at this time. The incoming traffic corresponding to the operation request of application A is forwarded to gateway (1.1.1.2) through the border proxy (1.1.1.1) in the request transfer area, and then forwarded by gateway (1.1.1.2) to gateway (2.1.1.2), and then forwarded to data center IDC2 through gateway (2.1.1.2). This scenario is a traffic link situation where the switch is completed at the application level, but the switch is not completed at the proxy level.
[0182] In scenario three, see Figure 8 In Figure (c), application A has not been migrated, but the border proxy (1.1.1.1) corresponding to data center IDC1 has an exception. Then the incoming traffic corresponding to the operation request of application A can cross the border proxy and be forwarded to gateway (2.1.1.2) through the border proxy, and then forwarded by gateway (2.1.1.2) to gateway (1.1.1.2), and then forwarded to data center IDC1 through gateway (1.1.1.2). This scenario shows the traffic link situation of the incoming process across the border proxy.
[0183] In scenario 4, see Figure 8 In Figure (d), application A has been migrated from data center IDC1 to data center IDC2, and the first mapping table has also been updated, that is, the proxy layer and the application layer have completed the switch. Then, the incoming traffic corresponding to the operation request of application A can request the border proxy (2.1.1.1) in the transit area to forward it to the gateway (2.1.1.2), and then forward it to data center IDC2 through the gateway (2.1.1.2). In this way, the complete link of the incoming traffic is converged from the line switching of data center IDC1 to the line of data center IDC2.
[0184] In the embodiment of the present application, the request processing system, whether it is a request transfer area or a gateway, has its routing configuration configured in advance, such as the above-mentioned first mapping table, second mapping table, application metadata, and routing address mapping table. When the subsequent application is migrated, the routing configuration does not need to be adjusted, and only the various tables need to be updated in time, which reduces manual operations and shortens the application migration time. In addition, when the data center is disabled, if a large number of applications are migrated, at the proxy level, only the first mapping table needs to be updated, and based on the first mapping table, the operation request for the migrated application can be parsed once. This method reduces the pressure on the request transfer area and shortens the parsing time. As for the application, it is only necessary to perform relevant routing configuration when adding a new application, and there is no need to make configuration adjustments later.
[0185] Moreover, through the above-mentioned embodiment, after the application is migrated, the migration of the application layer and the proxy layer can be completed in time by managing and updating the mapping table, so as to realize the smooth switching of the incoming traffic without the user as the requesting party being aware, and ensure that the entire traffic link is in the line of the same data center as quickly as possible, thus reducing the occurrence of cross-data center and traffic cross-access. By configuring the first mapping table, the second mapping table, the application metadata, and the routing address mapping table, it can also be applied to the horizontal expansion of the subsequent data center and the internal network division of the data center business area.
[0186] The following further describes an exemplary structure of the request processing device 455A provided in the embodiment of the present application implemented as a software module. In some embodiments, Figure 3A As shown, the software modules stored in the request processing device 455A of the memory 440 may include:
[0187] The acquisition module 4551 is used to respond to an operation request for the first application and acquire an application identifier carried in the operation request.
[0188] The determination module 4552 is used to determine the first data center corresponding to the first gateway, and determine the second data center corresponding to the first application based on the application identifier.
[0189] The gateway sending module 4553 is used to send the operation request to the second data center through the second gateway corresponding to the second data center if the first data center is inconsistent with the second data center, so that the second data center performs the operation indicated by the operation request on the first application.
[0190] In some embodiments, the request processing device 455A also includes a second sending module, which is used to send an operation request to the first data center when the first data center is consistent with the second data center, so that the first data center performs the operation requested by the operation request for the first application.
[0191] In some embodiments, the second sending module is further used to determine a first application routing address corresponding to the first application based on the first center identifier and application identifier of the first data center; and send the operation request to the first data center based on the first application routing address.
[0192] In some embodiments, the gateway sending module 4553 is also used to determine the second gateway corresponding to the second data center; send an operation request to the second gateway so that the second gateway determines the second application routing address corresponding to the first application based on the second center identifier and application identifier of the second data center, and sends the operation request to the second application routing address; wherein the second application routing address is the interface address assigned by the second data center to the first application.
[0193] The following further describes an exemplary structure of the request processing device 455B provided in the embodiment of the present application implemented as a software module. In some embodiments, for example Figure 3B As shown, the software modules stored in the request processing device 455B of the memory 440 may include:
[0194] The proxy determination module 4554 is used to determine a first edge proxy corresponding to the first application in response to an operation request for the first application.
[0195] The agent sending module 4555 is used to send an operation request to the first border agent when the first border agent is normal, and forward the operation request to the first gateway through the first border agent, so that the first gateway responds to the operation request. When it is determined that the first data center corresponding to the first gateway is inconsistent with the second data center corresponding to the first application, the operation request is sent to the second data center through the second gateway corresponding to the second data center, so that the second data center performs the operation indicated by the operation request on the first application.
[0196] In some embodiments, the proxy determination module 4554 is further used to obtain an application identifier carried in the operation request; determine the first proxy address according to a first mapping table between the application identifier and the proxy address and the application identifier, and determine the first border proxy according to the first proxy address.
[0197] In some embodiments, the request processing device 455B also includes a first update module, which is used to determine the first center identifier of the first data center based on the application metadata of the first application; determine the first proxy address based on the second mapping table of the center identifier and the proxy address and the first center identifier; establish a first mapping relationship between the application identifier of the first application and the first proxy address, and add the first mapping relationship to the first mapping table.
[0198] In some embodiments, the first update module is also used to delete the first mapping relationship from the first mapping table when the first mapping relationship is invalid, and establish a second mapping relationship between the application identifier of the first application and the second proxy address, where the second proxy address corresponds to the second data center; and add the second mapping relationship to the first mapping table.
[0199] In some embodiments, the first update module is also used to determine that the first mapping relationship is invalid when the first data center corresponding to the first gateway is inconsistent with the second data center to which the first application belongs; or to determine that the first mapping relationship is invalid when the second mapping table indicates that the proxy address corresponding to the first center identifier is updated from the first proxy address to the second proxy address.
[0200] In some embodiments, the request processing device 455B also includes a fourth sending module, which is used to determine a third border agent from the candidate border agents according to the priority parameters of the candidate border agents when the first border agent is abnormal, and use the third border agent to forward the operation request.
[0201] In some embodiments, the fourth sending module is also used to send an operation request to the third border agent of the third data center if the first border agent is abnormal, and forward the operation request to the third gateway of the third data center through the third border agent, so that the third gateway responds to the operation request, and when it determines that the third data center is inconsistent with the second data center, the operation request is sent to the second data center through the second gateway corresponding to the second data center, so that the second data center performs the operation indicated by the operation request on the first application.
[0202] In some embodiments, the fourth sending module is also used to determine the priority parameter of the candidate border agent for each candidate border agent among multiple candidate border agents; the data processing model predicts the priority of the selected candidate border agent based on the priority parameter; and the selected candidate border agent whose priority is higher than the preset priority is determined as the third border agent.
[0203] The embodiment of the present application provides a computer program product, which includes a computer program or a computer executable instruction, and the computer program or the computer executable instruction is stored in a computer-readable storage medium. The processor of the electronic device reads the computer executable instruction from the computer-readable storage medium, and the processor executes the computer executable instruction, so that the electronic device executes the request processing method described in the embodiment of the present application.
[0204] The present application embodiment provides a computer-readable storage medium in which computer executable instructions or computer programs are stored. When the computer executable instructions or computer programs are executed by a processor, the processor will execute the request processing method provided by the present application embodiment, for example, Figure 4 The request processing method is shown.
[0205] In some embodiments, the computer-readable storage medium may be a memory such as RAM, ROM, flash memory, magnetic surface memory, optical disk, or CD-ROM; or may be various devices including one or any combination of the above memories.
[0206] In some embodiments, computer executable instructions may be in the form of a program, software, software module, script or code, written in any form of programming language (including compiled or interpreted languages, or declarative or procedural languages), and may be deployed in any form, including as a stand-alone program or as a module, component, subroutine or other unit suitable for use in a computing environment.
[0207] As an example, computer-executable instructions may, but need not, correspond to a file in a file system, may be stored as part of a file that stores other programs or data, such as in one or more scripts in a HyperText Markup Language (HTML) document, in a single file dedicated to the program in question, or in multiple coordinated files (e.g., files storing one or more modules, subroutines, or code portions).
[0208] As an example, computer executable instructions may be deployed to be executed on one electronic device, or on multiple electronic devices located at one site, or on multiple electronic devices distributed at multiple sites and interconnected by a communication network.
[0209] In summary, through the embodiment of the present application, a corresponding gateway is configured for each data center, and the gateway can send a request to the corresponding data center, or forward the request to the gateway of other data centers. In this way, the operation request for each application in the data center is isolated by the gateway. When the gateway receives an operation request that is not for an application in its corresponding data center, the operation request can be forwarded to the corresponding gateway to ensure the normal flow of the operation request. That is to say, when the first gateway receives an operation request for the first application, it responds to the operation request, determines the first data center corresponding to the first gateway itself, and determines the second data center currently corresponding to the first application through the application identifier carried in the operation request. When the first data center and the second data center are inconsistent, the first gateway can forward the operation request to the second gateway corresponding to the second data center corresponding to the first application, so that the operation request can be accurately sent to the second data center through the second gateway. In this way, the operation request initiated for the first application can be sent normally and accurately to the data center currently corresponding to the first application in the case of application migration, etc., without the problem of link interruption of the operation request, thereby improving the disaster recovery capability under abnormal conditions.
[0210] The request processing system of the embodiment of the present application, whether it is a request transfer area or a gateway, has its routing configuration configured in advance, such as the first mapping table, the second mapping table, the application metadata, and the routing address mapping table mentioned above. When the subsequent application is migrated, the routing configuration does not need to be adjusted, and only the various tables need to be updated in time, which reduces manual operations and shortens the application migration time. In addition, when the data center is disabled, if a large number of applications are migrated, at the proxy level, only the first mapping table needs to be updated, and based on the first mapping table, the operation request for the migrated application can be parsed once. This method reduces the pressure on the request transfer area and shortens the parsing time. For the application, it is only necessary to perform relevant routing configuration when adding a new application, and no configuration adjustment is required later. In addition, after the application is migrated, the migration of the application level and the proxy level can be completed in time by managing and updating the mapping table, so as to achieve smooth switching of the incoming traffic and the user as the requester is not aware of it, ensuring that the entire traffic link is in the line of the same data center as quickly as possible, reducing the occurrence of cross-data center and traffic cross-access. By configuring the first mapping table, the second mapping table, the application metadata, and the routing address mapping table, it can also be applied to the subsequent horizontal expansion of the data center and the internal network of the data center to divide the business area.
[0211] The above is only an embodiment of the present application and is not intended to limit the protection scope of the present application. Any modifications, equivalent substitutions and improvements made within the spirit and scope of the present application are included in the protection scope of the present application.
Claims
1. A request processing method, characterized in that: Applied to a first gateway; the method comprises: In response to an operation request for a first application, obtaining an application identifier carried in the operation request; Determine a first data center corresponding to the first gateway, and determine a second data center corresponding to the first application based on the application identifier; If the first data center is inconsistent with the second data center, the operation request is sent to the second data center through a second gateway corresponding to the second data center, so that the second data center performs the operation indicated by the operation request on the first application.
2. The method according to claim 1, characterized in that The method further comprises: In a case where the first data center is consistent with the second data center, the operation request is sent to the first data center, so that the first data center performs the operation requested by the operation request on the first application.
3. A request processing method, characterized in that: Applied to the request transfer area; the method comprises: In response to an operation request for a first application, determining a first border agent corresponding to the first application; When the first border agent is normal, the operation request is sent to the first border agent, and the operation request is forwarded to the first gateway through the first border agent, so that the first gateway responds to the operation request, and when it is determined that the first data center corresponding to the first gateway is inconsistent with the second data center corresponding to the first application, the operation request is sent to the second data center through the second gateway corresponding to the second data center, so that the second data center performs the operation indicated by the operation request on the first application.
4. The method according to claim 3, characterized in that The determining a first border agent corresponding to the first application includes: Obtaining an application identifier carried in the operation request; A first proxy address is determined according to a first mapping table of application identifiers and proxy addresses and the application identifier, and a first border proxy is determined according to the first proxy address.
5. The method according to claim 4, characterized in that Before determining the first proxy address according to the first mapping table between application identifiers and proxy addresses and the application identifier, the method further includes: Determining a first center identifier of the first data center based on application metadata of the first application; Determine a first proxy address based on a second mapping table of center identifiers and proxy addresses and the first center identifier; A first mapping relationship between the application identifier of the first application and the first proxy address is established, and the first mapping relationship is added to the first mapping table.
6. The method according to claim 5, characterized in that The method further comprises: In the case where the first mapping relationship is invalid, deleting the first mapping relationship from the first mapping table, and establishing a second mapping relationship between the application identifier of the first application and a second proxy address, where the second proxy address corresponds to the second data center; Add the second mapping relationship to the first mapping table.
7. The method according to claim 6, characterized in that The method further comprises: When a first data center corresponding to the first gateway is inconsistent with a second data center to which the first application belongs, determining that the first mapping relationship is invalid; Alternatively, when the second mapping table indicates that the proxy address corresponding to the first center identifier is updated from the first proxy address to the second proxy address, it is determined that the first mapping relationship is invalid.
8. The method according to claim 3, characterized in that The method further comprises: In the case that the first border agent is abnormal, a third border agent is determined from the candidate border agents according to the priority parameters of the candidate border agents, and the operation request is forwarded by using the third border agent.
9. A request processing device, characterized in that: Set at the first gateway; the device includes: an acquisition module, configured to, in response to an operation request for a first application, acquire an application identifier carried in the operation request; a determination module, configured to determine a first data center corresponding to the first gateway, and determine a second data center corresponding to the first application based on the application identifier; The gateway sending module is used to send the operation request to the second data center through a second gateway corresponding to the second data center if the first data center is inconsistent with the second data center, so that the second data center performs the operation indicated by the operation request on the first application.
10. An electronic device, characterized in that: The electronic device comprises: A memory for storing computer executable instructions; A processor, configured to implement the method according to any one of claims 1 to 8 when executing the computer executable instructions stored in the memory.
Citation Information
Patent Citations
Request processing method and device, storage medium and electronic equipment
CN115766872A
Access request processing method and device
CN116471325A
Disaster recovery switching method and device for data connection
CN117667516A
Disaster recovery system and data processing method based on disaster recovery system
CN117857305A
Access processing method and device, electronic equipment and storage medium
CN117955815A