CN112306701A - Service fusing method, device, equipment and storage medium - Google Patents

Service fusing method, device, equipment and storage medium Download PDF

Info

Publication number
CN112306701A
CN112306701A CN201910677404.7A CN201910677404A CN112306701A CN 112306701 A CN112306701 A CN 112306701A CN 201910677404 A CN201910677404 A CN 201910677404A CN 112306701 A CN112306701 A CN 112306701A
Authority
CN
China
Prior art keywords
service
fusing
requests
rule
accessed
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
Application number
CN201910677404.7A
Other languages
Chinese (zh)
Other versions
CN112306701B (en
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.)
China Mobile Communications Group Co Ltd
China Mobile Information Technology Co Ltd
Original Assignee
China Mobile Communications Group Co Ltd
China Mobile Information 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 China Mobile Communications Group Co Ltd, China Mobile Information Technology Co Ltd filed Critical China Mobile Communications Group Co Ltd
Priority to CN201910677404.7A priority Critical patent/CN112306701B/en
Publication of CN112306701A publication Critical patent/CN112306701A/en
Application granted granted Critical
Publication of CN112306701B publication Critical patent/CN112306701B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements 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/46Multiprogramming arrangements
    • G06F9/54Interprogram communication
    • G06F9/546Message passing systems or structures, e.g. queues

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 And Data Communications (AREA)

Abstract

The embodiment of the invention discloses a service fusing method, a service fusing device, service fusing equipment and a storage medium. The method comprises the following steps: receiving a service access request, wherein the service access request comprises identification information of a service to be accessed; determining whether the service to be accessed corresponds to a service fusing rule or not according to the identification information; and if the service to be accessed corresponds to the service fusing rule, fusing the service access request according to the service fusing rule. According to the service fusing method, device, equipment and medium provided by the embodiment of the invention, the service access request is fused, so that the resources occupied by the service access request can be reduced, and further the system breakdown can be prevented.

Description

Service fusing method, device, equipment and storage medium
Technical Field
The present invention relates to the field of communications technologies, and in particular, to a method, an apparatus, a device, and a storage medium for service fusing.
Background
In a microservice system, there is usually an interdependence between the services in the cluster, for example, service a depends on service B and service C, and service B depends on service D. When accessing service A, service A will access the services it depends on: service B and service C; service B will access the services it depends on: and D, service D.
When one or some of the services in the service dependency chain of a certain service are abnormal or unavailable, requests for accessing the service a are in a waiting state, and the requests occupy resources such as the number of threads and Input-Output (IO) of the system. When the number of requests is increased, the occupied resources are increased, which may cause a bottleneck in the system, and may affect other requests of the system, and may eventually cause a crash of the system.
Disclosure of Invention
Embodiments of the present invention provide a service fusing method, apparatus, device, and storage medium, which can reduce resource occupation and prevent system crash.
In one aspect, an embodiment of the present invention provides a service fusing method, where the method includes:
receiving a service access request, wherein the service access request comprises identification information of a service to be accessed;
determining whether the service to be accessed corresponds to a service fusing rule or not according to the identification information of the service to be accessed;
and if the service to be accessed corresponds to the service fusing rule, fusing the service access request according to the service fusing rule.
In one embodiment of the invention, the fusing of the service access request according to the service fusing rule comprises the following steps:
judging whether the number of requests for accessing the service to be accessed reaches the number of requests specified by the service fusing rule;
and if the number of the requests for accessing the service to be accessed reaches the number of the requests specified by the service fusing rule, fusing the service access requests.
In one embodiment of the invention, the fusing of the service access request according to the service fusing rule comprises the following steps:
judging whether the number of requests for accessing the service to be accessed reaches the number of requests specified by the service fusing rule;
if the number of the requests for accessing the service to be accessed reaches the number of the requests specified by the service fusing rule, and the execution times of judging whether the number of the requests for accessing the service to be accessed reaches the number of the requests specified by the service fusing rule does not reach the retry times specified by the service fusing rule, continuing to execute the step of judging whether the number of the requests for accessing the service to be accessed reaches the number of the requests specified by the service fusing rule;
and if the execution times reach the retry times specified by the service fusing rule, fusing the service access request.
In one embodiment of the invention, the fusing of the service access request according to the service fusing rule comprises the following steps:
judging whether the number of requests for accessing the service to be accessed reaches the number of requests specified by the service fusing rule;
if the number of the requests for accessing the service to be accessed reaches the number of the requests specified by the service fusing rule, and the execution times of judging whether the number of the requests for accessing the service to be accessed reaches the number of the requests specified by the service fusing rule does not reach the retry times specified by the service fusing rule, continuing to execute the step of judging whether the number of the requests for accessing the service to be accessed reaches the number of the requests specified by the service fusing rule;
if the execution times reach the retry times specified by the service fusing rule, fusing the service access request;
if the number of the requests for accessing the service to be accessed does not reach the number of the requests specified by the service fusing rule, judging whether the number of the service requests in the request queue corresponding to the service to be accessed reaches the number of the request queues specified by the service fusing rule or not;
and if the service request number in the request queue corresponding to the service to be accessed is judged to reach the request queue number specified by the service fusing rule, fusing the service access request.
In an embodiment of the present invention, the service fusing method provided in the embodiment of the present invention further includes:
and receiving the service fusing rule sent by the server.
In an embodiment of the present invention, the service fusing method provided in the embodiment of the present invention further includes:
receiving Pod information corresponding to a service sent by a server;
and accessing the Pod corresponding to the service to be accessed through the agent Sidecar container according to the Pod information.
In another aspect, an embodiment of the present invention provides a service fusing apparatus, including:
the system comprises a receiving module, a processing module and a processing module, wherein the receiving module is used for receiving a service access request which comprises identification information of a service to be accessed;
the determining module is used for determining whether the service to be accessed corresponds to the service fusing rule or not according to the identification information of the service to be accessed;
and the fusing module is used for fusing the service access request according to the service fusing rule if the service to be accessed corresponds to the service fusing rule.
In an embodiment of the present invention, the fusing module is specifically configured to:
judging whether the number of requests for accessing the service to be accessed reaches the number of requests specified by the service fusing rule;
and if the number of the requests for accessing the service to be accessed reaches the number of the requests specified by the service fusing rule, fusing the service access requests.
In an embodiment of the present invention, the fusing module is specifically configured to:
judging whether the number of requests for accessing the service to be accessed reaches the number of requests specified by the service fusing rule;
if the number of the requests for accessing the service to be accessed reaches the number of the requests specified by the service fusing rule, and the execution times of judging whether the number of the requests for accessing the service to be accessed reaches the number of the requests specified by the service fusing rule does not reach the retry times specified by the service fusing rule, continuing to execute the step of judging whether the number of the requests for accessing the service to be accessed reaches the number of the requests specified by the service fusing rule;
and if the execution times reach the retry times specified by the service fusing rule, fusing the service access request.
In an embodiment of the present invention, the fusing module is specifically configured to:
judging whether the number of requests for accessing the service to be accessed reaches the number of requests specified by the service fusing rule;
if the number of the requests for accessing the service to be accessed reaches the number of the requests specified by the service fusing rule, and the execution times of judging whether the number of the requests for accessing the service to be accessed reaches the number of the requests specified by the service fusing rule does not reach the retry times specified by the service fusing rule, continuing to execute the step of judging whether the number of the requests for accessing the service to be accessed reaches the number of the requests specified by the service fusing rule;
if the execution times reach the retry times specified by the service fusing rule, fusing the service access request;
if the number of the requests for accessing the service to be accessed does not reach the number of the requests specified by the service fusing rule, judging whether the number of the service requests in the request queue corresponding to the service to be accessed reaches the number of the request queues specified by the service fusing rule or not;
and if the service request number in the request queue corresponding to the service to be accessed is judged to reach the request queue number specified by the service fusing rule, fusing the service access request.
In an embodiment of the present invention, the receiving module is further configured to:
and receiving the service fusing rule sent by the server.
In an embodiment of the present invention, the receiving module is further configured to:
and receiving the Pod information corresponding to the service sent by the server.
The service fusing device provided by the embodiment of the invention further comprises:
and the access module is used for accessing the Pod corresponding to the service to be accessed through the agent Sidecar container according to the Pod information.
In another aspect, an embodiment of the present invention provides a service fusing apparatus, where the apparatus includes: a memory, a processor, and a computer program stored on the memory and executable on the processor;
the processor implements the service fusing method provided by the embodiment of the invention when executing the computer program.
In another aspect, an embodiment of the present invention provides a computer-readable storage medium, where a computer program is stored on the computer-readable storage medium, and when the computer program is executed by a processor, the computer program implements the service fusing method provided in the embodiment of the present invention.
According to the service fusing method, device, equipment and medium provided by the embodiment of the invention, the service access request is fused, so that the resources occupied by the service access request can be reduced, and further the system breakdown can be prevented.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings required to be used in the embodiments of the present invention will be briefly described below, and for those skilled in the art, other drawings can be obtained according to the drawings without creative efforts.
FIG. 1 is a flow chart illustrating a service fusing method according to an embodiment of the present invention;
FIG. 2 is a schematic diagram illustrating a service fusing structure provided by an embodiment of the present invention;
FIG. 3 is a schematic diagram illustrating a service fusing apparatus according to an embodiment of the present invention;
FIG. 4 is a block diagram illustrating an exemplary hardware architecture of a computing device capable of implementing the service fusing method and apparatus according to embodiments of the invention.
Detailed Description
Features and exemplary embodiments of various aspects of the present invention will be described in detail below, and in order to make objects, technical solutions and advantages of the present invention more apparent, the present invention will be further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative of the invention and are not to be construed as limiting the invention. It will be apparent to one skilled in the art that the present invention may be practiced without some of these specific details. The following description of the embodiments is merely intended to provide a better understanding of the present invention by illustrating examples of the present invention.
It is noted that, herein, relational terms such as first and second, and the like may be used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Also, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising … …" does not exclude the presence of other identical elements in a process, method, article, or apparatus that comprises the element.
In order to solve the problem of the prior art, embodiments of the present invention provide a service fusing method, apparatus, device, and storage medium. The following first describes a service fusing method provided by an embodiment of the present invention.
Fig. 1 is a flowchart illustrating a service fusing method according to an embodiment of the present invention. The service fusing method may include:
s101: a service access request is received.
The service access request includes identification information of the service to be accessed.
S102: and determining whether the service to be accessed corresponds to the service fusing rule or not according to the identification information of the service to be accessed.
S103: and if the service to be accessed corresponds to the service fusing rule, fusing the service access request according to the service fusing rule.
In one embodiment of the present invention, the fuse refers to a protection measure adopted in the system to prevent the whole system from being out of order due to the overload phenomenon of the service caused by some reasons.
In one embodiment of the invention, the service access request may be blown by deleting the service access request.
According to the service fusing method provided by the embodiment of the invention, the service access requests are fused, so that the number of the service access requests for accessing the service is reduced, the resources occupied by the service access requests can be reduced, and further the system breakdown can be prevented.
In one embodiment of the invention, when the service access request is fused according to the service fusing rule, whether the number of requests for accessing the service to be accessed reaches the number of requests specified by the service fusing rule can be judged; and if the number of the requests for accessing the service to be accessed reaches the number of the requests specified by the service fusing rule, fusing the service access requests.
For example, assume that the maximum number of requests to access a service to be accessed is specified in the service fusing rule.
And when the number of the requests for accessing the service to be accessed does not reach the maximum request number, sending the service access request to the service to be accessed, and responding the service access request by the service to be accessed.
And when the number of the requests for accessing the service to be accessed reaches the maximum request number, fusing the service access request, and deleting the service access request, so that the number of the service access requests for accessing the service is reduced, and the resources occupied by the service access requests are reduced.
In one embodiment of the invention, when the service access request is fused according to the service fusing rule, whether the number of requests for accessing the service to be accessed reaches the number of requests specified by the service fusing rule can be judged; if the number of the requests for accessing the service to be accessed reaches the number of the requests specified by the service fusing rule, and the execution times of judging whether the number of the requests for accessing the service to be accessed reaches the number of the requests specified by the service fusing rule does not reach the retry times specified by the service fusing rule, continuing to execute the step of judging whether the number of the requests for accessing the service to be accessed reaches the number of the requests specified by the service fusing rule; and if the execution times reach the retry times specified by the service fusing rule, fusing the service access request.
For example, assume that the service fusing rule specifies a maximum number of requests to access the service to be accessed and a maximum number of retries.
And when the number of the requests for accessing the service to be accessed does not reach the maximum request number, sending the service access request to the service to be accessed, and responding the service access request by the service to be accessed.
When the number of the requests for accessing the service to be accessed reaches the maximum number of the requests and the execution times of judging whether the number of the requests for accessing the service to be accessed reaches the number of the requests specified by the service fusing rule does not reach the maximum retry times, continuously judging whether the number of the requests for accessing the service to be accessed reaches the number of the requests specified by the service fusing rule;
and when judging whether the number of the requests for accessing the service to be accessed reaches the execution times of the request number specified by the service fusing rule and reaches the maximum retry times, fusing the service access request and deleting the service access request, so that the number of the service access requests for accessing the service is reduced, and the resources occupied by the service access requests are reduced. In addition, whether the execution times reach the maximum retry times or not is controlled to continuously execute and judge whether the number of the requests for accessing the service to be accessed reaches the number of the requests specified by the service fusing rule or not, and the success rate of requesting the service to be accessed can be improved.
In one embodiment of the invention, when the service access request is fused according to the service fusing rule, whether the number of requests for accessing the service to be accessed reaches the number of requests specified by the service fusing rule can be judged; if the number of the requests for accessing the service to be accessed reaches the number of the requests specified by the service fusing rule, and the execution times of judging whether the number of the requests for accessing the service to be accessed reaches the number of the requests specified by the service fusing rule does not reach the retry times specified by the service fusing rule, continuing to execute the step of judging whether the number of the requests for accessing the service to be accessed reaches the number of the requests specified by the service fusing rule; if the execution times reach the retry times specified by the service fusing rule, fusing the service access request; if the number of the requests for accessing the service to be accessed does not reach the number of the requests specified by the service fusing rule, judging whether the number of the service requests in the request queue corresponding to the service to be accessed reaches the number of the request queues specified by the service fusing rule or not; and if the service request number in the request queue corresponding to the service to be accessed is judged to reach the request queue number specified by the service fusing rule, fusing the service access request.
Illustratively, assume that the service fusing rule specifies a maximum number of requests to access the service to be accessed, a maximum number of retries, and a maximum number of request queues.
And when the number of the requests for accessing the service to be accessed does not reach the maximum request number, judging whether the number of the service requests in the request queue corresponding to the service to be accessed reaches the maximum request queue number.
And when the service access request number in the request queue corresponding to the service to be accessed is judged to reach the maximum request queue number, fusing the service access request, and deleting the service access request, so that the service access request number for accessing the service is reduced, and the resources occupied by the service access request are reduced.
And when the service access request quantity in the request queue corresponding to the service to be accessed is judged to be less than the maximum request queue quantity, storing the service access request into the request queue corresponding to the service to be accessed, and further enabling the service to be accessed to obtain the service access request from the corresponding request queue and respond.
And when the number of the requests for accessing the service to be accessed reaches the maximum number of the requests and the execution times of judging whether the number of the requests for accessing the service to be accessed reaches the number of the requests specified by the service fusing rule does not reach the maximum retry times, continuously judging whether the number of the requests for accessing the service to be accessed reaches the number of the requests specified by the service fusing rule.
And when judging whether the number of the requests for accessing the service to be accessed reaches the execution times of the request number specified by the service fusing rule and reaches the maximum retry times, fusing the service access request and deleting the service access request, so that the number of the service access requests for accessing the service is reduced, and the resources occupied by the service access requests are reduced.
In an embodiment of the present invention, the service fusing method provided in the embodiment of the present invention may further include: and receiving the service fusing rule sent by the server.
In one embodiment of the invention, the service fusing rule may include: the maximum request number for accessing the service to be accessed, the maximum retry times for accessing the service to be accessed and the maximum request queue number in the request queue corresponding to the service to be accessed.
In an embodiment of the present invention, the service fusing method provided in the embodiment of the present invention may further include: receiving Pod information corresponding to a service sent by a server; and accessing the Pod corresponding to the service to be accessed through the agent Sidecar container according to the Pod information.
The Pod is a basic unit of the kubernets system, is a minimum component created or deployed by a user, and is also a resource object for running a containerized application on the kubernets system. Kubernets is an open source for managing containerized applications on multiple hosts in a cloud platform, and its goal is to make containerized application deployment simple and efficient.
By the embodiment of the invention, the Pod which needs to be accessed when accessing other services can be judged, and the condition that the service Pod cannot be accessed due to change can be avoided.
The service fusing method provided by the embodiment of the invention is described below with reference to specific examples. Fig. 2 is a schematic structural diagram illustrating a service fusing provided by an embodiment of the present invention.
Firstly, a server/management end is deployed in a service cluster and used for issuing a service fusing rule. And simultaneously, deploying a proxy Sidecar container in the corresponding Pod of the service, wherein the proxy Sidecar container is used for processing the service fusing rule and intercepting the inlet flow and the outlet flow by modifying the address table (iptables) rule of the Pod. And the access control outside the service cluster is realized by deploying a single Sidecar container to serve as an entrance, the Sidecar container corresponds to the service inside the service cluster according to external request information, and the traffic interception and service fusing rule processing is carried out.
In an embodiment of the present invention, the user may create the service fusing rule through the server/management end, and the server/management end issues the service fusing rule configured by the user to the Sidecar container.
In one embodiment of the present invention, the sdecar container may send the address of its corresponding Pod, its corresponding service name and role to the server/administrator. And the server/management terminal determines the service fusing rule which needs to be issued to the Sidecar container according to the information sent by the Sidecar container, issues the determined service fusing rule to the Sidecar container, or notifies the Sidecar container to pull the required service fusing rule and configure the service fusing rule.
For example, assume that a certain Sidecar container corresponds to service A, which depends on service B. Determining that the service fusing rule needing to be issued to the Sidecar container is the service fusing rule corresponding to the service B, and issuing the service fusing rule corresponding to the service B to the Sidecar container.
When a user requests the ingress Sidecar container service or deploys the Sidecar container service to access service B, the service access request first goes to the Sidecar container, which determines whether service B corresponds to the service fusing rule. And at the moment, determining that the service B corresponds to the service fusing rule, and fusing the service access request according to the service fusing rule corresponding to the service B.
In an embodiment of the present invention, the service fusing rule corresponding to the service B may include: the maximum number of requests for accessing service B, the maximum retry number for accessing service B, and the maximum number of request queues in the request queue corresponding to service B.
Specifically, when the number of requests for accessing the service B does not reach the maximum number of requests, it is determined whether the number of service requests in the request queue corresponding to the service B reaches the maximum number of request queues.
And when the service request number in the request queue corresponding to the service B is judged to reach the maximum request queue number, fusing the service access request, and deleting the service access request, so that the service access request number for accessing the service B is reduced, and the resources occupied by the service access request are reduced.
And when the service request quantity in the request queue corresponding to the service B is judged to be less than the maximum request queue quantity, storing the service access request into the request queue corresponding to the service B, and further enabling the service B to acquire the service access request from the request queue corresponding to the service B and respond.
When the number of requests for accessing the service B reaches the maximum number of requests and the number of executions for determining whether the number of requests for accessing the service B reaches the number of requests specified by the service fusing rule does not reach the maximum number of retries, it is continuously determined whether the number of requests for accessing the service B reaches the number of requests specified by the service fusing rule.
And when judging whether the number of the requests for accessing the service B reaches the execution times of the request number specified by the service fusing rule and reaches the maximum retry times, fusing the service access request and deleting the service access request, so that the number of the service access requests for accessing the service B is reduced, and the resources occupied by the service access requests are reduced.
In an embodiment of the present invention, the server/manager may obtain Pod information corresponding to all services in the service cluster in real time by monitoring an Application Programming Interface (API) of the kubernets, and send the Pod information to the Sidecar container, so that the Sidecar container may determine a Pod that needs to be accessed when accessing other services, and a situation that the Pod corresponding to the service is changed and cannot be accessed may not occur.
In an embodiment of the present invention, when the Sidecar container determines that the fusing processing is not required for the service access request, the Pod corresponding to the service to be accessed may be determined according to a Uniform Resource Locator (URL) of the service access request, a HyperText Transfer Protocol (HTTP) header (Head), identification information of the service to be accessed, and partition information, and the access may be performed according to a set routing rule.
According to the service fusing method provided by the embodiment of the invention, the service access requests are fused, so that the number of the service access requests for accessing the service is reduced, the resources occupied by the service access requests can be reduced, and further the system breakdown can be prevented.
Corresponding to the above method embodiments, the embodiment of the present invention further provides a service fusing apparatus. As shown in fig. 3, fig. 3 is a schematic structural diagram of a service fusing device according to an embodiment of the present invention. The service fusing apparatus may include:
the receiving module 301 is configured to receive a service access request, where the service access request includes identification information of a service to be accessed.
The determining module 302 is configured to determine whether the service to be accessed corresponds to the service fusing rule according to the identification information of the service to be accessed.
And the fusing module 303 is configured to fuse the service access request according to the service fusing rule if the service to be accessed corresponds to the service fusing rule.
In an embodiment of the present invention, the fusing module 303 may be specifically configured to:
judging whether the number of requests for accessing the service to be accessed reaches the number of requests specified by the service fusing rule;
and if the number of the requests for accessing the service to be accessed reaches the number of the requests specified by the service fusing rule, fusing the service access requests.
In an embodiment of the present invention, the fusing module 303 may be specifically configured to:
judging whether the number of requests for accessing the service to be accessed reaches the number of requests specified by the service fusing rule;
if the number of the requests for accessing the service to be accessed reaches the number of the requests specified by the service fusing rule, and the execution times of judging whether the number of the requests for accessing the service to be accessed reaches the number of the requests specified by the service fusing rule does not reach the retry times specified by the service fusing rule, continuing to execute the step of judging whether the number of the requests for accessing the service to be accessed reaches the number of the requests specified by the service fusing rule;
and if the execution times reach the retry times specified by the service fusing rule, fusing the service access request.
In an embodiment of the present invention, the fusing module 303 may be specifically configured to:
judging whether the number of requests for accessing the service to be accessed reaches the number of requests specified by the service fusing rule;
if the number of the requests for accessing the service to be accessed reaches the number of the requests specified by the service fusing rule, and the execution times of judging whether the number of the requests for accessing the service to be accessed reaches the number of the requests specified by the service fusing rule does not reach the retry times specified by the service fusing rule, continuing to execute the step of judging whether the number of the requests for accessing the service to be accessed reaches the number of the requests specified by the service fusing rule;
if the execution times reach the retry times specified by the service fusing rule, fusing the service access request;
if the number of the requests for accessing the service to be accessed does not reach the number of the requests specified by the service fusing rule, judging whether the number of the service requests in the request queue corresponding to the service to be accessed reaches the number of the request queues specified by the service fusing rule or not;
and if the service request number in the request queue corresponding to the service to be accessed is judged to reach the request queue number specified by the service fusing rule, fusing the service access request.
In an embodiment of the present invention, the receiving module 301 may further be configured to:
and receiving the service fusing rule sent by the server.
In an embodiment of the present invention, the receiving module 301 may further be configured to:
receiving Pod information corresponding to a service sent by a server;
the service fusing device provided by the embodiment of the invention further comprises:
and the access module is used for accessing the Pod corresponding to the service to be accessed through the agent Sidecar container according to the Pod information.
According to the service fusing device provided by the embodiment of the invention, the service access request is fused, so that the resources occupied by the service access request can be reduced, and further the system breakdown can be prevented.
FIG. 4 is a block diagram illustrating an exemplary hardware architecture of a computing device capable of implementing the service fusing method and apparatus according to embodiments of the invention. As shown in fig. 4, computing device 400 includes an input device 401, an input interface 402, a central processor 403, a memory 404, an output interface 405, and an output device 406. The input interface 402, the central processing unit 403, the memory 404, and the output interface 405 are connected to each other through a bus 410, and the input device 401 and the output device 406 are connected to the bus 410 through the input interface 402 and the output interface 405, respectively, and further connected to other components of the computing device 400.
Specifically, the input device 401 receives input information from the outside and transmits the input information to the central processor 403 through the input interface 402; the central processor 403 processes the input information based on computer-executable instructions stored in the memory 404 to generate output information, stores the output information temporarily or permanently in the memory 404, and then transmits the output information to the output device 406 through the output interface 405; output device 406 outputs the output information outside of computing device 400 for use by a user.
That is, the computing device shown in fig. 4 may also be implemented as a service fusing device, which may include: a memory storing computer-executable instructions; and a processor, which when executing computer-executable instructions, may implement the service fusing method and apparatus provided by embodiments of the present invention.
An embodiment of the present invention further provides a computer-readable storage medium, where the computer-readable storage medium has computer program instructions stored thereon; the computer program instructions, when executed by a processor, implement a service fusing method provided by embodiments of the present invention.
It is to be understood that the invention is not limited to the specific arrangements and instrumentality described above and shown in the drawings. A detailed description of known methods is omitted herein for the sake of brevity. In the above embodiments, several specific steps are described and shown as examples. However, the method processes of the present invention are not limited to the specific steps described and illustrated, and those skilled in the art can make various changes, modifications and additions or change the order between the steps after comprehending the spirit of the present invention.
The functional blocks shown in the above-described structural block diagrams may be implemented as hardware, software, firmware, or a combination thereof. When implemented in hardware, it may be, for example, an electronic circuit, an Application Specific Integrated Circuit (ASIC), suitable firmware, plug-in, function card, or the like. When implemented in software, the elements of the invention are the programs or code segments used to perform the required tasks. The program or code segments may be stored in a machine-readable medium or transmitted by a data signal carried in a carrier wave over a transmission medium or a communication link. A "machine-readable medium" may include any medium that can store or transfer information. Examples of a machine-readable medium include electronic circuits, semiconductor memory devices, ROM, flash memory, Erasable ROM (EROM), floppy disks, CD-ROMs, optical disks, hard disks, fiber optic media, Radio Frequency (RF) links, and so forth. The code segments may be downloaded via computer networks such as the internet, intranet, etc.
It should also be noted that the exemplary embodiments mentioned in this patent describe some methods or systems based on a series of steps or devices. However, the present invention is not limited to the order of the above-described steps, that is, the steps may be performed in the order mentioned in the embodiments, may be performed in an order different from the order in the embodiments, or may be performed simultaneously.
As described above, only the specific embodiments of the present invention are provided, and it can be clearly understood by those skilled in the art that, for convenience and brevity of description, the specific working processes of the system, the module and the unit described above may refer to the corresponding processes in the foregoing method embodiments, and are not described herein again. It should be understood that the scope of the present invention is not limited thereto, and any person skilled in the art can easily conceive various equivalent modifications or substitutions within the technical scope of the present invention, and these modifications or substitutions should be covered within the scope of the present invention.

Claims (9)

1. A method of service fusing, the method comprising:
receiving a service access request, wherein the service access request comprises identification information of a service to be accessed;
determining whether the service to be accessed corresponds to a service fusing rule or not according to the identification information;
and if the service to be accessed corresponds to the service fusing rule, fusing the service access request according to the service fusing rule.
2. The method of claim 1, wherein blowing the service access request according to the service blowing rule comprises:
judging whether the number of the requests for accessing the service to be accessed reaches the number of the requests specified by the service fusing rule;
and if the number of the requests for accessing the service to be accessed reaches the number of the requests specified by the service fusing rule, fusing the service access requests.
3. The method of claim 1, wherein blowing the service access request according to the service blowing rule comprises:
judging whether the number of the requests for accessing the service to be accessed reaches the number of the requests specified by the service fusing rule;
if the number of requests for accessing the service to be accessed reaches the number of requests specified by the service fusing rule, and the number of execution times for judging whether the number of requests for accessing the service to be accessed reaches the number of requests specified by the service fusing rule does not reach the number of retries specified by the service fusing rule, continuing to execute the step of judging whether the number of requests for accessing the service to be accessed reaches the number of requests specified by the service fusing rule;
and if the execution times reach the retry times, fusing the service access request.
4. The method of claim 1, wherein blowing the service access request according to the service blowing rule comprises:
judging whether the number of the requests for accessing the service to be accessed reaches the number of the requests specified by the service fusing rule;
if the number of requests for accessing the service to be accessed reaches the number of requests specified by the service fusing rule, and the number of execution times for judging whether the number of requests for accessing the service to be accessed reaches the number of requests specified by the service fusing rule does not reach the number of retries specified by the service fusing rule, continuing to execute the step of judging whether the number of requests for accessing the service to be accessed reaches the number of requests specified by the service fusing rule;
if the execution times reach the retry times, fusing the service access request;
if the number of the requests for accessing the service to be accessed does not reach the number of the requests specified by the service fusing rule, judging whether the number of the service requests in the request queue corresponding to the service to be accessed reaches the number of the request queues specified by the service fusing rule or not;
and if the service request number in the request queue corresponding to the service to be accessed is judged to reach the request queue number specified by the service fusing rule, fusing the service access request.
5. The method of claim 1, further comprising:
and receiving the service fusing rule sent by the server.
6. The method of claim 1, further comprising:
receiving Pod information corresponding to a service sent by a server;
and accessing the Pod corresponding to the service to be accessed through the agent Sidecar container according to the Pod information.
7. A service fusing apparatus, the apparatus comprising:
the system comprises a receiving module, a processing module and a processing module, wherein the receiving module is used for receiving a service access request which comprises identification information of a service to be accessed;
the determining module is used for determining whether the service to be accessed corresponds to a service fusing rule or not according to the identification information;
and the fusing module is used for fusing the service access request according to the service fusing rule if the service to be accessed corresponds to the service fusing rule.
8. A service fusing apparatus, the apparatus comprising: a memory, a processor, and a computer program stored on the memory and executable on the processor;
the processor, when executing the computer program, implements the service fusing method of any one of claims 1 to 6.
9. A computer-readable storage medium, having stored thereon a computer program which, when executed by a processor, implements the service fusing method of any one of claims 1 to 6.
CN201910677404.7A 2019-07-25 2019-07-25 Service fusing method, device, equipment and storage medium Active CN112306701B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910677404.7A CN112306701B (en) 2019-07-25 2019-07-25 Service fusing method, device, equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910677404.7A CN112306701B (en) 2019-07-25 2019-07-25 Service fusing method, device, equipment and storage medium

Publications (2)

Publication Number Publication Date
CN112306701A true CN112306701A (en) 2021-02-02
CN112306701B CN112306701B (en) 2024-05-03

Family

ID=74329215

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910677404.7A Active CN112306701B (en) 2019-07-25 2019-07-25 Service fusing method, device, equipment and storage medium

Country Status (1)

Country Link
CN (1) CN112306701B (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116980480A (en) * 2023-09-25 2023-10-31 上海伊邦医药信息科技股份有限公司 Method and system for processing fusing information based on micro-service network model

Citations (18)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20020091869A1 (en) * 2001-01-08 2002-07-11 Jones Rhod J. Service processor and system and method using a service processor
CN105512244A (en) * 2015-11-30 2016-04-20 北京京东尚科信息技术有限公司 Database transaction processing method and device based on message queue
CN106375150A (en) * 2016-08-31 2017-02-01 广州唯品会信息科技有限公司 Disconnection control method and device for server
CN107608812A (en) * 2017-09-08 2018-01-19 北京奇艺世纪科技有限公司 A kind of blowout method and server
CN107659431A (en) * 2017-08-15 2018-02-02 北京趣拿软件科技有限公司 Interface processing method, apparatus, storage medium and processor
CN107770243A (en) * 2017-09-06 2018-03-06 北京奥鹏远程教育中心有限公司 From extension, adaptive micro services platform and its application process
CN107819797A (en) * 2016-09-12 2018-03-20 平安科技(深圳)有限公司 Access request treating method and apparatus
KR20180081969A (en) * 2017-01-09 2018-07-18 삼성전자주식회사 Method, and associated parameter for routing initial access request message of terminal in mobile communication
CN108427581A (en) * 2018-02-07 2018-08-21 平安普惠企业管理有限公司 System micro services method and terminal device
US20180253331A1 (en) * 2015-10-26 2018-09-06 Hitachi, Ltd. Computer system and access control method
CN108712392A (en) * 2018-04-25 2018-10-26 浙江长投云联信息科技有限公司 A kind of cloud data managing method and cloud system
CN109032783A (en) * 2018-08-01 2018-12-18 杭州朗和科技有限公司 Information interacting method, medium, device and calculating equipment
CN109189509A (en) * 2018-09-03 2019-01-11 中国平安人寿保险股份有限公司 The response method and server that call method, the interface of interface call
CN109240765A (en) * 2018-08-28 2019-01-18 中国联合网络通信集团有限公司 Blowout method, device, equipment and the computer readable storage medium of Service Source
CN109298950A (en) * 2018-08-15 2019-02-01 深圳壹账通智能科技有限公司 Enterprise Service Bus system, data processing method, terminal and storage medium
CN109766210A (en) * 2019-01-17 2019-05-17 多点生活(成都)科技有限公司 Service fusing control method, service fusing control device and server cluster
US20190173888A1 (en) * 2016-08-09 2019-06-06 Huawei Technologies Co., Ltd. Method for virtual machine to access physical server in cloud computing system, apparatus, and system
CN110034857A (en) * 2019-04-17 2019-07-19 广东三维家信息科技有限公司 Request the method, apparatus sent and electronic equipment

Patent Citations (18)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20020091869A1 (en) * 2001-01-08 2002-07-11 Jones Rhod J. Service processor and system and method using a service processor
US20180253331A1 (en) * 2015-10-26 2018-09-06 Hitachi, Ltd. Computer system and access control method
CN105512244A (en) * 2015-11-30 2016-04-20 北京京东尚科信息技术有限公司 Database transaction processing method and device based on message queue
US20190173888A1 (en) * 2016-08-09 2019-06-06 Huawei Technologies Co., Ltd. Method for virtual machine to access physical server in cloud computing system, apparatus, and system
CN106375150A (en) * 2016-08-31 2017-02-01 广州唯品会信息科技有限公司 Disconnection control method and device for server
CN107819797A (en) * 2016-09-12 2018-03-20 平安科技(深圳)有限公司 Access request treating method and apparatus
KR20180081969A (en) * 2017-01-09 2018-07-18 삼성전자주식회사 Method, and associated parameter for routing initial access request message of terminal in mobile communication
CN107659431A (en) * 2017-08-15 2018-02-02 北京趣拿软件科技有限公司 Interface processing method, apparatus, storage medium and processor
CN107770243A (en) * 2017-09-06 2018-03-06 北京奥鹏远程教育中心有限公司 From extension, adaptive micro services platform and its application process
CN107608812A (en) * 2017-09-08 2018-01-19 北京奇艺世纪科技有限公司 A kind of blowout method and server
CN108427581A (en) * 2018-02-07 2018-08-21 平安普惠企业管理有限公司 System micro services method and terminal device
CN108712392A (en) * 2018-04-25 2018-10-26 浙江长投云联信息科技有限公司 A kind of cloud data managing method and cloud system
CN109032783A (en) * 2018-08-01 2018-12-18 杭州朗和科技有限公司 Information interacting method, medium, device and calculating equipment
CN109298950A (en) * 2018-08-15 2019-02-01 深圳壹账通智能科技有限公司 Enterprise Service Bus system, data processing method, terminal and storage medium
CN109240765A (en) * 2018-08-28 2019-01-18 中国联合网络通信集团有限公司 Blowout method, device, equipment and the computer readable storage medium of Service Source
CN109189509A (en) * 2018-09-03 2019-01-11 中国平安人寿保险股份有限公司 The response method and server that call method, the interface of interface call
CN109766210A (en) * 2019-01-17 2019-05-17 多点生活(成都)科技有限公司 Service fusing control method, service fusing control device and server cluster
CN110034857A (en) * 2019-04-17 2019-07-19 广东三维家信息科技有限公司 Request the method, apparatus sent and electronic equipment

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116980480A (en) * 2023-09-25 2023-10-31 上海伊邦医药信息科技股份有限公司 Method and system for processing fusing information based on micro-service network model
CN116980480B (en) * 2023-09-25 2024-02-27 上海伊邦医药信息科技股份有限公司 Method and system for processing fusing information based on micro-service network model

Also Published As

Publication number Publication date
CN112306701B (en) 2024-05-03

Similar Documents

Publication Publication Date Title
US10833995B2 (en) Method and apparatus for datacenter congestion control based on software defined network
CN109842694B (en) Method for synchronizing MAC addresses, network equipment and computer readable storage medium
CN107707557B (en) Anonymous access method, device, network equipment and readable storage medium
CN109617806B (en) Data traffic scheduling method and device
CN111917586A (en) Container bandwidth adjusting method, server and storage medium
CN109040186A (en) A kind of mqtt data processing method and device based on nbiot network
CN109104368B (en) Connection request method, device, server and computer readable storage medium
CN111818158A (en) Gateway control method, device, electronic equipment and storage medium
CN114090033A (en) OTA (over the air) upgrading method and device, electronic equipment and readable medium
CN113709810A (en) Method, device and medium for configuring network service quality
CN112685287A (en) Product data testing method and device, storage medium and electronic device
CN117376032A (en) Security service scheduling method and system, electronic equipment and storage medium
CN112306811A (en) PHP micro-service control method, system, terminal and medium
CN112333659A (en) Internet of vehicles-based over-the-air downloading method, system, equipment and medium
CN112306701B (en) Service fusing method, device, equipment and storage medium
CN112748962B (en) Application loading method, device, electronic equipment and computer readable medium
EP3398304B1 (en) Network service requests
KR20210043654A (en) Method, apparatus and storage medium for resource organization
CN116112572A (en) Service processing method, device, network equipment and storage medium
CN110928693B (en) Computing equipment and resource allocation method
CN111104229B (en) Method, apparatus and computer readable storage medium for data processing
CN113595887A (en) Flow control method and device in mail system
US11140001B2 (en) Method for providing data packets from a CAN bus, control device and system having a CAN bus
CN112994942A (en) SDN control method and device
CN112399378A (en) Internet of vehicles-based over-the-air downloading method, system, equipment and medium

Legal Events

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