CN113923200A - Method and device for realizing massive API gateway service - Google Patents

Method and device for realizing massive API gateway service Download PDF

Info

Publication number
CN113923200A
CN113923200A CN202111188081.9A CN202111188081A CN113923200A CN 113923200 A CN113923200 A CN 113923200A CN 202111188081 A CN202111188081 A CN 202111188081A CN 113923200 A CN113923200 A CN 113923200A
Authority
CN
China
Prior art keywords
api
service
configuration
request
control plane
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
CN202111188081.9A
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.)
Shanghai Zhongtongji Network Technology Co Ltd
Original Assignee
Shanghai Zhongtongji 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 Shanghai Zhongtongji Network Technology Co Ltd filed Critical Shanghai Zhongtongji Network Technology Co Ltd
Priority to CN202111188081.9A priority Critical patent/CN113923200A/en
Publication of CN113923200A publication Critical patent/CN113923200A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/02Protocols based on web technology, e.g. hypertext transfer protocol [HTTP]
    • 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/44Arrangements for executing specific programs
    • G06F9/445Program loading or initiating
    • G06F9/44505Configuring for program initiating, e.g. using registry, configuration files
    • 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/50Allocation of resources, e.g. of the central processing unit [CPU]
    • G06F9/5083Techniques for rebalancing the load in a distributed system
    • 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/544Buffers; Shared memory; Pipes
    • 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/547Remote procedure calls [RPC]; Web services
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L41/00Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
    • H04L41/06Management of faults, events, alarms or notifications
    • H04L41/0631Management of faults, events, alarms or notifications using root cause analysis; using analysis of correlation between notifications, alarms or events based on decision criteria, e.g. hierarchy, tree or time analysis
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L41/00Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
    • H04L41/08Configuration management of networks or network elements
    • H04L41/0803Configuration setting

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Computer And Data Communications (AREA)
  • Data Exchanges In Wide-Area Networks (AREA)

Abstract

The invention relates to a method and a device for realizing massive API gateway service, wherein the API gateway comprises a control surface, a configuration center and a data surface, a management platform of the control surface finishes the whole life cycle management and configuration issuing work of an API, and a monitoring center finishes the collection and service alarm of monitoring data requested by the API; configuring information interaction between a control plane and a data plane of a center; the data plane calls a back-end RPC service; the implementation method of the API gateway service comprises the following steps: the control plane collects monitoring data requested by the API; and the data plane receives the API request through the Nginx load balancing system, calls a back-end RPC service to analyze the API request and returns a response result. The invention can rapidly open the service interface only by a configuration mode, uniformly provides non-service basic capabilities such as authentication, current limiting, fusing and the like, and supports service research personnel to expand the API gateway capability by developing custom components, thereby not only improving the research and development efficiency, but also reducing the communication cost and improving the resource utilization rate.

Description

Method and device for realizing massive API gateway service
Technical Field
The invention belongs to the technical field of internet, and particularly relates to a method and a device for realizing massive API gateway services.
Background
An API (Application Programming Interface) is a predefined function, and an Application encapsulates its service capability into an API and opens the API to a user for calling through an API gateway. The API includes basic information, request paths and parameters of the front and back ends, and request-related protocols.
Before the API gateway is not available, business developers would like to export internal services as an external HTTP API interface. Usually, a Web application is built for completing basic operations such as authentication, current limiting, log monitoring, parameter verification, protocol conversion and the like, and meanwhile, code logic and basic component upgrading need to be maintained, and research and development efficiency is relatively low. In addition, each Web application needs to maintain a machine, a configuration, a database, and the like, and the resource utilization rate is very poor.
In the related art, the service line has no existing solution, and cannot realize the function and data open to the outside in a configuration mode.
Disclosure of Invention
In view of this, the present invention aims to overcome the defects in the prior art, and provides a method and an apparatus for implementing a massive API gateway service, so as to solve the problem that the external open function and data cannot be implemented in a configuration manner in the prior art.
In order to achieve the purpose, the invention adopts the following technical scheme: a method for realizing API gateway service comprises the following steps: an API gateway, the API gateway comprising: the system comprises a control plane, a configuration center and a data plane, wherein the control plane, the configuration center and the data plane are sequentially connected to form a loop;
the control plane comprises a management platform and a monitoring center; the management platform is used for completing the full life cycle management and configuration issuing work of the API, and the monitoring center is used for completing the collection of monitoring data requested by the API and service alarm;
the configuration center is used for information interaction between the control plane and the data plane;
the data plane is used for calling a back-end RPC service;
the implementation method of the API gateway service comprises the following steps:
the control plane collects monitoring data requested by the API;
and the data plane receives the API request through the Nginx load balancing system, calls a back-end RPC service to analyze the API request and returns a response result.
Further, the API request is initiated by a mobile application, a Web application, a partner, or an internal system.
Further, the control plane collects monitoring data requested by the API, including:
parameter entry, DSL script generation to create an API;
performing API test through the document and the MOCK function;
and issuing the API after performing issuing approval, gray scale online and version rollback on the API.
Further, the method also comprises the following steps:
monitoring calling failure conditions of the API during the running of the API, recording request logs, and giving an alarm in time when abnormality is found.
Further, the method also comprises the following steps:
after the API which is not used any more is offline, various resources occupied by the API are recovered and are waited for re-starting.
Furthermore, the configuration center adopts a mode of combining the uniform configuration management service Lion and the local cache to realize dynamic configuration and issue without stopping.
Further, the receiving, by the data plane through an Nginx load balancing system, the API request includes:
after the data plane acquires the API configuration, establishing a request path and routing information of the API configuration in a memory;
the request path includes:
the MAP structure does not contain direct mapping of path variables, wherein Key is complete domain name and path information, and Value is specific API configuration;
a prefix tree data structure containing path variables; the prefix tree data structure firstly carries out accurate searching of leaf nodes in a prefix matching mode, searching nodes are put on a stack for processing, if the matching is not good, a stack top node is pulled out, then variable nodes at the same level are put on the stack, if the variable nodes can not be found, backtracking is continued until a path node is found or a path node is not found, and the path node is exited.
Further, invoking a back-end RPC service to analyze the API request and return a response result, including:
the method comprises the steps of obtaining HTTP request parameters and Context local parameters, assembling back-end service parameters, completing protocol conversion from an HTTP protocol to back-end service, calling the back-end service to obtain a response result and converting the response result into an HTTP response result.
An embodiment of the present application provides an apparatus for implementing a massive API gateway service, including: an API gateway, the API gateway comprising: the system comprises a control plane, a configuration center and a data plane, wherein the control plane, the configuration center and the data plane are sequentially connected to form a loop;
the control plane comprises a management platform and a monitoring center; the management platform is used for completing the full life cycle management and configuration issuing work of the API, and the monitoring center is used for completing the collection of monitoring data requested by the API and service alarm;
the configuration center is used for information interaction between the control plane and the data plane;
the data plane is used for calling a back-end RPC service;
the implementation method of the API gateway service comprises the following steps:
the collection module is used for the control plane to collect the monitoring data requested by the API;
and the response module is used for receiving the API request through the Nginx load balancing system by the data plane, calling a back-end RPC service to analyze the API request and returning a response result.
By adopting the technical scheme, the invention can achieve the following beneficial effects:
1, improving the research and development efficiency
(1) Service research personnel can open the service interface quickly only through a configuration mode.
(2) And uniformly providing non-service basic capabilities such as authentication, current limiting, fusing and the like.
(3) And supporting business research personnel to expand the capability of the API gateway by developing the custom components.
2, reducing communication cost
The service research personnel configures the API, can automatically generate front-end and back-end interaction documents and client SDK of the API, and is convenient for the front-end and back-end development personnel to carry out interaction and joint debugging.
3, improving the resource utilization rate
Based on the Serverless architecture idea, API full hosting is realized, and business research personnel do not need to concern about the problem of machine resources.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, it is obvious that the drawings in the following description are only some embodiments of the present invention, and for those skilled in the art, other drawings can be obtained according to the drawings without creative efforts.
FIG. 1 is an overall architecture diagram of the massive API gateway of the present invention;
FIG. 2 is a schematic diagram illustrating steps of a method for implementing a massive API gateway service according to the present invention;
FIG. 3 is a flow chart of a control plane of the massive API gateway service of the present invention;
FIG. 4 is a schematic flow chart of the data plane of the massive API gateway service of the present invention;
FIG. 5 is a schematic diagram of the processing logic of the API request path into the data plane of the present invention;
FIG. 6 is a schematic diagram of a process for implementing cluster isolation according to the service line dimension of the present invention;
FIG. 7 is a schematic diagram of an implementation flow of stability guarantee of the API gateway according to the present invention;
fig. 8 is a schematic structural diagram of an implementation apparatus of a massive API gateway service according to the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the present invention more apparent, the technical solutions of the present invention will be described in detail below. It is to be understood that the described embodiments are merely exemplary of the invention, and not restrictive of the full scope of the invention. All other embodiments, which can be derived by a person skilled in the art from the examples given herein without any inventive step, are within the scope of the present invention.
A specific implementation method and apparatus for a massive API gateway service provided in the embodiments of the present application are described below with reference to the accompanying drawings.
As shown in fig. 1, an implementation method of an API gateway service provided in this embodiment of the present application includes: an API gateway, the API gateway comprising: the system comprises a control plane, a configuration center and a data plane, wherein the control plane, the configuration center and the data plane are sequentially connected to form a loop;
the control plane comprises a management platform and a monitoring center; the management platform is used for completing the full life cycle management and configuration issuing work of the API, and the monitoring center is used for completing the collection of monitoring data requested by the API and service alarm;
the configuration center is used for information interaction between the control plane and the data plane;
the data plane is used for calling a back-end RPC service;
as shown in fig. 2, the method for implementing the API gateway service includes:
s101, a control plane collects monitoring data requested by an API;
and S102, the data plane receives the API request through the Nginx load balancing system, calls a back-end RPC service to analyze the API request and returns a response result.
Preferably, the API request is initiated by a mobile application, a Web application, a partner, or an internal system.
The working principle of the implementation method of the massive API gateway service is as follows: the API gateway provided by the present application is roughly divided into 3 large modules:
control plane: the control plane of the API gateway consists of a management platform and a monitoring center. The management platform mainly completes the whole life cycle management and configuration issuing work of the API, and the monitoring center completes the functions of collecting API request monitoring data and service warning.
A configuration center: the configuration center of the API gateway mainly completes information interaction between the control plane and the data plane and is realized by the service Lion configured by the American group in a unified manner.
Data plane: the data plane of the API gateway is also the server side. A complete API request may originate from a mobile application, a Web application, a partner, or an internal system, and arrive at the server after passing through the Nginx load balancing system. The server integrates a series of basic function components and service self-defining components, requests a back-end RPC service, an HTTP service, a function service or a service arrangement service through generalization, and finally returns a response result.
In some embodiments, as shown in fig. 3, the control plane collects monitoring data requested by the API, including:
parameter entry, DSL script generation to create an API;
performing API test through the document and the MOCK function;
and issuing the API after performing issuing approval, gray scale online and version rollback on the API.
Preferably, the method further comprises the following steps:
monitoring calling failure conditions of the API during the running of the API, recording request logs, and giving an alarm in time when abnormality is found.
Preferably, the method further comprises the following steps:
after the API which is not used any more is offline, various resources occupied by the API are recovered and are waited for re-starting.
Specifically, by using the control plane of the API gateway, service research personnel can easily complete the full-life-cycle management of the API, and the service research personnel complete the parameter entry and the DSL script generation from the creation of the API; then, API test can be carried out through the document and the MOCK function; after the API test is finished, in order to ensure the online stability, the management platform provides a series of safety guarantee measures such as release approval, gray level online, version rollback and the like; monitoring calling failure conditions of the API during the running of the API, recording request logs, and sending an alarm in time once abnormality is found; and finally, after the API which is not used any more is offline, various resources occupied by the API are recovered and are waited to be re-started.
The whole life cycle of the control surface is managed by business research personnel in a self-service mode in a configuration mode and a flow mode, the starting time is basically within 10 minutes, and the research and development efficiency is greatly improved.
Preferably, the configuration center adopts a mode of combining a uniform configuration management service Lion and a local cache to realize dynamic configuration and release without stopping.
The configuration center of the API gateway stores relevant configuration information of the API, which is described by using a custom DSL (Domain-Specific Language), and is used for issuing configuration changes of the API, such as routing, rules, and components, to the data plane of the API gateway.
The design of the configuration center adopts a mode of combining the uniform configuration management service Lion and the local cache to realize dynamic configuration and release without stopping. The configuration of the API includes API name, group name, functional component, front end component, back end component, request information, response information, back end service, and component configuration.
Detailed description of API configuration:
name, Group: name, belonging group.
Request: domain name, path, parameters, etc. of the request.
Response: result assembly of response, exception handling, Header, Cookies information.
Filters, FilterConfigs: the API uses the functional components and configuration information used.
Inkers: request rules and orchestration information for back-end services (RPC/HTTP/Function).
In some embodiments, the receiving, by the data plane, the API request via a Nginx load balancing system comprises:
after the data plane acquires the API configuration, establishing a request path and routing information of the API configuration in a memory;
the request path includes:
the MAP structure does not contain direct mapping of path variables, wherein Key is complete domain name and path information, and Value is specific API configuration;
a prefix tree data structure containing path variables; the prefix tree data structure firstly carries out accurate searching of leaf nodes in a prefix matching mode, searching nodes are put on a stack for processing, if the matching is not good, a stack top node is pulled out, then variable nodes at the same level are put on the stack, if the variable nodes can not be found, backtracking is continued until a path node is found or a path node is not found, and the path node is exited.
As shown in fig. 4, after the data plane of the API gateway senses the API configuration, a request path and routing information of the API configuration are established in the memory. Usually, the HTTP request path contains some path variables, and two data structures are designed to store the path variables in consideration of performance.
When the requested traffic hits the API request path into the service, i.e. the data plane, the specific processing logic is performed by a series of functional components configured in the DSL. The gateway provides rich functional component integration including link tracking, real-time monitoring, access logs, parameter checking, authentication, current limiting, fuse degradation, gray level splitting, etc., as shown in fig. 5.
Preferably, the step of calling the back-end RPC service to analyze the API request and return a response result includes:
the method comprises the steps of obtaining HTTP request parameters and Context local parameters, assembling back-end service parameters, completing protocol conversion from an HTTP protocol to back-end service, calling the back-end service to obtain a response result and converting the response result into an HTTP response result.
Specifically, the last step of the API call is the protocol conversion and the service call. The tasks that the gateway needs to complete include: the method comprises the steps of obtaining HTTP request parameters and Context local parameters, assembling back-end service parameters, completing protocol conversion from an HTTP protocol to back-end service, calling the back-end service to obtain a response result and converting the response result into an HTTP response result. The method includes the steps of taking call of a back-end RPC service as an example, obtaining parameter values of different parts of an HTTP request through a JsonPath expression, replacing Value of corresponding parts of RPC request parameters, generating service parameters DSL, and finally completing the service call by means of RPC generalized call.
As shown in fig. 6, the implementation method of the massive API gateway service provided by the present application refers to the experience of mature components such as company cache and task scheduling, and at the beginning of design, cluster isolation according to the service line dimension is considered, and independent deployment of important services is also supported.
In addition, as shown in fig. 7, the implementation method of the massive API gateway service provided by the present application further has stability guarantee, including:
flow management and control: and providing flow protection from multiple dimensions such as user-defined UUID flow limitation, App flow limitation, IP flow limitation, cluster flow limitation and the like.
Requesting for caching: for some idempotent requests which are frequently inquired and insensitive to data timeliness, service research personnel can start a request caching function.
And (4) timeout management: each API sets the processing overtime time, and carries out quick failure processing on overtime requests, so that resource occupation is avoided.
Fusing degradation: and supporting a fusing degradation function, monitoring the statistical information of the request in real time, fusing automatically after a configured failure threshold value is reached, and returning to a default value.
As shown in fig. 8, an embodiment of the present application provides an apparatus for implementing a massive API gateway service, including: an API gateway, the API gateway comprising: the system comprises a control plane, a configuration center and a data plane, wherein the control plane, the configuration center and the data plane are sequentially connected to form a loop;
the control plane comprises a management platform and a monitoring center; the management platform is used for completing the full life cycle management and configuration issuing work of the API, and the monitoring center is used for completing the collection of monitoring data requested by the API and service alarm;
the configuration center is used for information interaction between the control plane and the data plane;
the data plane is used for calling a back-end RPC service;
the implementation method of the API gateway service comprises the following steps:
the collection module is used for the control plane to collect the monitoring data requested by the API;
and the response module is used for receiving the API request through the Nginx load balancing system by the data plane, calling a back-end RPC service to analyze the API request and returning a response result.
The embodiment of the application provides computer equipment, which comprises a processor and a memory connected with the processor;
the memory is used for storing a computer program, and the computer program is used for executing the implementation method of the massive API gateway service provided by any one of the embodiments;
the processor is used to call and execute the computer program in the memory.
In summary, the present invention provides a method and an apparatus for implementing massive API gateway services, including an API gateway, where the API gateway includes: the system comprises a control plane, a configuration center and a data plane, wherein the control plane, the configuration center and the data plane are sequentially connected to form a loop; the control plane comprises a management platform and a monitoring center; the management platform is used for completing the full life cycle management and configuration issuing work of the API, and the monitoring center is used for completing the collection of monitoring data requested by the API and service alarm; the configuration center is used for information interaction between the control plane and the data plane; the data plane is used for calling a back-end RPC service; the implementation method of the API gateway service comprises the following steps: the control plane collects monitoring data requested by the API; and the data plane receives the API request through the Nginx load balancing system, calls a back-end RPC service to analyze the API request and returns a response result. This application has realized following beneficial effect through above-mentioned technical scheme:
1, improving the research and development efficiency
(1) Service research personnel can open the service interface quickly only through a configuration mode.
(2) And uniformly providing non-service basic capabilities such as authentication, current limiting, fusing and the like.
(3) And supporting business research personnel to expand the capability of the API gateway by developing the custom components.
2, reducing communication cost
The service research personnel configures the API, can automatically generate front-end and back-end interaction documents and client SDK of the API, and is convenient for the front-end and back-end development personnel to carry out interaction and joint debugging.
3, improving the resource utilization rate
Based on the Serverless architecture idea, API full hosting is realized, and business research personnel do not need to concern about the problem of machine resources.
It is to be understood that the embodiments of the method provided above correspond to the embodiments of the apparatus described above, and the corresponding specific contents may be referred to each other, which is not described herein again.
As will be appreciated by one skilled in the art, embodiments of the present application may be provided as a method, system, or computer program product. Accordingly, the present application may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present application may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, optical storage, and the like) having computer-usable program code embodied therein.
The present application is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the application. It will be understood that each flow and/or block of the flow diagrams and/or block diagrams, and combinations of flows and/or blocks in the flow diagrams and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
The above description is only for the specific embodiments of the present invention, but the scope of the present invention is not limited thereto, and any person skilled in the art can easily conceive of the changes or substitutions within the technical scope of the present invention, and all the changes or substitutions should be covered within the scope of the present invention. Therefore, the protection scope of the present invention shall be subject to the protection scope of the appended claims.

Claims (9)

1. A method for realizing massive API gateway services is characterized by comprising the following steps: an API gateway, the API gateway comprising: the system comprises a control plane, a configuration center and a data plane, wherein the control plane, the configuration center and the data plane are sequentially connected to form a loop;
the control plane comprises a management platform and a monitoring center; the management platform is used for completing the full life cycle management and configuration issuing work of the API, and the monitoring center is used for completing the collection of monitoring data requested by the API and service alarm;
the configuration center is used for information interaction between the control plane and the data plane;
the data plane is used for calling a back-end RPC service;
the implementation method of the API gateway service comprises the following steps:
the control plane collects monitoring data requested by the API;
and the data plane receives the API request through the Nginx load balancing system, calls a back-end RPC service to analyze the API request and returns a response result.
2. The method of claim 1,
the API request is initiated by a mobile application, a Web application, a partner, or an internal system.
3. The method according to claim 1 or 2, wherein the control plane collects monitoring data requested by the API, comprising:
parameter entry, DSL script generation to create an API;
performing API test through the document and the MOCK function;
and issuing the API after performing issuing approval, gray scale online and version rollback on the API.
4. The method of claim 3, further comprising:
monitoring calling failure conditions of the API during the running of the API, recording request logs, and giving an alarm in time when abnormality is found.
5. The method of claim 4, further comprising:
after the API which is not used any more is offline, various resources occupied by the API are recovered and are waited for re-starting.
6. The method of claim 1,
the configuration center adopts a mode of combining the unified configuration management service Lion and the local cache to realize dynamic configuration and release without stopping.
7. The method of claim 1, wherein the data plane receives the API request through a Nginx load balancing system, comprising:
after the data plane acquires the API configuration, establishing a request path and routing information of the API configuration in a memory;
the request path includes:
the MAP structure does not contain direct mapping of path variables, wherein Key is complete domain name and path information, and Value is specific API configuration;
a prefix tree data structure containing path variables; the prefix tree data structure firstly carries out accurate searching of leaf nodes in a prefix matching mode, searching nodes are put on a stack for processing, if the matching is not good, a stack top node is pulled out, then variable nodes at the same level are put on the stack, if the variable nodes can not be found, backtracking is continued until a path node is found or a path node is not found, and the path node is exited.
8. The method of claim 1, wherein invoking a back-end RPC service to parse the API request and return a response result comprises:
the method comprises the steps of obtaining HTTP request parameters and Context local parameters, assembling back-end service parameters, completing protocol conversion from an HTTP protocol to back-end service, calling the back-end service to obtain a response result and converting the response result into an HTTP response result.
9. An apparatus for implementing massive API gateway services, comprising: an API gateway, the API gateway comprising: the system comprises a control plane, a configuration center and a data plane, wherein the control plane, the configuration center and the data plane are sequentially connected to form a loop;
the control plane comprises a management platform and a monitoring center; the management platform is used for completing the full life cycle management and configuration issuing work of the API, and the monitoring center is used for completing the collection of monitoring data requested by the API and service alarm;
the configuration center is used for information interaction between the control plane and the data plane;
the data plane is used for calling a back-end RPC service;
the implementation method of the API gateway service comprises the following steps:
the collection module is used for the control plane to collect the monitoring data requested by the API;
and the response module is used for receiving the API request through the Nginx load balancing system by the data plane, calling a back-end RPC service to analyze the API request and returning a response result.
CN202111188081.9A 2021-10-12 2021-10-12 Method and device for realizing massive API gateway service Pending CN113923200A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111188081.9A CN113923200A (en) 2021-10-12 2021-10-12 Method and device for realizing massive API gateway service

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111188081.9A CN113923200A (en) 2021-10-12 2021-10-12 Method and device for realizing massive API gateway service

Publications (1)

Publication Number Publication Date
CN113923200A true CN113923200A (en) 2022-01-11

Family

ID=79239613

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111188081.9A Pending CN113923200A (en) 2021-10-12 2021-10-12 Method and device for realizing massive API gateway service

Country Status (1)

Country Link
CN (1) CN113923200A (en)

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114363092A (en) * 2022-03-17 2022-04-15 万商云集(成都)科技股份有限公司 Gateway and method for cloud container engine micro-service deployment
CN114648411A (en) * 2022-03-25 2022-06-21 四川新网银行股份有限公司 Gateway service one-key publishing method, system and storage medium
CN116016675A (en) * 2022-11-29 2023-04-25 北京奇艺世纪科技有限公司 Service request processing method and device, gateway equipment and storage medium
CN116016042A (en) * 2023-01-09 2023-04-25 河南垂天科技有限公司 Dynamic component expansion implementation method based on API gateway
CN116743833A (en) * 2023-08-16 2023-09-12 雄安国创中心科技有限公司 Method and device for enhancing communication capability and network control capability of terminal and service

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108874567A (en) * 2018-07-19 2018-11-23 广州市创乐信息技术有限公司 A kind of service processing method and system
CN109067862A (en) * 2018-07-23 2018-12-21 北京邮电大学 The method and apparatus of API Gateway automatic telescopic
CN110784527A (en) * 2019-10-18 2020-02-11 三体云智能科技有限公司 Information management system and method
CN111181727A (en) * 2019-12-16 2020-05-19 北京航天智造科技发展有限公司 Open API full life cycle management method based on micro service
US20210006496A1 (en) * 2018-03-21 2021-01-07 Huawei Technologies Co., Ltd. Application Programing Interface API Gateway Cluster Control Method and API Gateway Cluster
CN112612629A (en) * 2020-12-28 2021-04-06 广东广宇科技发展有限公司 Method and system for realizing component type data interface
CN112769687A (en) * 2020-12-10 2021-05-07 前海飞算科技(深圳)有限公司 API gateway platform

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20210006496A1 (en) * 2018-03-21 2021-01-07 Huawei Technologies Co., Ltd. Application Programing Interface API Gateway Cluster Control Method and API Gateway Cluster
CN108874567A (en) * 2018-07-19 2018-11-23 广州市创乐信息技术有限公司 A kind of service processing method and system
CN109067862A (en) * 2018-07-23 2018-12-21 北京邮电大学 The method and apparatus of API Gateway automatic telescopic
CN110784527A (en) * 2019-10-18 2020-02-11 三体云智能科技有限公司 Information management system and method
CN111181727A (en) * 2019-12-16 2020-05-19 北京航天智造科技发展有限公司 Open API full life cycle management method based on micro service
CN112769687A (en) * 2020-12-10 2021-05-07 前海飞算科技(深圳)有限公司 API gateway platform
CN112612629A (en) * 2020-12-28 2021-04-06 广东广宇科技发展有限公司 Method and system for realizing component type data interface

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
李莹: "美团点评API网关系统网关核心模块的设计与实现", 《中国优秀硕士学位论文全文数据库·信息科技辑》, 15 April 2021 (2021-04-15), pages 4 *

Cited By (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114363092A (en) * 2022-03-17 2022-04-15 万商云集(成都)科技股份有限公司 Gateway and method for cloud container engine micro-service deployment
CN114363092B (en) * 2022-03-17 2022-05-17 万商云集(成都)科技股份有限公司 Gateway and method for cloud container engine micro-service deployment
CN114648411A (en) * 2022-03-25 2022-06-21 四川新网银行股份有限公司 Gateway service one-key publishing method, system and storage medium
CN116016675A (en) * 2022-11-29 2023-04-25 北京奇艺世纪科技有限公司 Service request processing method and device, gateway equipment and storage medium
CN116016042A (en) * 2023-01-09 2023-04-25 河南垂天科技有限公司 Dynamic component expansion implementation method based on API gateway
CN116743833A (en) * 2023-08-16 2023-09-12 雄安国创中心科技有限公司 Method and device for enhancing communication capability and network control capability of terminal and service
CN116743833B (en) * 2023-08-16 2023-11-03 雄安国创中心科技有限公司 Method and device for enhancing communication capability and network control capability of terminal and service

Similar Documents

Publication Publication Date Title
CN113923200A (en) Method and device for realizing massive API gateway service
CN111045656A (en) Method and system for constructing platform system infrastructure in government affair service
CN112000448A (en) Micro-service architecture-based application management method
CN103634382B (en) A kind of system and method for realizing real-time, interactive on webpage
CN112419129A (en) Method and system for constructing platform system infrastructure in government affair service
CN101860564A (en) Protocol-based service combination system and method
CN111400011A (en) Real-time task scheduling method, system, equipment and readable storage medium
CN110661780A (en) Wireless city data sharing method and system based on SAAS application
Fei et al. A policy-driven distributed framework for monitoring quality of web services
CN105446819B (en) A kind of service connection system and its design method
CN109617966A (en) A kind of cloud pipe Platform deployment system and method based on Openstack
CN113297148B (en) Method, device and equipment for collecting service log data and readable storage medium
CN116974948B (en) Service system testing method, system, equipment and medium
CN114422542A (en) Terminal domain management system
CN116204239A (en) Service processing method, device and computer readable storage medium
CN110674173A (en) Method and system for caching data on wind control cloud
CN114338684A (en) Energy management system and method
Huang et al. Research and application of microservice in power grid dispatching control system
CN108959041B (en) Method for transmitting information, server and computer readable storage medium
CN115695138A (en) Micro-service architecture design method, device and computer readable storage medium
CN114610732A (en) Bottom-pocketing data processing method and device
CN114500589A (en) Public service supporting platform for industrial internet identification analysis
CN209283262U (en) A kind of application platform system and business service system
CN113596170A (en) Load balancing equipment-based shutdown processing method, device, medium and equipment
Spillner et al. RAFT-REST-A client-side framework for reliable, adaptive and fault-tolerant restful service consumption

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