CN114356456A - Service processing method, device, storage medium and electronic equipment - Google Patents

Service processing method, device, storage medium and electronic equipment Download PDF

Info

Publication number
CN114356456A
CN114356456A CN202210032753.5A CN202210032753A CN114356456A CN 114356456 A CN114356456 A CN 114356456A CN 202210032753 A CN202210032753 A CN 202210032753A CN 114356456 A CN114356456 A CN 114356456A
Authority
CN
China
Prior art keywords
service
load balancer
target service
access request
target
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202210032753.5A
Other languages
Chinese (zh)
Inventor
张世龙
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Kingsoft Cloud Network Technology Co Ltd
Original Assignee
Beijing Kingsoft Cloud Network Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing Kingsoft Cloud Network Technology Co Ltd filed Critical Beijing Kingsoft Cloud Network Technology Co Ltd
Priority to CN202210032753.5A priority Critical patent/CN114356456A/en
Publication of CN114356456A publication Critical patent/CN114356456A/en
Pending legal-status Critical Current

Links

Images

Abstract

The invention discloses a service processing method, a service processing device, a storage medium and electronic equipment. The method comprises the following steps: under the condition of receiving a starting instruction for starting the target service, starting a service controller; controlling a service controller to start a target service; after starting the target service, creating a load balancer; mounting a target service in a load balancer; in the event that an access request is received for a target service, the access request is forwarded by the load balancer to the target service. The invention solves the technical problem of low efficiency of the cluster resource scheduling system for generating the resident service.

Description

Service processing method, device, storage medium and electronic equipment
Technical Field
The present invention relates to the field of computers, and in particular, to a method and an apparatus for processing a service, a storage medium, and an electronic device.
Background
In the prior art, when a resident service is started on a cluster resource scheduling system, a service controller is usually started first, and then the resident service is started by the service controller. Then, the service controller registers its ip address, port and name of the resident service to the service discovery module, and the client can request the resident service from the service discovery module.
However, in the above method, the service controller as a controller not only needs to monitor the resident service, but also may become a performance bottleneck due to the limitation of the number, resulting in low efficiency of generating the resident service.
Disclosure of Invention
The embodiment of the invention provides a service processing method, a service processing device, a storage medium and electronic equipment, which are used for at least solving the technical problem of low efficiency of generating resident service by a cluster resource scheduling system.
According to an aspect of the embodiments of the present invention, a service processing method is provided, including: under the condition of receiving a starting instruction for starting the target service, starting a service controller; controlling the service controller to start the target service; after the target service is started, a load balancer is established; mounting the target service in the load balancer; in the event that an access request for a target service is received, the access request is forwarded by the load balancer to the target service.
According to another aspect of the embodiments of the present invention, there is provided a service processing apparatus, including: the starting unit is used for starting the service controller under the condition of receiving a starting instruction for starting the target service; a control unit, configured to control the service controller to start the target service; a creating unit, configured to create a load balancer after the target service is started; a mounting unit, configured to mount the target service in the load balancer; and a forwarding unit, configured to forward, by the load balancer, the access request to a target service when the access request to the target service is received.
As an optional example, the apparatus further includes: a first registration unit, configured to register an ip address, a port number, and a name of the target service of the load balancer to a service discovery module after the target service is mounted in the load balancer, where the service discovery module is configured to obtain the access request; or a second registration unit, configured to register the ip address of the load balancer and the service domain name of the target service provided by the target service in a domain name resolution server, where the service discovery module is configured to obtain the access request.
As an optional example, the forwarding unit includes: an obtaining module, configured to obtain, by the service discovery module, the ip address of the load balancer when the service discovery module receives the access request; and a forwarding module, configured to, according to the ip address of the load balancer, send the access request to the load balancer, and forward the access request by the load balancer.
As an optional example, the obtaining module includes: a first determining submodule, configured to determine, by the service discovery module, the target service requested to be accessed by the access request; and the searching submodule is used for searching the load balancer where the target service is located so as to obtain the ip address of the load balancer.
As an optional example, the forwarding unit includes: a second determining sub-module, configured to determine, when the domain name resolution server receives the access request, the target service to be accessed by the access request; the resolution submodule is used for resolving the target service by the domain name resolution server to obtain the ip address of the load balancer; and the sending submodule is used for sending the access request to the load balancer according to the ip address and forwarding the access request by the load balancer.
As an alternative example, the control unit includes: a first control module, configured to control the service controller to send a request to a resource manager to request to start a target resource used by the target service; and a second control module, configured to control the service controller to create the target service when the target resource is received.
According to another aspect of the embodiments of the present invention, there is also provided a storage medium, in which a computer program is stored, wherein the computer program is configured to execute the service processing method when running.
According to another aspect of the embodiments of the present invention, there is also provided an electronic device, including a memory and a processor, where the memory stores a computer program, and the processor is configured to execute the service processing method through the computer program.
In the embodiment of the invention, the service controller is started under the condition of receiving the starting instruction of starting the target service; controlling the service controller to start the target service; after the target service is started, a load balancer is established; mounting the target service in the load balancer; in the method, after the target service is generated, the target service is mounted in the load balancer, and the load balancer forwards the access request to the target service, so that the problem that the performance bottleneck of a service controller influences the generation of the resident service is avoided, the purpose of improving the efficiency of the cluster resource scheduling system for generating the resident service is realized, and the technical problem that the efficiency of the cluster resource scheduling system for generating the resident service is low is solved.
Drawings
The accompanying drawings, which are included to provide a further understanding of the invention and are incorporated in and constitute a part of this application, illustrate embodiment(s) of the invention and together with the description serve to explain the invention without limiting the invention. In the drawings:
fig. 1 is a flow chart of an alternative service processing method according to an embodiment of the present invention;
fig. 2 is a schematic diagram of a cluster resource scheduling system of an alternative service processing method according to an embodiment of the present invention;
fig. 3 is a schematic diagram of a correspondence relationship between service program names and ip and port numbers of a load balancer according to an optional service processing method in the embodiment of the present invention;
fig. 4 is a system diagram of an alternative service processing method according to an embodiment of the present invention;
fig. 5 is a schematic structural diagram of an alternative service processing apparatus according to an embodiment of the present invention;
fig. 6 is a schematic diagram of an alternative electronic device according to an embodiment of the invention.
Detailed Description
In order to make the technical solutions of the present invention better understood, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the 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 invention.
It should be noted that the terms "first," "second," and the like in the description and claims of the present invention and in the drawings described above are used for distinguishing between similar elements and not necessarily for describing a particular sequential or chronological order. It is to be understood that the data so used is interchangeable under appropriate circumstances such that the embodiments of the invention described herein are capable of operation in sequences other than those illustrated or described herein. Furthermore, the terms "comprises," "comprising," and "having," and any variations thereof, are intended to cover a non-exclusive inclusion, such that a process, method, system, article, or apparatus that comprises a list of steps or elements is not necessarily limited to those steps or elements expressly listed, but may include other steps or elements not expressly listed or inherent to such process, method, article, or apparatus.
According to a first aspect of the embodiments of the present invention, a method for processing a service is provided, optionally, as shown in fig. 1, the method includes:
s102, under the condition of receiving a starting instruction for starting the target service, starting a service controller;
s104, controlling the service controller to start a target service;
s106, after the target service is started, a load balancer is established;
s108, mounting the target service in a load balancer;
s110, under the condition that the access request to the target service is received, the load balancer forwards the access request to the target service.
Optionally, in this embodiment, the service controller may be a controller for starting a service program, and the service controller may start one or more service programs. The business program in this embodiment may be used to provide different services.
After the traffic controller starts the target service, the target service may be mounted in the load balancer. If an access request for accessing the target service with the user is received, the access request is forwarded to the target service by the load balancer.
In this embodiment, the YARN may be an ecological cluster resource scheduling system, and may run a distributed computing and storing task. The service controller may be an AppMaster, which is a controller of a service program scheduled in the Yarn and is used to start and manage a specific service (App). And (3) management flow: and collecting the state information of the App through heartbeat, and monitoring the App. The service can be an App, the App represents specific service content, and the service can have a plurality of copies, and the program of each copy is the same. YARN may also include a NodeManager, which is a controlled slave node used to run a particular service (AppMaster, Apps)
Optionally, in this embodiment, the cluster resource scheduling system may provide a resident service for the client. The resident service may be performed by a business process. Therefore, the business program can be deployed on the cluster resource scheduling system, and the resident service is provided by the business program. Fig. 2 is a schematic diagram illustrating a resident service provision according to the present embodiment.
Through the embodiment, by the method, when the service program is deployed in the cluster resource scheduling system, the service program is mounted in the load balancer, and the load balancer completes forwarding of the access request, so that the problem that the performance bottleneck of the service controller influences the generation of the resident service is avoided, and the purpose of improving the efficiency of the cluster resource scheduling system for generating the resident service is realized.
As an optional example, after mounting the target service in the load balancer, the method further comprises:
registering an ip address, a port number and a name of a target service of a load balancer to a service discovery module, wherein the service discovery module is used for acquiring an access request; or
And registering the ip address of the load balancer and a service domain name of a target service provided by the target service into a domain name resolution server, wherein the service discovery module is used for acquiring an access request.
Optionally, in this embodiment, an internet protocol (ip) of the load balancer, a port number, and a name of the target service may be registered in the service discovery module. The service discovery module can record the relation between the name of the business program and the ip address and port number of the load balancer. For example, as shown in fig. 3, fig. 3 is a schematic diagram of an optional recorded relationship between a service name and ip addresses and port numbers of a load balancer. And obtaining the ip address and the port number of the corresponding load balancer through the service program name. It should be noted that the service program name, ip address, and port number in fig. 3 are only schematic, and the actual name, address, and port are set according to the actual situation.
As an alternative example, where an access request is received for a target service, forwarding the access request to the target service by the load balancer comprises:
under the condition that the service discovery module receives the access request, the service discovery module acquires an ip address of the load balancer;
and according to the ip address of the load balancer, the service discovery module sends the access request to the load balancer, and the load balancer forwards the access request.
Optionally, in this embodiment, if the service discovery module receives an access request for accessing the target service, which is sent by the client, the service discovery module may find the ip address and the port number of the corresponding load balancer according to the target service and according to the relationship in fig. 3, then send the access request to the corresponding load balancer, where the load balancer sends the access request to the corresponding target service, and the target service provides the service to the client.
As an alternative example, in the case that the service discovery module receives the access request, the obtaining, by the service discovery module, the ip address of the load balancer includes:
determining, by the service discovery module, a target service requested to be accessed by the access request;
and searching the load balancer where the target service is located to obtain the ip address of the load balancer.
Optionally, in this embodiment, if the service discovery module obtains an access request to the target service sent by the client, the service discovery module first searches for the load balancer according to a relationship between the service program stored in the service discovery module and the ip address and the port number of the load balancer, sends the access request to the load balancer after finding the corresponding load balancer, forwards the access request to the corresponding target service by the load balancer, processes the access request by the target service, and returns a processing result.
As an alternative example, where an access request is received for a target service, forwarding the access request to the target service by the load balancer comprises:
determining a target service to be accessed by the access request under the condition that the domain name resolution server receives the access request;
analyzing the target service by a domain name analysis server to obtain an ip address of the load balancer;
and sending the access request to the load balancer according to the ip address, and forwarding the access request by the load balancer.
Optionally, in this embodiment, the client may also send the access request to a Domain Name System (DNS). The DNS can analyze the target service, and directly analyze to obtain the ip address of the load balancer. The DNS can then send the access request to the load balancer, which sends the access request to the corresponding target service.
As an alternative example, controlling the traffic controller to initiate the target service comprises:
controlling a service controller to send a request to a resource manager to request starting of a target resource used by a target service;
in case a target resource is received, the traffic controller is controlled to create a target service.
Optionally, in this embodiment, when the service controller starts the target service, the service controller may apply for a target resource used for starting the target service from the resource manager. The resources used by different business programs may be different. In the case of a request to a target resource, the traffic controller creates a target service.
As an alternative example, after the target service is started, creating the load balancer includes:
calling a target interface of a load balancing server;
a load balancer is created through the target interface.
Optionally, in this embodiment, when creating the load balancer, an interface of the load balancing server may be called to create the load balancer. The load balancer may be plural in number and may be of different types. Different load balancers are created according to the called interface.
Fig. 4 is a system diagram of the present embodiment. In fig. 4, YARN may include a resource manager and a node manager, where the node manager is a controlled slave node, and the resource manager is a Master node, which is used to perform global resource management and control to help the service start the AppMaster. When a resident service is started, YARN may first start an AppMaster, which is used to start the resident service (App copy) and perform monitoring management. In fig. 4, YARN starts an appmaster App master in the nodemanator through the ResourceManager, applies for resources from the ResourceManager, and starts a service copy App copy 1 on the nodemanator. And starting service copy App copies 2 in other NodeManager nodes until starting a specified number of App copies. When the services of the designated number of App copies are all started, the AppMaster calls an interface of a server LB service of the load balancer to create a load balancer LB, and mounts all the services of the App. The AppMaster then registers the ip, port, service name of the LB to the YARN service discovery module and registers the service domain name and LB ip into the DNS.
When the service is called, a service 1 (accessed to the YARN service discovery module) sends a request to the YARN service discovery module to acquire an ip and a port of an LB (local area network) and then sends the request to the LB, and the LB receives the request and forwards the request to a specific App copy 1 or App copy 2, and finally responds to the service request.
Service 2 (not accessing YARN service discovery module) can directly access LB by DNS resolution by configuring the domain name of the service, thereby requesting the service.
It should be noted that, for simplicity of description, the above-mentioned method embodiments are described as a series of acts or combination of acts, but those skilled in the art will recognize that the present invention is not limited by the order of acts, as some steps may occur in other orders or concurrently in accordance with the invention. Further, those skilled in the art should also appreciate that the embodiments described in the specification are preferred embodiments and that the acts and modules referred to are not necessarily required by the invention.
According to another aspect of the embodiments of the present application, there is also provided a service processing apparatus, as shown in fig. 5, including:
a starting unit 502, configured to start a service controller when a starting instruction for starting a target service is received;
a control unit 504, configured to control a service controller to start a target service;
a creating unit 506, configured to create a load balancer after starting the target service;
a mounting unit 508, configured to mount the target service in the load balancer;
a forwarding unit 510, configured to, in case an access request to the target service is received, forward the access request to the target service by the load balancer.
Optionally, in this embodiment, the service controller may be a controller for starting a service program, and the service controller may start one or more service programs. The business program in this embodiment may be used to provide different services.
After the traffic controller starts the target service, the target service may be mounted in the load balancer. If an access request for accessing the target service with the user is received, the access request is forwarded to the target service by the load balancer.
In this embodiment, the YARN may be an ecological cluster resource scheduling system, and may run a distributed computing and storing task. The service controller may be an AppMaster, which is a controller of a service program scheduled in the Yarn and is used to start and manage a specific service (App). And (3) management flow: and collecting the state information of the App through heartbeat, and monitoring the App. The service can be an App, the App represents specific service content, and the service can have a plurality of copies, and the program of each copy is the same. YARN may also include a NodeManager, which is a controlled slave node used to run a particular service (AppMaster, Apps)
Optionally, in this embodiment, the cluster resource scheduling system may provide a resident service for the client. The resident service may be performed by a business process. Therefore, the business program can be deployed on the cluster resource scheduling system, and the resident service is provided by the business program. Fig. 2 is a schematic diagram illustrating a resident service provision according to the present embodiment.
Through the embodiment, by the method, when the service program is deployed in the cluster resource scheduling system, the service program is mounted in the load balancer, and the load balancer completes forwarding of the access request, so that the problem that the performance bottleneck of the service controller influences the generation of the resident service is avoided, and the purpose of improving the efficiency of the cluster resource scheduling system for generating the resident service is realized.
As an optional example, the apparatus further includes:
the device comprises a first registration unit, a service discovery module and a second registration unit, wherein the first registration unit is used for registering an IP address, a port number and a name of a target service of a load balancer to the service discovery module after the target service is mounted in the load balancer, and the service discovery module is used for acquiring an access request; or
And the second registration unit is used for registering the IP address of the load balancer and the service domain name of the target service provided by the target service into the domain name resolution server, wherein the service discovery module is used for acquiring the access request.
Optionally, in this embodiment, the ip, the port number, and the name of the target service of the load balancer may be registered in the service discovery module. The service discovery module can record the relation between the name of the business program and the ip address and port number of the load balancer. For example, as shown in fig. 3, fig. 3 is a schematic diagram of an optional recorded relationship between a service name and ip addresses and port numbers of a load balancer. And obtaining the ip address and the port number of the corresponding load balancer through the service program name. It should be noted that the service program name, ip address, and port number in fig. 3 are only schematic, and the actual name, address, and port are set according to the actual situation.
As an optional example, the forwarding unit includes:
the acquisition module is used for acquiring the IP address of the load balancer by the service discovery module under the condition that the service discovery module receives the access request;
and the forwarding module is used for sending the access request to the load balancer by the service discovery module according to the IP address of the load balancer and forwarding the access request by the load balancer.
Optionally, in this embodiment, if the service discovery module receives an access request for accessing the target service, which is sent by the client, the service discovery module may find the ip address and the port number of the corresponding load balancer according to the target service providing the target service, according to the relationship in fig. 3, and then send the access request to the corresponding load balancer, where the load balancer sends the access request to the corresponding target service, and the target service provides the service to the client.
As an optional example, the obtaining module includes:
the first determining submodule is used for determining a target service requested to be accessed by the access request by the service discovery module;
and the searching submodule is used for searching the load balancer where the target service is located so as to obtain the IP address of the load balancer.
Optionally, in this embodiment, if the service discovery module obtains an access request to the target service sent by the client, the service discovery module first searches for the load balancer according to a relationship between the service program stored in the service discovery module and the ip address and the port number of the load balancer, sends the access request to the load balancer after finding the corresponding load balancer, forwards the access request to the corresponding target service by the load balancer, processes the access request by the target service, and returns a processing result.
As an optional example, the forwarding unit includes:
the second determining submodule is used for determining the target service to be accessed by the access request under the condition that the domain name resolution server receives the access request;
the resolution submodule is used for resolving the target service by the domain name resolution server to obtain the IP address of the load balancer;
and the sending submodule is used for sending the access request to the load balancer according to the IP address, and the load balancer forwards the access request.
Optionally, in this embodiment, the client may also send the access request to a domain name resolution server DNS. The DNS can analyze the target service, and directly analyze to obtain the ip address of the load balancer. The DNS can then send the access request to the load balancer, which sends the access request to the corresponding target service.
As an alternative example, the control unit includes:
the first control module is used for controlling the service controller to send a request to the resource manager so as to request to start a target resource used by a target service;
and the second control module is used for controlling the service controller to create the target service under the condition of receiving the target resource.
Optionally, in this embodiment, when the service controller starts the target service, the service controller may apply for a target resource used for starting the target service from the resource manager. The resources used by different business programs may be different. In the case of a request to a target resource, the traffic controller creates a target service.
For other examples of this embodiment, please refer to the above examples, which are not described herein.
Fig. 6 is a block diagram of an alternative electronic device according to an embodiment of the present invention, as shown in fig. 6, including a processor 602, a communication interface 604, a memory 606, and a communication bus 608, where the processor 602, the communication interface 604, and the memory 606 communicate with each other through the communication bus 608, where,
a memory 606 for storing computer programs;
the processor 602, when executing the computer program stored in the memory 606, implements the following steps:
under the condition of receiving a starting instruction for starting the target service, starting a service controller;
controlling a service controller to start a target service;
after starting the target service, creating a load balancer;
mounting a target service in a load balancer;
in the event that an access request is received for a target service, the access request is forwarded by the load balancer to the target service.
Alternatively, in this embodiment, the communication bus may be a PCI (Peripheral Component Interconnect) bus, an EISA (Extended Industry Standard Architecture) bus, or the like. The communication bus may be divided into an address bus, a data bus, a control bus, etc. For ease of illustration, only one thick line is shown in FIG. 6, but this is not intended to represent only one bus or type of bus. The communication interface is used for communication between the electronic equipment and other equipment.
The memory may include RAM, and may also include non-volatile memory (non-volatile memory), such as at least one disk memory. Alternatively, the memory may be at least one memory device located remotely from the processor.
As an example, the memory 606 may include, but is not limited to, an initiating unit 502, a controlling unit 504, a creating unit 506, a mounting unit 508, and a forwarding unit 510 in the processing apparatus of the request. In addition, the module may further include, but is not limited to, other module units in the processing apparatus of the request, which is not described in this example again.
The processor may be a general-purpose processor, and may include but is not limited to: a CPU (Central Processing Unit), an NP (Network Processor), and the like; but also a DSP (Digital Signal Processing), an ASIC (Application Specific Integrated Circuit), an FPGA (Field Programmable Gate Array) or other Programmable logic device, discrete Gate or transistor logic device, discrete hardware component.
Optionally, the specific examples in this embodiment may refer to the examples described in the above embodiments, and this embodiment is not described herein again.
It can be understood by those skilled in the art that the structure shown in fig. 6 is only an illustration, and the device implementing the processing method of the request may be a terminal device, and the terminal device may be a terminal device such as a smart phone (e.g., an Android phone, an iOS phone, etc.), a tablet computer, a palm computer, a Mobile Internet Device (MID), a PAD, and the like. Fig. 6 is a diagram illustrating a structure of the electronic device. For example, the electronic device may also include more or fewer components (e.g., network interfaces, display devices, etc.) than shown in FIG. 6, or have a different configuration than shown in FIG. 6.
Those skilled in the art will appreciate that all or part of the steps in the methods of the above embodiments may be implemented by a program instructing hardware associated with the terminal device, where the program may be stored in a computer-readable storage medium, and the storage medium may include: flash disk, ROM, RAM, magnetic or optical disk, and the like.
According to another aspect of the embodiments of the present invention, there is also provided a computer-readable storage medium, in which a computer program is stored, wherein the computer program is configured to execute the steps in the business processing method when running.
Alternatively, in this embodiment, a person skilled in the art may understand that all or part of the steps in the methods of the foregoing embodiments may be implemented by a program instructing hardware associated with the terminal device, where the program may be stored in a computer-readable storage medium, and the storage medium may include: flash disks, Read-Only memories (ROMs), Random Access Memories (RAMs), magnetic or optical disks, and the like.
The above-mentioned serial numbers of the embodiments of the present invention are merely for description and do not represent the merits of the embodiments.
The integrated unit in the above embodiments, if implemented in the form of a software functional unit and sold or used as a separate product, may be stored in the above computer-readable storage medium. Based on such understanding, the technical solution of the present invention may be substantially or partially implemented in the prior art, or all or part of the technical solution may be embodied in the form of a software product stored in a storage medium, and including instructions for causing one or more computer devices (which may be personal computers, servers, or network devices) to execute all or part of the steps of the method according to the embodiments of the present invention.
In the above embodiments of the present invention, the descriptions of the respective embodiments have respective emphasis, and for parts that are not described in detail in a certain embodiment, reference may be made to related descriptions of other embodiments.
In the several embodiments provided in the present application, it should be understood that the disclosed client may be implemented in other manners. The above-described embodiments of the apparatus are merely illustrative, and for example, a division of a unit is merely a division of a logic function, and an actual implementation may have another division, for example, a plurality of units or components may be combined or integrated into another system, or some features may be omitted, or not executed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection through some interfaces, units or modules, and may be in an electrical or other form.
The units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment.
In addition, functional units in the embodiments of the present invention may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit. The integrated unit can be realized in a form of hardware, and can also be realized in a form of a software functional unit.
The foregoing is only a preferred embodiment of the present invention, and it should be noted that, for those skilled in the art, various modifications and decorations can be made without departing from the principle of the present invention, and these modifications and decorations should also be regarded as the protection scope of the present invention.

Claims (10)

1. A method for processing a service, comprising:
under the condition of receiving a starting instruction for starting the target service, starting a service controller;
controlling the service controller to start the target service;
after the target service is started, creating a load balancer;
mounting the target service in the load balancer;
in the event that an access request is received for the target service, forwarding, by the load balancer, the access request to the target service.
2. The method of claim 1, wherein after mounting the target service in the load balancer, the method further comprises:
registering the ip address, the port number and the name of the target service of the load balancer to a service discovery module, wherein the service discovery module is used for acquiring the access request; or
And registering the ip address of the load balancer and the service domain name of the target service provided by the target service into a domain name resolution server, wherein the service discovery module is used for acquiring the access request.
3. The method of claim 2, wherein forwarding, by the load balancer, an access request to a target service if the access request is received, comprises:
under the condition that the service discovery module receives the access request, the service discovery module acquires the ip address of the load balancer;
according to the i p address of the load balancer, the service discovery module sends the access request to the load balancer, and the load balancer forwards the access request.
4. The method of claim 3, wherein the obtaining, by the service discovery module, the ip address of the load balancer if the service discovery module receives the access request comprises:
determining, by the service discovery module, the target service requested to be accessed by the access request;
and searching the load balancer where the target service is located to obtain the ip address of the load balancer.
5. The method of claim 2, wherein forwarding, by the load balancer, an access request to a target service if the access request is received, comprises:
determining the target service to be accessed by the access request under the condition that the domain name resolution server receives the access request;
analyzing the target service by the domain name analysis server to obtain the ip address of the load balancer;
and sending the access request to the load balancer according to the ip address, and forwarding the access request by the load balancer.
6. The method according to any of claims 1 to 5, wherein said controlling said traffic controller to initiate said target service comprises:
controlling the service controller to send a request to a resource manager to request starting of a target resource used by the target service;
and controlling the service controller to create the target service under the condition that the target resource is received.
7. The method of any of claims 1-5, wherein the creating a load balancer after starting the target service comprises:
calling a target interface of a load balancing server;
creating the load balancer through the target interface.
8. A traffic processing apparatus, comprising:
the starting unit is used for starting the service controller under the condition of receiving a starting instruction for starting the target service;
a control unit, configured to control the service controller to start the target service;
a creating unit for creating a load balancer after the target service is started;
a mounting unit, configured to mount the target service in the load balancer;
and the forwarding unit is used for forwarding the access request to the target service by the load balancer under the condition of receiving the access request to the target service.
9. A computer-readable storage medium, in which a computer program is stored, which computer program, when running, performs the method of any one of claims 1 to 7.
10. An electronic device comprising a memory and a processor, characterized in that the memory has stored therein a computer program, the processor being arranged to execute the method of any of claims 1 to 7 by means of the computer program.
CN202210032753.5A 2022-01-12 2022-01-12 Service processing method, device, storage medium and electronic equipment Pending CN114356456A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210032753.5A CN114356456A (en) 2022-01-12 2022-01-12 Service processing method, device, storage medium and electronic equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210032753.5A CN114356456A (en) 2022-01-12 2022-01-12 Service processing method, device, storage medium and electronic equipment

Publications (1)

Publication Number Publication Date
CN114356456A true CN114356456A (en) 2022-04-15

Family

ID=81110106

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210032753.5A Pending CN114356456A (en) 2022-01-12 2022-01-12 Service processing method, device, storage medium and electronic equipment

Country Status (1)

Country Link
CN (1) CN114356456A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116991594A (en) * 2023-09-26 2023-11-03 苏州元脑智能科技有限公司 Load balancer creation method, device, equipment and storage medium

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116991594A (en) * 2023-09-26 2023-11-03 苏州元脑智能科技有限公司 Load balancer creation method, device, equipment and storage medium
CN116991594B (en) * 2023-09-26 2024-02-09 苏州元脑智能科技有限公司 Load balancer creation method, device, equipment and storage medium

Similar Documents

Publication Publication Date Title
CN109547570B (en) Service registration method, device, registration center management equipment and storage medium
CN111182089B (en) Container cluster system, method and device for accessing big data assembly and server
CN110677405B (en) Data processing method and device, electronic equipment and storage medium
CN108737467B (en) Server log viewing method, device and system
US20170329588A1 (en) Method and Deployment Module for Managing a Container to be Deployed on a Software Platform
CN107809383B (en) MVC-based path mapping method and device
CN111327647B (en) Method and device for providing service to outside by container and electronic equipment
CN110753091A (en) Cloud platform management method and device
CN114025021A (en) Communication method, system, medium and electronic device across Kubernetes cluster
CN107172214B (en) Service node discovery method and device with load balancing function
CN111786984A (en) Pod communication connection method and device, electronic equipment and storage medium
CN114356456A (en) Service processing method, device, storage medium and electronic equipment
CN113254165B (en) Load flow distribution method and device for virtual machine and container, and computer equipment
CN114416508A (en) Application performance monitoring method and device, storage medium and electronic equipment
WO2017088347A1 (en) Method, device and system for managing user usage information of application based on paas platform
CN114090623A (en) Method and device for creating cache resources, electronic equipment and storage medium
CN112256351B (en) Method for realizing Feign component, method and device for calling micro-service
CN106685708B (en) Method, device and system for determining service relationship
CN114363233A (en) Packet routing method, device, electronic equipment and storage medium
CN109639629B (en) Data access processing method and device, computer equipment and storage medium
CN108647139B (en) System test method, device, storage medium and electronic device
CN114048028A (en) Service calling method and device, storage medium and electronic equipment
CN111935329B (en) Domain name resolution method and device
JP6412641B2 (en) Communication link transmission method, apparatus and terminal
CN115469961A (en) Method and device for creating container group, electronic equipment and storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination