CN112199176A - Service processing method, device and related equipment - Google Patents
Service processing method, device and related equipment Download PDFInfo
- Publication number
- CN112199176A CN112199176A CN202011111539.6A CN202011111539A CN112199176A CN 112199176 A CN112199176 A CN 112199176A CN 202011111539 A CN202011111539 A CN 202011111539A CN 112199176 A CN112199176 A CN 112199176A
- Authority
- CN
- China
- Prior art keywords
- service
- node
- scheduling
- service request
- cluster
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Granted
Links
- 238000003672 processing method Methods 0.000 title claims abstract description 34
- 238000012545 processing Methods 0.000 claims abstract description 56
- 238000000034 method Methods 0.000 claims description 22
- 239000000725 suspension Substances 0.000 claims description 11
- 238000004364 calculation method Methods 0.000 claims description 10
- 238000004590 computer program Methods 0.000 claims description 10
- 230000009286 beneficial effect Effects 0.000 abstract description 4
- 238000007726 management method Methods 0.000 description 20
- 230000006870 function Effects 0.000 description 10
- 230000008569 process Effects 0.000 description 9
- 230000008859 change Effects 0.000 description 6
- 238000010586 diagram Methods 0.000 description 6
- 238000005457 optimization Methods 0.000 description 3
- 230000002159 abnormal effect Effects 0.000 description 2
- 238000004422 calculation algorithm Methods 0.000 description 2
- 238000013461 design Methods 0.000 description 2
- 238000012986 modification Methods 0.000 description 2
- 230000004048 modification Effects 0.000 description 2
- 238000010187 selection method Methods 0.000 description 2
- 238000013500 data storage Methods 0.000 description 1
- 238000012217 deletion Methods 0.000 description 1
- 230000037430 deletion Effects 0.000 description 1
- 238000005516 engineering process Methods 0.000 description 1
- 230000003287 optical effect Effects 0.000 description 1
- 230000000750 progressive effect Effects 0.000 description 1
- 238000011160 research Methods 0.000 description 1
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
- G06F9/46—Multiprogramming arrangements
- G06F9/48—Program initiating; Program switching, e.g. by interrupt
- G06F9/4806—Task transfer initiation or dispatching
- G06F9/4843—Task transfer initiation or dispatching by program, e.g. task dispatcher, supervisor, operating system
- G06F9/4881—Scheduling strategies for dispatcher, e.g. round robin, multi-level priority queues
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
- G06F9/44—Arrangements for executing specific programs
- G06F9/455—Emulation; Interpretation; Software simulation, e.g. virtualisation or emulation of application or operating system execution engines
- G06F9/45533—Hypervisors; Virtual machine monitors
- G06F9/45558—Hypervisor-specific management and integration aspects
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
- G06F9/46—Multiprogramming arrangements
- G06F9/50—Allocation of resources, e.g. of the central processing unit [CPU]
- G06F9/5061—Partitioning or combining of resources
- G06F9/5077—Logical partitioning of resources; Management or configuration of virtualized resources
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
- G06F9/46—Multiprogramming arrangements
- G06F9/50—Allocation of resources, e.g. of the central processing unit [CPU]
- G06F9/5083—Techniques for rebalancing the load in a distributed system
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L67/00—Network arrangements or protocols for supporting network services or applications
- H04L67/01—Protocols
- H04L67/10—Protocols in which an application is distributed across nodes in the network
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L67/00—Network arrangements or protocols for supporting network services or applications
- H04L67/50—Network services
- H04L67/60—Scheduling or organising the servicing of application requests, e.g. requests for application data transmissions using the analysis and optimisation of the required network resources
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
- G06F9/44—Arrangements for executing specific programs
- G06F9/455—Emulation; Interpretation; Software simulation, e.g. virtualisation or emulation of application or operating system execution engines
- G06F9/45533—Hypervisors; Virtual machine monitors
- G06F9/45558—Hypervisor-specific management and integration aspects
- G06F2009/4557—Distribution of virtual machine instances; Migration and load balancing
Landscapes
- Engineering & Computer Science (AREA)
- Software Systems (AREA)
- Theoretical Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Hardware Redundancy (AREA)
- Data Exchanges In Wide-Area Networks (AREA)
Abstract
The application discloses a service processing method, which comprises the steps that a scheduling node receives a service request; the scheduling node is any node in the distributed cluster; obtaining hash ring information of the distributed cluster; determining the position information of a target node corresponding to the service request according to the Hash ring information; forwarding the service request to the target node according to the position information for service processing; the service processing method can effectively improve the service processing efficiency, avoid service interruption, ensure user experience and improve the performance of a cluster system. The application also discloses a service processing device, equipment and a computer readable storage medium, which have the beneficial effects.
Description
Technical Field
The present application relates to the field of cloud computing technologies, and in particular, to a service processing method, a service processing apparatus, a device, and a computer-readable storage medium.
Background
The sheetlog is a distributed block storage file system emerging from an open source community, adopts a completely symmetrical structure, has no central node similar to metadata service, and provides storage service to the outside as a whole by means of interconnection of a large number of common PC (Personal Computer) servers through a network. The structural design of the sheetlog completely separated from the metadata determines that the work which can be done on the aspect of reading and writing optimization is limited, so that how to improve the performance on the premise of not increasing the management of the metadata is the key point of research.
For distributed storage, especially in a super-converged scenario where storage is provided in a sheetlog cluster, service flow access of a virtual machine typically includes: a Virtual Machine (VM) accesses a sheetlog storage service through a sheetlog private protocol, but the private protocol only contains IP list information of nodes providing the storage service in a sheetlog cluster, and when the VM really issues a service, the VM sends a service request to the nodes in the IP list so as to finish a read-write flow of the service; and when the nodes in the list fail to cause IP to be inaccessible or unresponsive, the sheetlog proprietary protocol is responsible for reselecting available nodes.
However, when providing virtual disk services for a VM, an IP list of a sheetlog node providing storage services at a back end needs to be specified in a sheetlog private protocol, if some nodes in the IP list fail, the list cannot be updated in time, and the only update path is to add a virtual disk again, which obviously results in that VM services are unavailable in the period; in addition, the VM cannot sense object location information of a VDI (Virtual Desktop Infrastructure) of a Virtual disk object, that is, any IO (Input/Output) of the VM, and cannot acquire location information of an object accessed by the IO through the sheetlog protocol, which easily causes the IO to be issued to a node of a non-storage access object, and then the IO is forwarded to a real storage node of the object by the node for IO, so that extra data forwarding and network calling are undoubtedly caused, which affects cluster performance, and service processing efficiency is also reduced.
Therefore, how to effectively improve the service processing efficiency, avoid service interruption, ensure user experience, and improve the performance of the cluster system is a problem that needs to be solved urgently by those skilled in the art.
Disclosure of Invention
The application aims to provide a service processing method which can effectively improve service processing efficiency, avoid service interruption, ensure user experience and improve cluster system performance; another object of the present application is to provide a service processing apparatus, a device and a computer readable storage medium, which also have the above beneficial effects.
In a first aspect, the present application provides a service processing method, including:
a scheduling node receives a service request; the scheduling node is any node in the distributed cluster;
obtaining hash ring information of the distributed cluster;
determining the position information of a target node corresponding to the service request according to the Hash ring information;
and forwarding the service request to the target node according to the position information for service processing.
Preferably, the receiving the service request includes:
and receiving the service request sent by the virtual machine through the QEMU driver.
Preferably, the receiving, by the QEMU driver, the service request sent by the virtual machine includes:
the QEMU driver receives the service request sent by the virtual machine;
acquiring a current floating IP of the distributed cluster;
sending the service request to a node corresponding to the current floating IP; and the node corresponding to the current floating IP is the scheduling node.
Preferably, the service processing method further includes:
and when the cluster management notice is received, updating the node state information according to the cluster management notice.
Preferably, the service processing method further includes:
and when the cluster management notification is a scheduling service suspension notification, each node triggers a scheduling node switching instruction to obtain a new scheduling node.
Preferably, the scheduling service suspension notification is specifically a scheduling node failure notification or a scheduling service expiration notification.
Preferably, the service processing method further includes:
and when a plurality of service requests are received, merging the service requests according to service types.
In a second aspect, the present application further discloses a service processing apparatus, including:
the service request receiving module is used for receiving the service request by the scheduling node; the scheduling node is any node in the distributed cluster;
the cluster information acquisition module is used for acquiring hash ring information of the distributed cluster;
the position information calculation module is used for determining the position information of the target node corresponding to the service request according to the hash ring information;
and the service request forwarding module is used for forwarding the service request to the target node according to the position information to perform service processing.
In a third aspect, the present application further discloses a service processing device, including:
a memory for storing a computer program;
a processor for executing the computer program to implement the steps of any of the traffic processing methods as described above.
In a fourth aspect, the present application also discloses a computer-readable storage medium, in which a computer program is stored, which, when being executed by a processor, is adapted to implement the steps of any of the service processing methods as described above.
The service processing method comprises the steps that a scheduling node receives a service request; the scheduling node is any node in the distributed cluster; obtaining hash ring information of the distributed cluster; determining the position information of a target node corresponding to the service request according to the Hash ring information; and forwarding the service request to the target node according to the position information for service processing.
Therefore, according to the service processing method provided by the application, any cluster node is selected from the distributed clusters as the scheduling node to realize the scheduling processing of the upper-layer service request, in the scheduling process, the position distribution of the access object corresponding to the service request is determined through Hash ring calculation, the target node is hit, and the service request is directly forwarded to the target node to be processed, so that extra data forwarding and network calling are avoided, the service processing efficiency is improved, and the cluster system performance is improved; in addition, for the cluster system, when the scheduling node fails, the scheduling node can be quickly switched, so that service interruption is effectively avoided, and user experience is guaranteed.
The service processing apparatus, the device, and the computer-readable storage medium provided by the present application all have the above beneficial effects, and are not described herein again.
Drawings
In order to more clearly illustrate the technical solutions in the prior art and the embodiments of the present application, the drawings that are needed to be used in the description of the prior art and the embodiments of the present application will be briefly described below. Of course, the following description of the drawings related to the embodiments of the present application is only a part of the embodiments of the present application, and it will be obvious to those skilled in the art that other drawings can be obtained from the provided drawings without any creative effort, and the obtained other drawings also belong to the protection scope of the present application.
Fig. 1 is a schematic flow chart of a service processing method provided in the present application;
FIG. 2 is an architecture diagram of a business processing system provided herein;
fig. 3 is a schematic structural diagram of a service processing apparatus provided in the present application;
fig. 4 is a schematic structural diagram of a service processing device provided in the present application.
Detailed Description
The core of the application is to provide a service processing method, which can effectively improve service processing efficiency, avoid service interruption, ensure user experience and improve cluster system performance; another core of the present application is to provide a service processing apparatus, a service processing system, a network device, and a computer-readable storage medium, which also have the above beneficial effects.
In order to more clearly and completely describe the technical solutions in the embodiments of the present application, the technical solutions in the embodiments of the present application will be described below with reference to the drawings in the embodiments of the present application. It is to be understood that the embodiments described are only a few embodiments of the present application and not all embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present application.
Referring to fig. 1, fig. 1 is a schematic flow chart of a service processing method provided in the present application, where the service processing method may include:
s101: a scheduling node receives a service request; the scheduling node is any node in the distributed cluster;
the step aims to receive a service request, the service request may be a request issued by an upper layer, such as a virtual machine, a host, and the like, and the specific type of the service request is not unique. Specifically, the distributed cluster system includes a large number of cluster nodes, and one of the cluster nodes selects a node to start a scheduling service function as a scheduling node to implement scheduling forwarding of an upper layer scheduling request, thereby completing corresponding service processing. Certainly, the scheduling node is a node in a normal operation state in the distributed cluster, and once the scheduling node fails, the distributed cluster reselects the scheduling node so as to effectively avoid service interruption, ensure normal operation of a service, and further ensure user experience. In addition, the selection method of the scheduling node is not unique, and may be directly selected by the cluster management platform, or may be implemented by competition of each node in the distributed cluster, or may adopt other selection methods, which is not limited in this application.
As a preferred embodiment, the receiving the service request may include: and receiving a service request sent by the virtual machine through a QEMU driver (a driver stored in a VM access back end).
The preferred embodiment provides a more specific method for receiving a service request, that is, the method is implemented based on a QEMU driver. For example, for a sheetlog, a distributed storage service is constructed by means of a local disk, a network card and a switch of a server node, so that the resources of the server are fully utilized to provide stable and reliable storage and network, and a volume or LUN (Logical Unit Number) provided by the storage is used to provide a virtual disk service for a VM, whereas a manner of mounting the virtual disk by the VM may use a private network protocol supported by qemu, that is, a sheetlog cluster is connected by using a qemu driver, and a data storage service provided by the cluster is used to perform service reading and writing. Of course, iSCSI (Internet Small Computer System Interface) may also be used to mount the virtual disk, that is, the receiving mode of the service request is not unique.
As a preferred embodiment, the receiving, by the QEMU driver, the service request sent by the virtual machine may include: the QEMU driving program receives a service request sent by the virtual machine; acquiring a current floating IP of the distributed cluster; sending the service request to a node corresponding to the current floating IP; and the node corresponding to the current floating IP is a scheduling node.
The preferred embodiment introduces the above process of implementing service request acquisition based on the QEMU driver more specifically, for a distributed cluster, a floating IP may be set to provide service request scheduling service, that is, a floating scheduling node is set, so as to effectively ensure that the scheduling node can be always in a normal operating state, thereby avoiding a situation where a service is interrupted due to a failure of the scheduling node.
S102: obtaining hash ring information of the distributed cluster;
the step aims to achieve the acquisition of the hash ring information so as to achieve the determination of a target node, wherein the target node is a cluster node where an access object corresponding to a service request is located, and for a distributed cluster, the target node is always in a constantly changing state in the operation process, such as adding cluster nodes, deleting cluster nodes, individual cluster node faults and the like, and the hash ring information corresponding to the distributed cluster is different along with the change of the node state in the distributed cluster, so that the acquisition of the hash ring information is the hash ring information in the current node state of the distributed cluster.
S103: determining the position information of a target node corresponding to the service request according to the Hash ring information;
this step is intended to achieve the acquisition of the location information of the target node, which may specifically be the IP address of the target node. Specifically, after the hash ring information and the service request of the current distributed cluster are obtained, hash ring calculation can be performed on the hash ring information and the service request, so as to obtain the position information of the service request access object, that is, the position information of the cluster node where the access object is located.
S104: and forwarding the service request to the target node according to the position information for service processing.
The step aims to realize the forwarding of the service request, namely, the service request is forwarded to the target node, and the target node processes the service request so as to complete the corresponding service processing. Therefore, the target node can be directly hit through the Hash ring calculation, extra data forwarding and network calling are not needed, the service processing efficiency is further improved, and the performance of the cluster system is improved.
As a preferred embodiment, the service processing method may further include: and when the cluster management notice is received, updating the node state information according to the cluster management notice.
The preferred embodiment aims to realize real-time update of the cluster node state information, so as to effectively ensure that the cluster node state information maintained in each cluster node (including the scheduling node) is the latest information, and ensure normal processing of the service request. Specifically, the change of the cluster node state can be realized in the form of a cluster management notification, and when the node state in the distributed cluster changes, such as node increase and decrease, node failure, and the like, a corresponding cluster management notification is generated in real time and sent to each node in the cluster, so that each cluster node updates the node state information.
As a preferred embodiment, the service processing method may further include: and when the cluster management notification is a scheduling service suspension notification, each node triggers a scheduling node switching instruction to obtain a new scheduling node.
The preferred embodiment aims to implement switching of scheduling nodes, where, when the node state in the distributed cluster changes, a cluster management notification is generated and sent to each cluster node, and similarly, when the scheduling node is abnormal, a corresponding cluster management notification is also generated, where the cluster management notification is specifically a scheduling service suspension notification, that is, a normal scheduling service cannot be continuously provided due to the abnormal scheduling node, and in this case, the scheduling service suspension notification may be sent to each cluster node, so that the cluster node automatically triggers a node switching instruction, determines a new scheduling node from other normal cluster nodes, and continues to provide a scheduling service for a service request, thereby ensuring normal operation of the service.
As a preferred embodiment, the scheduling service suspension notification may specifically be a scheduling node failure notification or a scheduling service expiration notification.
The preferred embodiment provides a specific type of scheduler service suspension notification, i.e. a scheduler node failure notification or a scheduler service expiration notification. The scheduling node fault notification means that the current scheduling node fails to provide the task request scheduling service continuously; the scheduling service expiration notification means that the scheduling service started in the current scheduling node has reached a predetermined period, that is, when the node in the distributed cluster starts the scheduling service function, the node is the scheduling node, but the started scheduling service function has the predetermined period, and once the predetermined period is reached, the scheduling service function is automatically closed, and at this time, the scheduling service expiration notification is generated. Of course, the scheduling node may update the term information before the scheduling service function expires to continue providing the scheduling service, and may compete again for the scheduling service function with other cluster nodes after the scheduling service function expires.
As a preferred embodiment, the service processing method may further include: and when a plurality of service requests are received, merging the service requests according to the service types.
The preferred embodiment provides a more specific method for processing batch service requests, that is, when a plurality of service requests are received, optimization processing is performed on the service requests, specifically, the service requests are combined according to service types, so that service services are completed more efficiently, and system performance is improved. For example, multiple service requests for accessing the same access object are combined, multiple service requests for accessing the same cluster node are combined, and the like.
Therefore, according to the service processing method provided by the application, any cluster node is selected from the distributed clusters as the scheduling node to realize the scheduling processing of the upper-layer service request, in the scheduling process, the position distribution of the access object corresponding to the service request is determined through Hash ring calculation, the target node is hit, and the service request is directly forwarded to the target node to be processed, so that extra data forwarding and network calling are avoided, the service processing efficiency is improved, and the cluster system performance is improved; in addition, for the cluster system, when the scheduling node fails, the scheduling node can be quickly switched, so that service interruption is effectively avoided, and user experience is guaranteed.
On the basis of the foregoing embodiments, taking sheetlog as an example, the preferred embodiment provides a more specific service processing method, and the specific implementation flow thereof is as follows:
referring to fig. 2, fig. 2 is an architecture diagram of a service processing system provided in the present application, where an Access Server module (i.e., the scheduling service function) is added between a VM and a sheetlog service to implement high availability of a service, and the Access Server module receives a service IO request of the VM, processes the request, forwards the request to a node that really provides a storage service for processing, and returns the processed request to the VM after the processing is completed. The Access Server working node of the sheetlog cluster can be set through the name command line, but only one Access Server working node can be set in the same sheetlog cluster.
Specifically, the Access Server module should have the following functions:
(1) the VM accesses an entrance of a sheetlog storage cluster, specifically a service IP (Internet protocol) stored by the sheetlog and seen in qemu driver;
(2) the change of the sheetlog cluster can be sensed in time, corresponding processing is carried out to ensure that the service of the VM is not interrupted, and the VM is ensured to have no sensing on the change of the back-end storage cluster;
(3) the position information of the service IO access object can be directly determined, so that the service request is forwarded to the corresponding node for processing, and additional data forwarding and network calling are avoided.
Further, in order to effectively satisfy the above functions, the corresponding improvements are specifically as follows:
(1) the method comprises the steps that a floating IP is set, the Access Server can start service on one node only by means of cluster service management etcd or zookeeper of sheetlog, and the floating IP is set on the node only, so that a qemu driver does not need an IP list any more and only needs to send a request to the floating IP, and a VM does not need to care about information of a specific physical node which really provides service;
(2) the Access Server obtains the cluster change from two sources: firstly, the method comes from a sheetlog cluster management notice, namely after the sheetlog cluster is changed, such as addition and deletion of nodes, node faults and the like, the cluster management can send the notice to each node in the cluster, and each node can determine whether to trigger the switching of the Access Server according to the state of the Access Server working node information; secondly, after the Access Server service is started, establishing a lease with the sheetlog cluster, and updating lease information regularly before the lease expires so as to inform the cluster of the service condition of the Access Server, but if the Access Server is not updated timely after the lease expires, the sheetlog cluster informs the original working node of stopping service and starts the Access Server service at a new node;
(3) the Access Server service is independent of the sheetlog service, and can determine the position information of an object to be accessed in a business IO request through hash ring calculation by acquiring hash ring information of a cluster, so that the request is forwarded to a corresponding node, and the retransmission of internal IO is avoided; in addition, because the Access Server has the state information of the distribution positions of the cluster objects, the service requests to be accessed can be optimized according to the information, such as the requests for merging the same object, the requests for accessing the same node and the like, so that the IO performance is improved.
Therefore, an Access Server module is added between the VM and the sheetlog so as to provide a floating IP for the VM to perform service request processing; meanwhile, the change information of the nodes in the cluster is sensed through the sheetlog cluster management, so that the Access Server is switched quickly, the process is not sensed by the VM, and high availability of services is realized; moreover, the position distribution of the access object is obtained by means of the Hash ring of the sheetlog, so that the service IO is optimized to a certain extent, and the system performance is improved.
Therefore, according to the service processing method provided by the embodiment of the application, any cluster node is selected as a scheduling node in a distributed cluster to achieve scheduling processing of an upper-layer service request, in the scheduling process, the position distribution of an access object corresponding to the service request is determined through Hash ring calculation, the target node is hit, and then the service request is directly forwarded to the target node to be processed, so that extra data forwarding and network calling are avoided, the service processing efficiency is improved, and the performance of a cluster system is improved; in addition, for the cluster system, when the scheduling node fails, the scheduling node can be quickly switched, so that service interruption is effectively avoided, and user experience is guaranteed.
To solve the above technical problem, the present application further provides a service processing apparatus, please refer to fig. 3, where fig. 3 is a schematic structural diagram of the service processing apparatus provided in the present application, and the service processing apparatus may include:
a service request receiving module 1, configured to receive a service request by a scheduling node; the scheduling node is any node in the distributed cluster;
the cluster information acquisition module 2 is used for acquiring hash ring information of the distributed cluster;
the position information calculation module 3 is used for determining the position information of the target node corresponding to the service request according to the hash ring information;
and the service request forwarding module 4 is used for forwarding the service request to the target node according to the position information to perform service processing.
Therefore, the service processing device provided in the embodiment of the application selects any cluster node in the distributed clusters as the scheduling node to implement the scheduling processing of the upper-layer service request, determines the position distribution of the access object corresponding to the service request through the hash ring calculation in the scheduling process, implements the hit of the target node, and further directly forwards the service request to the target node for processing, thereby avoiding extra data forwarding and network calling, improving the service processing efficiency, and improving the performance of the cluster system; in addition, for the cluster system, when the scheduling node fails, the scheduling node can be quickly switched, so that service interruption is effectively avoided, and user experience is guaranteed.
As a preferred embodiment, the service request receiving module 1 may be specifically configured to receive, by the QEMU driver, a service request sent by the virtual machine.
As a preferred embodiment, the service request receiving module 1 may be specifically configured to receive, by the QEMU driver, a service request sent by a virtual machine; acquiring a current floating IP of the distributed cluster; sending the service request to a node corresponding to the current floating IP; and the node corresponding to the current floating IP is a scheduling node.
As a preferred embodiment, the service processing apparatus may further include a cluster node update module, configured to update the node status information according to the cluster management notification when the cluster management notification is received.
As a preferred embodiment, the service processing apparatus may further include a scheduling node switching module, configured to trigger, when the cluster management notification is a scheduling service suspension notification, a scheduling node switching instruction by each node, to obtain a new scheduling node.
As a preferred embodiment, the scheduling service suspension notification may specifically be a scheduling node failure notification or a scheduling service expiration notification.
As a preferred embodiment, the service processing apparatus may further include a service request optimization module, configured to, when a plurality of service requests are received, perform merging processing on the service requests according to service types.
For the introduction of the apparatus provided in the present application, please refer to the above method embodiments, which are not described herein again.
To solve the above technical problem, the present application further provides a network device, please refer to fig. 4, where fig. 4 is a schematic structural diagram of a network device provided in the present application, and the network device may include:
a memory 10 for storing a computer program;
the processor 20, when executing the computer program, may implement the steps of any of the service processing methods described above.
For the introduction of the device provided in the present application, please refer to the above method embodiment, which is not described herein again.
To solve the above problem, the present application further provides a computer-readable storage medium, on which a computer program is stored, and the computer program, when executed by a processor, can implement the steps of any of the service processing methods described above.
The computer-readable storage medium may include: various media capable of storing program codes, such as a usb disk, a removable hard disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk, or an optical disk.
For the introduction of the computer-readable storage medium provided in the present application, please refer to the above method embodiments, which are not described herein again.
The embodiments are described in a progressive manner in the specification, each embodiment focuses on differences from other embodiments, and the same and similar parts among the embodiments are referred to each other. The device disclosed by the embodiment corresponds to the method disclosed by the embodiment, so that the description is simple, and the relevant points can be referred to the method part for description.
Those of skill would further appreciate that the various illustrative elements and algorithm steps described in connection with the embodiments disclosed herein may be implemented as electronic hardware, computer software, or combinations of both, and that the various illustrative components and steps have been described above generally in terms of their functionality in order to clearly illustrate this interchangeability of hardware and software. Whether such functionality is implemented as hardware or software depends upon the particular application and design constraints imposed on the implementation. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present application.
The steps of a method or algorithm described in connection with the embodiments disclosed herein may be embodied directly in hardware, in a software module executed by a processor, or in a combination of the two. A software module may reside in Random Access Memory (RAM), memory, Read Only Memory (ROM), electrically programmable ROM, electrically erasable programmable ROM, registers, hard disk, a removable disk, a CD-ROM, or any other form of storage medium known in the art.
The technical solutions provided by the present application are described in detail above. The principles and embodiments of the present application are explained herein using specific examples, which are provided only to help understand the method and the core idea of the present application. It should be noted that, for those skilled in the art, without departing from the principle of the present application, several improvements and modifications can be made to the present application, and these improvements and modifications also fall into the protection scope of the present application.
Claims (10)
1. A method for processing a service, comprising:
a scheduling node receives a service request; the scheduling node is any node in the distributed cluster;
obtaining hash ring information of the distributed cluster;
determining the position information of a target node corresponding to the service request according to the Hash ring information;
and forwarding the service request to the target node according to the position information for service processing.
2. The service processing method according to claim 1, wherein said receiving a service request comprises:
and receiving the service request sent by the virtual machine through the QEMU driver.
3. The service processing method according to claim 2, wherein the receiving, by the QEMU driver, the service request sent by the virtual machine includes:
the QEMU driver receives the service request sent by the virtual machine;
acquiring a current floating IP of the distributed cluster;
sending the service request to a node corresponding to the current floating IP; and the node corresponding to the current floating IP is the scheduling node.
4. The traffic processing method according to claim 1, further comprising:
and when the cluster management notice is received, updating the node state information according to the cluster management notice.
5. The traffic processing method according to claim 4, further comprising:
and when the cluster management notification is a scheduling service suspension notification, each node triggers a scheduling node switching instruction to obtain a new scheduling node.
6. The traffic processing method according to claim 5, wherein the scheduling service suspension notification is specifically a scheduling node failure notification or a scheduling service expiration notification.
7. The traffic processing method according to any of claims 1 to 6, further comprising:
and when a plurality of service requests are received, merging the service requests according to service types.
8. A traffic processing apparatus, comprising:
the service request receiving module is used for receiving the service request by the scheduling node; the scheduling node is any node in the distributed cluster;
the cluster information acquisition module is used for acquiring hash ring information of the distributed cluster;
the position information calculation module is used for determining the position information of the target node corresponding to the service request according to the hash ring information;
and the service request forwarding module is used for forwarding the service request to the target node according to the position information to perform service processing.
9. A traffic processing device, comprising:
a memory for storing a computer program;
a processor for executing the computer program to implement the steps of the traffic processing method according to any of claims 1 to 7.
10. A computer-readable storage medium, in which a computer program is stored which, when being executed by a processor, is adapted to carry out the steps of the traffic processing method according to any one of claims 1 to 7.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202011111539.6A CN112199176B (en) | 2020-10-16 | 2020-10-16 | Service processing method, device and related equipment |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202011111539.6A CN112199176B (en) | 2020-10-16 | 2020-10-16 | Service processing method, device and related equipment |
Publications (2)
Publication Number | Publication Date |
---|---|
CN112199176A true CN112199176A (en) | 2021-01-08 |
CN112199176B CN112199176B (en) | 2023-01-17 |
Family
ID=74009326
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202011111539.6A Active CN112199176B (en) | 2020-10-16 | 2020-10-16 | Service processing method, device and related equipment |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN112199176B (en) |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN113391769A (en) * | 2021-06-30 | 2021-09-14 | 华云数据控股集团有限公司 | Distributed storage method and apparatus, computing device, and storage medium |
CN114285903A (en) * | 2021-12-16 | 2022-04-05 | 奇安信科技集团股份有限公司 | Request processing method, device and system and electronic equipment |
Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN106775953A (en) * | 2016-12-30 | 2017-05-31 | 北京中电普华信息技术有限公司 | Realize the method and system of OpenStack High Availabitities |
CN107493199A (en) * | 2017-08-31 | 2017-12-19 | 郑州云海信息技术有限公司 | A kind of distributed type assemblies management method and system |
CN109167702A (en) * | 2018-08-28 | 2019-01-08 | 新华三大数据技术有限公司 | A kind of distributed test method and device based on load balancing |
CN110740167A (en) * | 2019-09-20 | 2020-01-31 | 北京浪潮数据技术有限公司 | distributed storage system and node monitoring method thereof |
CN111756828A (en) * | 2020-06-19 | 2020-10-09 | 广东浪潮大数据研究有限公司 | Data storage method, device and equipment |
-
2020
- 2020-10-16 CN CN202011111539.6A patent/CN112199176B/en active Active
Patent Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN106775953A (en) * | 2016-12-30 | 2017-05-31 | 北京中电普华信息技术有限公司 | Realize the method and system of OpenStack High Availabitities |
CN107493199A (en) * | 2017-08-31 | 2017-12-19 | 郑州云海信息技术有限公司 | A kind of distributed type assemblies management method and system |
CN109167702A (en) * | 2018-08-28 | 2019-01-08 | 新华三大数据技术有限公司 | A kind of distributed test method and device based on load balancing |
CN110740167A (en) * | 2019-09-20 | 2020-01-31 | 北京浪潮数据技术有限公司 | distributed storage system and node monitoring method thereof |
CN111756828A (en) * | 2020-06-19 | 2020-10-09 | 广东浪潮大数据研究有限公司 | Data storage method, device and equipment |
Cited By (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN113391769A (en) * | 2021-06-30 | 2021-09-14 | 华云数据控股集团有限公司 | Distributed storage method and apparatus, computing device, and storage medium |
CN113391769B (en) * | 2021-06-30 | 2024-04-30 | 华云数据控股集团有限公司 | Distributed storage method and device, computing equipment and storage medium |
CN114285903A (en) * | 2021-12-16 | 2022-04-05 | 奇安信科技集团股份有限公司 | Request processing method, device and system and electronic equipment |
CN114285903B (en) * | 2021-12-16 | 2024-04-19 | 奇安信科技集团股份有限公司 | Request processing method, device and system and electronic equipment |
Also Published As
Publication number | Publication date |
---|---|
CN112199176B (en) | 2023-01-17 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
RU2595482C2 (en) | Ensuring transparency failover in file system | |
US10069707B2 (en) | System and method for seamless horizontal scaling using logical scalable units | |
EP2923272B1 (en) | Distributed caching cluster management | |
CN114787781A (en) | System and method for enabling high availability managed failover services | |
EP2670114A1 (en) | System and Methods for Communicating in a Telecommunication Network via Independent Key Routing and Proxies | |
CN112199176B (en) | Service processing method, device and related equipment | |
CN113391944A (en) | Deferred server recovery in a computing system | |
CN111459749A (en) | Prometous-based private cloud monitoring method and device, computer equipment and storage medium | |
JP6272190B2 (en) | Computer system, computer, load balancing method and program thereof | |
US11153173B1 (en) | Dynamically updating compute node location information in a distributed computing environment | |
US20150220438A1 (en) | Dynamic hot volume caching | |
JP2009237826A (en) | Storage system and volume management method therefor | |
JP2005056392A (en) | Method and device for validity inspection of resource regarding geographical mirroring and for ranking | |
US9274593B2 (en) | Change the destination physical machine information such that the destination candidate of the certain virtual machine includes at least a physical machine belonging to the second physical machine group | |
CN113596152A (en) | Load balancing implementation method, system and device | |
CN116339954A (en) | Process migration method and device, storage medium and electronic equipment | |
CN111212087A (en) | Method, device, equipment and storage medium for determining login server | |
CN112732765B (en) | Method and device for determining experimental path and electronic equipment | |
CN117667879A (en) | Data access method and device, storage medium and electronic equipment | |
CN111342986A (en) | Distributed node management method and device, distributed system and storage medium | |
EP2670111B1 (en) | System and Methods for Communicating in a Telecommunication Network Using Common Key Routing and Data Locality Tables | |
CN114911602A (en) | Load balancing method, device, equipment and storage medium for server cluster | |
CN115470303B (en) | Database access method, device, system, equipment and readable storage medium | |
US11856064B1 (en) | Proactive management of service connections | |
EP3685567B1 (en) | Load shedding of traffic based on current load state of target capacity |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant | ||
TR01 | Transfer of patent right | ||
TR01 | Transfer of patent right |
Effective date of registration: 20231206 Address after: Room 1801, 18th Floor, Jiyun Investment Building, No. 278 Xinyi Road, Zhengdong New District, Zhengzhou City, Henan Province, 450018 Patentee after: Zhengzhou Inspur Data Technology Co.,Ltd. Address before: Room s311, S05 / F, Langchao Science Park, 1036 Langchao Road, high tech Zone, Jinan City, Shandong Province, 250101 Patentee before: Inspur(Jinan)Data Technology Co.,Ltd |