CN108965007A - API gateway interface configures update method and device - Google Patents

API gateway interface configures update method and device Download PDF

Info

Publication number
CN108965007A
CN108965007A CN201810796256.6A CN201810796256A CN108965007A CN 108965007 A CN108965007 A CN 108965007A CN 201810796256 A CN201810796256 A CN 201810796256A CN 108965007 A CN108965007 A CN 108965007A
Authority
CN
China
Prior art keywords
api
center
interface
configuration information
api interface
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
CN201810796256.6A
Other languages
Chinese (zh)
Other versions
CN108965007B (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.)
Beijing Rockwell Technology Co Ltd
Original Assignee
Beijing CHJ Automotive 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 Beijing CHJ Automotive Information Technology Co Ltd filed Critical Beijing CHJ Automotive Information Technology Co Ltd
Priority to CN201810796256.6A priority Critical patent/CN108965007B/en
Publication of CN108965007A publication Critical patent/CN108965007A/en
Application granted granted Critical
Publication of CN108965007B publication Critical patent/CN108965007B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • 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
    • H04L41/0813Configuration setting characterised by the conditions triggering a change of settings
    • H04L41/0816Configuration setting characterised by the conditions triggering a change of settings the condition being an adaptation, e.g. in response to network events
    • 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/4401Bootstrapping
    • G06F9/4416Network booting; Remote initial program loading [RIPL]
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L12/00Data switching networks
    • H04L12/66Arrangements for connecting between networks having differing types of switching systems, e.g. gateways

Abstract

The invention discloses a kind of API gateway interface configuration update method and devices, comprising: decentralized configuration center is written in the configuration information of api interface;API gateway on startup, the configuration information for each api interface that the API gateway includes is obtained from the decentralized configuration center;When the configuration information update for the api interface being written in the decentralized configuration center, corresponding api interface obtains updated configuration information from the decentralized configuration center.In this way, the heat that can be realized the configuration information of api interface updates by the way that decentralized configuration center is written in the configuration information of api interface, the maintenance difficulties of API gateway are reduced, stability is improved.

Description

API gateway interface configures update method and device
Technical field
The present invention relates to information technology fields, and in particular to a kind of API gateway interface configuration update method and device.
Background technique
Currently, many enterprises are by API gateway, (Application Programming Interface Gateway is applied Program Interfaces gateway is abbreviated as API gateway or API-Gateway) as the unique of outside access enterprises API service Entrance.
Routing iinformation is usually configured in the configuration file of project by existing API gateway, if this mode needs Interface configured and be modified, then need to restart API gateway after each modification.
So existing API gateway interface configuration there are problems that being difficult to safeguard.
Summary of the invention
In a first aspect, embodiment of the disclosure provides a kind of interface configuration update method of API gateway, comprising:
Decentralized configuration center is written into the configuration information of api interface;
API gateway obtains each api interface that the API gateway includes on startup, from the decentralized configuration center Configuration information;
When the configuration information update for the api interface being written in the decentralized configuration center, corresponding api interface from The decentralized configuration center obtains updated configuration information.
In some embodiments, the configuration information by api interface is written after decentralized configuration center, further includes:
It establishes the API gateway and the long of the decentralized configuration center connects, and at the decentralized configuration center The monitoring event of the configuration information update state of api interface is monitored in registration center's registration.
In some embodiments, the configuration information of the api interface being written in the decentralized configuration center is more When new, corresponding api interface obtains updated configuration information from the decentralized configuration center, comprising:
When the configuration information update for the api interface being written in the decentralized configuration center, according to the monitoring event More new information is sent to corresponding api interface;
The api interface for receiving the more new information obtains more according to the more new information from the decentralized configuration center Configuration information after new.
In some embodiments, further includes:
Equipment where registering the corresponding service item of each api interface in the registration center at decentralized configuration center;
The list of devices of registered device is read from the registration center according to service item;
When receiving the access request of client access target service item, according to the destination service project from it is described It registers in the list of devices of equipment and chooses target device;
Access request according to the client accesses the target device, and receives the access that the target device returns As a result;
The access result of the return of the target device is sent to the client.
In some embodiments, described to be selected from the list of devices of the registered device according to the destination service project Take target device, comprising:
It is when there is the equipment that load is less than default load value in the list of devices of the registered device, then small from loading An equipment is randomly selected in the equipment of the default load value as the target device;
There is no when the equipment that load is less than default load value in the list of devices of the registered device, then institute is chosen It states and loads the smallest equipment in list of devices as the target device.
Second aspect, embodiment of the disclosure provide a kind of interface configuration updating device of API gateway, and feature exists In, comprising:
Writing module, for decentralized configuration center to be written in the configuration information of api interface;
Module is obtained, on startup for API gateway, obtaining the API gateway from the decentralized configuration center includes Each api interface configuration information;
Update module, when the configuration information update of the api interface for being written in the decentralized configuration center, phase The api interface answered obtains updated configuration information from the decentralized configuration center.
In some embodiments, further includes:
Module is monitored, is connected for establishing the API gateway and the long of the decentralized configuration center, and in the distribution The monitoring event of the configuration information update state of api interface is monitored in registration center's registration of formula configuration center.
In some embodiments, the update module includes:
Sending submodule, when the configuration information update of the api interface for being written in the decentralized configuration center, root More new information is sent to corresponding api interface according to the monitoring event;
Submodule is updated, for receiving api interface more new information according to of the more new information from the distribution Formula configuration center obtains updated configuration information.
In some embodiments, further includes:
Registration module registers the corresponding service item institute of each api interface for the registration center at decentralized configuration center Equipment;
Read module is arranged according to service item from the equipment that the registration center reads registered device for API gateway Table;
Selecting module when for receiving the access request of client access target service item, takes according to the target Business project chooses target device from the list of devices of the registered device;
Access modules access the target device for the access request according to the client, and receive the target The access result that equipment returns;
Sending module, for the access result of the return of the target device to be sent to the client.
In some embodiments, the selecting module includes:
First choice submodule is less than default load value for there is load in the list of devices of the registered device Equipment when, then from load be less than the default load value equipment in randomly select an equipment as the target device;
Second selection submodule, for there is no loads to be less than default load in the list of devices of the registered device When the equipment of value, then chooses and load the smallest equipment in the list of devices as the target device.
The third aspect, embodiment of the disclosure provide a kind of server, including processor, memory and are stored in described It is real when the computer program is executed by the processor on memory and the computer program that can run on the processor The step of existing API gateway interface configuration update method as described in any one of the above embodiments.
Fourth aspect, embodiment of the disclosure provide a kind of computer readable storage medium, are stored thereon with computer Program, the computer program realize API gateway interface configuration update method described in any of the above embodiments when being executed by processor The step of.
Detailed description of the invention
In order to illustrate the technical solution of the embodiments of the present invention more clearly, needed in being described below to the embodiment of the present invention Attached drawing to be used is briefly described, it should be apparent that, drawings in the following description are only some embodiments of the invention, For those of ordinary skill in the art, without any creative labor, it can also obtain according to these attached drawings Obtain other attached drawings.
Fig. 1 is a kind of flow chart of API gateway interface configuration update method in embodiment of the disclosure;
Fig. 2 is the flow chart that another API gateway interface configures updating device in embodiment of the disclosure;
Fig. 3 is a kind of structure chart of API gateway interface configuration updating device in embodiment of the disclosure;
Fig. 4 is the structure chart that another API gateway interface configures updating device in embodiment of the disclosure;
Fig. 5 is the structure chart that another API gateway interface configures updating device in embodiment of the disclosure;
Fig. 6 is the structure chart that another API gateway interface configures updating device in embodiment of the disclosure;
Fig. 7 is the structure chart that another API gateway interface configures updating device in embodiment of the disclosure.
Specific embodiment
Following will be combined with the drawings in the embodiments of the present invention, and technical solution in the embodiment of the present invention carries out clear, complete Site preparation description, it is clear that described embodiments are some of the embodiments of the present invention, instead of all the embodiments.Based on this hair Embodiment in bright, every other implementation obtained by those of ordinary skill in the art without making creative efforts Example, shall fall within the protection scope of the present invention.
Embodiment of the disclosure provides a kind of API gateway interface configuration update method.
As shown in Figure 1, in a specific embodiment, the API gateway interface configure update method comprising steps of
Step 101: decentralized configuration center is written into the configuration information of api interface.
In embodiment of the disclosure, relevant API configuration information is configured in management backstage first, it then will be configured API configuration information is written in decentralized configuration center.Wherein, decentralized configuration center can be zookpeer configuration center, The various decentralized configuration centers such as mysql configuration center, git configuration center, eureka configuration center, to configuration in the present embodiment The concrete type at center is not further qualified.
The configuration information of api interface may include service item (service ID), service entry destination path (path), stream The parameters relevant to API configuration such as amount limitation.
In general, enterprise can provide a variety of network-based services to outside, these services are different using enterprises The equipment such as server realize that these services of outside access are required to realize that API gateway is including more by the API gateway of enterprise A api interface, each api interface are connected from different servers respectively, to provide corresponding service, correspondingly, to API net When the api interface in the Central Shanxi Plain is managed, the configuration information of each api interface is needed to configure.
In embodiment of the disclosure, the configuration information of each api interface is written in decentralized configuration center.
On startup, obtain that the API gateway includes from the decentralized configuration center is each for step 102:API gateway The configuration information of api interface.
In API gateway starting, the configuration information of configured each api interface is read from decentralized configuration center, Decentralized configuration center is used to manage the configuration information of all api interfaces, after having read configured good API information, Then complete the configuration to all api interfaces.
Step 103: when the configuration information update for the api interface being written in the decentralized configuration center, accordingly Api interface obtains updated configuration information from the decentralized configuration center.
When needing the configuration information to some api interface to be modified, to matching accordingly in decentralized configuration center Confidence breath is modified, and then corresponding api interface can read updated configuration information from decentralized configuration center, from And it can be realized and the heat of api interface is updated.
In this way, by the way that decentralized configuration center is written in API configuration information, utilizing distribution in embodiment of the disclosure Configuration center can realize the function of distributed management to parameters, when can be by the configuration information update of api interface, realize The online heat of configuration information is updated, renewal process restarting API gateway is avoided, reduces the maintenance difficulties of API gateway, Improve stability.
Fig. 2 is that the API gateway interface of the another disclosed embodiment of the present invention configures the flow chart of update method.The present embodiment It is with the main distinction of embodiment illustrated in fig. 1, corresponding monitoring event is registered also in decentralized configuration center.
Step 201: decentralized configuration center is written into the configuration information of api interface.
It first will be in the configuration information write-in decentralized configuration center of preset api interface in embodiment of the disclosure.
Step 202: establishing the API gateway and the long of the decentralized configuration center connects, and match in the distribution Set the monitoring event of the configuration information update state of registration center's registration monitoring api interface at center.
The step 202 can carry out before step 203, can also carry out before step 203.The mesh of the step 202 Essentially consist in decentralized configuration center write-in api interface configuration information update when, can timely update corresponding API The configuration information of interface.
For different decentralized configuration centers, there is also certain differences for corresponding registration center, such as For zookpeer configuration center, disconf registration center or zookeeper registration center can be, in mysql configuration For the heart, then it can be diamond registration center.
After having registered corresponding monitoring event, then it can be realized to the PI interface stored in decentralized configuration center Configuration information carries out dynamic monitoring, when realizing the configuration information update of the PI interface stored in decentralized configuration center, in time The configuration information of corresponding api interface is updated.
On startup, obtain that the API gateway includes from the decentralized configuration center is each for step 203:API gateway The configuration information of api interface.
When API gateway starts, the configuration information of each api interface is read from decentralized configuration center, is completed to api interface Configuration.
Step 204: when the configuration information update for the api interface being written in the decentralized configuration center, accordingly Api interface obtains updated configuration information from the decentralized configuration center.
When having registered corresponding monitoring event in registration center, which can also include:
When the configuration information update for the api interface being written in the decentralized configuration center, according to the monitoring event More new information is sent to corresponding api interface;
The api interface for receiving the more new information obtains more according to the more new information from the decentralized configuration center Configuration information after new.
In the present embodiment, when the configuration information update for the api interface being written in decentralized configuration center, then according to each The monitoring event that api interface is registered in the registration center at decentralized configuration center, can determine corresponding api interface, and to Corresponding api interface starts more new information, to notify its configuration information of corresponding api interface exists to update.
In this way, can be updated in time to the data of api interface by according to event update configuration information is monitored.
Further, updated configuration information is read from decentralized configuration center according to the more new information, completed to API The update of the configuration information of interface.
In embodiment of the disclosure, connected by establishing API gateway and the long of decentralized configuration center, and match in distribution Set center registration center's registration monitor api interface configuration information update state monitoring event, the distribution realized pair The monitoring of the configuration information of api interface in configuration center, can be in the configuration information of the api interface in decentralized configuration center When update, hot update is carried out to the data of api interface in time.
Further, in the above two embodiments, can with comprising steps of
Equipment where registering the corresponding service item of each api interface in the registration center at decentralized configuration center.
In embodiment of the disclosure, the registration center first at decentralized configuration center registers setting where each service item Standby, registration center here is mainly used for managing the name service of each address of service, and is refreshed in real time by long connection, to protect Demonstrate,prove the timeliness of data transmission.Such as order placement service, its address is defined as order, and register in registration center.
Here the equipment where service item refers to the equipment for being stored with related data, is commonly referred to as server or number According to library, here, illustrated for providing order placement service provided with two servers.
It should be understood that the bearing capacity due to individual server is limited, so in actual use, the clothes used Business device is usually the server of multiple shared datas, to meet outside access demand.
Each server can be numbered by respective server and be registered in registration center, can also by the address mac, The information such as the address ip are registered in registration center.Here it is said so that each server is registered in the server by the address ip as an example It is bright.
For example, the address ip of two servers is respectively 192.168.0.1 and 192.168.0.2, then by the two ip It is registered in registration center location.
API gateway reads the list of devices of registered device according to service item from the registration center.
Since the entrance of outside access request is API gateway, so, it is further read by API gateway in the present embodiment The list of devices of registered device.
In order to realize external user access associated data, API gateway reads setting for registered device from registration center Standby list, i.e., the address ip of registered server.The address ip read is saved memory inside it by API gateway In, in order to improve access speed, preferably in memory by the machine list read caching.
When receiving the access request of client access target service item, according to the destination service project from it is described It registers in the list of devices of equipment and chooses target device.
When API gateway receives the access request from client, such as client accesses order placement service, then from visitor What the access request at family end accessed first is API gateway, and submits the corresponding address of order placement service to API gateway, e.g. https://api.xxx.com/order/123424.Wherein https: //api.xxx.com/ corresponds to the address of enterprise gateway, And order/123424 is then service entry destination path, i.e. the path of order placement service.The ground that API gateway is submitted according to client Location can determine that the service of client request access is order placement service.
After API gateway obtains the path of the order placement service, according to the corresponding api interface of the route matching, service item Path be to be registered and safeguarded by registration center, it is possible to corresponding api interface is matched according to the project of access.Such as root Corresponding api interface/order/** is matched according to service path order/123424.
After corresponding api interface has been determined, then one further can be chosen from the list of devices of registered device The corresponding equipment of a api interface is as the target device for obtaining the requested data of client.
Access request according to the client accesses the target device, and receives the access that the target device returns As a result.
The related data of order placement service is stored in corresponding server, and order placement service is corresponding in embodiment of the disclosure The quantity of server is two, then one can be selected from the two servers, and requested in the request of reading client The data of acquisition, and the related data in server is returned into API gateway
The access result of the return of the target device is sent to the client.
Data are further back to client to meet the access request of user by API gateway.
Further, described that target is chosen from the list of devices of the registered device according to the destination service project Equipment, comprising:
When there is the equipment that load is less than default load value in the list of devices of the registration, then it is less than from load described An equipment is randomly selected as the target device in the equipment of default load value;
There is no when the equipment that load is less than default load value in the list of devices of the registration, then the equipment is chosen The smallest equipment is loaded in list as the target device.
Since the bearing capacity of individual server is limited, so needing to be arranged multiple servers to meet the visit of user Ask demand.
Meanwhile in order to guarantee access speed, it should be ensured that the load of server is not higher than certain value.It is preset in the present embodiment Load value may be set according to actual conditions, such as be set as the 80% of server maximum load, 85&, the various numerical value such as 90%.
When there is the server that load is less than default load value, then it is less than the server of default load value from these complexity Middle any one server of selection as target device, and from access the server in related data.
When there is no the equipment that load is less than default load value, then the smallest server will be loaded as target device, And from access the server in related data.
Further, it is also possible to share the burden of other servers by increasing additional server.
In this way, can guarantee optimal access speed, to improve user experience by the load for balancing each server.
Embodiment of the disclosure provides a kind of API gateway interface configuration updating device 300, as shown in figure 3, the API net Closing interface configuration updating device 300 includes:
Writing module 301, for decentralized configuration center to be written in the configuration information of api interface;
Module 302 is obtained, on startup for API gateway, obtains the API gateway packet from the decentralized configuration center The configuration information of each api interface included;
Update module 303, the configuration information update of the api interface for being written in the decentralized configuration center When, corresponding api interface obtains updated configuration information from the decentralized configuration center.
Optionally, as shown in Figure 4, further includes:
Module 304 is monitored, is connected for establishing the API gateway and the long of the decentralized configuration center, and described The monitoring event of the configuration information update state of api interface is monitored in registration center's registration at decentralized configuration center.
Optionally, as shown in figure 5, the update module 303 includes:
Sending submodule 3031, the configuration information update of the api interface for being written in the decentralized configuration center When, more new information is sent to corresponding api interface according to the monitoring event;
Submodule 3032 is updated, for receiving api interface more new information according to of the more new information from described Decentralized configuration center obtains updated configuration information.
Optionally, as shown in Figure 6, further includes:
Registration module 305 registers the corresponding service item of each api interface for the registration center at decentralized configuration center The equipment at place;
Read module 306, the equipment that registered device is read from the registration center according to service item for API gateway List;
Selecting module 307, when for receiving the access request of client access target service item, according to the target Service item chooses target device from the list of devices of the registered device;
Access modules 308 access the target device for the access request according to the client, and receive the mesh The access result that marking device returns;
Sending module 309, for the access result of the return of the target device to be sent to the client.
Optionally, as shown in fig. 7, the selecting module 307 includes:
First choice submodule 3071 is less than preset negative for there is load in the list of devices of the registered device When the equipment of load value, then an equipment is randomly selected as the target from the equipment that load is less than the default load value and set It is standby;
Second selection submodule 3072, presets for being less than in the list of devices of the registered device there is no load When the equipment of load value, then chooses and load the smallest equipment in the list of devices as the target device.
API gateway interface configuration updating device 300 provided in an embodiment of the present invention can be realized in the embodiment of the method for Fig. 1 Each process, details are not described herein again.
Preferably, the embodiment of the present invention also provides a kind of mobile client, including processor, and memory is stored in storage On device and the computer program that can run on the processor, the computer program realize above-mentioned API when being executed by processor Gateway interface configures each process of update method embodiment, and can reach identical technical effect, to avoid repeating, here not It repeats again.
The embodiment of the present invention also provides a kind of computer readable storage medium, and meter is stored on computer readable storage medium Calculation machine program, the computer program realize each of above-mentioned API gateway interface configuration update method embodiment when being executed by processor A process, and identical technical effect can be reached, to avoid repeating, which is not described herein again.Wherein, described computer-readable to deposit Storage media, such as read-only memory (Read-Only Memory, abbreviation ROM), random access memory (Random Access Memory, abbreviation RAM), magnetic or disk etc..
Those of ordinary skill in the art may be aware that list described in conjunction with the examples disclosed in the embodiments of the present disclosure Member and algorithm steps can be realized with the combination of electronic hardware or computer software and electronic hardware.These functions are actually It is implemented in hardware or software, the specific application and design constraint depending on technical solution.Professional technician Each specific application can be used different methods to achieve the described function, but this realization is it is not considered that exceed The scope of the present invention.
It is apparent to those skilled in the art that for convenience and simplicity of description, the system of foregoing description, The specific work process of device and unit, can refer to corresponding processes in the foregoing method embodiment, and details are not described herein.
In embodiment provided herein, it should be understood that disclosed device and method can pass through others Mode is realized.For example, the apparatus embodiments described above are merely exemplary, for example, the division of the unit, only A kind of logical function partition, there may be another division manner in actual implementation, for example, multiple units or components can combine or Person is desirably integrated into another system, or some features can be ignored or not executed.Another point, shown or discussed is mutual Between coupling, direct-coupling or communication connection can be through some interfaces, the INDIRECT COUPLING or communication link of device or unit It connects, can be electrical property, mechanical or other forms.
The unit as illustrated by the separation member may or may not be physically separated, aobvious as unit The component shown may or may not be physical unit, it can and it is in one place, or may be distributed over multiple In network unit.Some or all of unit therein can be selected to realize the embodiment of the present invention according to the actual needs Purpose.
It, can also be in addition, the functional units in various embodiments of the present invention may be integrated into one processing unit It is that each unit physically exists alone, can also be integrated in one unit with two or more units.
It, can be with if the function is realized in the form of SFU software functional unit and when sold or used as an independent product It is stored in a computer readable storage medium.Based on this understanding, technical solution of the present invention is substantially in other words The part of the part that contributes to existing technology or the technical solution can be embodied in the form of software products, the meter Calculation machine software product is stored in a storage medium, including some instructions are used so that a computer equipment (can be a People's computer, server or network equipment etc.) it performs all or part of the steps of the method described in the various embodiments of the present invention. And storage medium above-mentioned includes: that USB flash disk, mobile hard disk, ROM, RAM, magnetic or disk etc. are various can store program code Medium.
The above description is merely a specific embodiment, but scope of protection of the present invention is not limited thereto, any Those familiar with the art in the technical scope disclosed by the present invention, can easily think of the change or the replacement, and should all contain Lid is within protection scope of the present invention.Therefore, protection scope of the present invention should be subject to the protection scope in claims.

Claims (12)

1. a kind of interface of API gateway configures update method characterized by comprising
Decentralized configuration center is written into the configuration information of api interface;
API gateway on startup, the configuration for each api interface that the API gateway includes is obtained from the decentralized configuration center Information;
When the configuration information update for the api interface being written in the decentralized configuration center, corresponding api interface is from described Decentralized configuration center obtains updated configuration information.
2. the method as described in claim 1, which is characterized in that decentralized configuration is written in the configuration information by api interface After center, further includes:
It establishes the API gateway and the long of the decentralized configuration center connects, and the registration at the decentralized configuration center The monitoring event of the configuration information update state of api interface is monitored in center registration.
3. method according to claim 2, which is characterized in that the API being written in the decentralized configuration center When the configuration information update of interface, corresponding api interface obtains updated configuration information, packet from the decentralized configuration center It includes:
When the configuration information update for the api interface being written in the decentralized configuration center, according to the monitoring event to phase The api interface answered sends more new information;
Api interface more new information according to of the more new information is received after the acquisition update of the decentralized configuration center Configuration information.
4. method according to any one of claims 1 to 3, which is characterized in that further include:
Equipment where registering the corresponding service item of each api interface in the registration center at decentralized configuration center;
API gateway reads the list of devices of registered device according to service item from the registration center;
When receiving the access request of client access target service item, according to the destination service project from described registered Target device is chosen in the list of devices of equipment;
Access request according to the client accesses the target device, and receives the access knot that the target device returns Fruit;
The access result of the return of the target device is sent to the client.
5. method as claimed in claim 4, which is characterized in that described registered to be set according to the destination service project from described Target device is chosen in standby list of devices, comprising:
When there is the equipment that load is less than default load value in the list of devices of the registered device, then it is less than institute from load It states and randomly selects an equipment in the equipment of default load value as the target device;
There is no when the equipment that load is less than default load value in the list of devices of the registered device, then set described in selection The smallest equipment is loaded as the target device in standby list.
6. a kind of interface of API gateway configures updating device characterized by comprising
Writing module, for decentralized configuration center to be written in the configuration information of api interface;
Module is obtained, on startup for API gateway, obtain that the API gateway includes from the decentralized configuration center is each The configuration information of api interface;
Update module, when the configuration information update of the api interface for being written in the decentralized configuration center, accordingly Api interface obtains updated configuration information from the decentralized configuration center.
7. device as claimed in claim 6, which is characterized in that further include:
Module is monitored, is connected for establishing the API gateway and the long of the decentralized configuration center, and match in the distribution Set the monitoring event of the configuration information update state of registration center's registration monitoring api interface at center.
8. device as claimed in claim 7, which is characterized in that the update module includes:
Sending submodule, when the configuration information update of the api interface for being written in the decentralized configuration center, according to institute It states monitoring event and sends more new information to corresponding api interface;
Submodule is updated, the api interface for receiving the more new information is matched according to the more new information from the distribution It sets center and obtains updated configuration information.
9. the device as described in any one of claim 6 to 8, which is characterized in that further include:
Registration module, for where the registration center at decentralized configuration center registers the corresponding service item of each api interface Equipment;
Read module reads the list of devices of registered device for API gateway according to service item from the registration center;
Selecting module, when for receiving the access request of client access target service item, according to the destination service item Mesh chooses target device from the list of devices of the registered device;
Access modules access the target device for the access request according to the client, and receive the target device The access result of return;
Sending module, for the access result of the return of the target device to be sent to the client.
10. device as claimed in claim 9, which is characterized in that the selecting module includes:
First choice submodule is less than setting for default load value for there is load in the list of devices of the registered device When standby, then an equipment is randomly selected as the target device from the equipment that load is less than the default load value;
Second selection submodule, for there is no loads to be less than default load value in the list of devices of the registered device When equipment, then chooses and load the smallest equipment in the list of devices as the target device.
11. a kind of server, which is characterized in that including processor, memory and be stored on the memory and can be described The computer program run on processor is realized when the computer program is executed by the processor as in claim 1 to 5 The step of described in any item API gateway interface configuration update methods.
12. a kind of computer readable storage medium, is stored thereon with computer program, which is characterized in that the computer program The step of API gateway interface described in any one of claims 1 to 5 configures update method is realized when being executed by processor.
CN201810796256.6A 2018-07-19 2018-07-19 API gateway interface configuration updating method and device Active CN108965007B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201810796256.6A CN108965007B (en) 2018-07-19 2018-07-19 API gateway interface configuration updating method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201810796256.6A CN108965007B (en) 2018-07-19 2018-07-19 API gateway interface configuration updating method and device

Publications (2)

Publication Number Publication Date
CN108965007A true CN108965007A (en) 2018-12-07
CN108965007B CN108965007B (en) 2021-08-27

Family

ID=64495540

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201810796256.6A Active CN108965007B (en) 2018-07-19 2018-07-19 API gateway interface configuration updating method and device

Country Status (1)

Country Link
CN (1) CN108965007B (en)

Cited By (15)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109710223A (en) * 2018-12-29 2019-05-03 北京邮电大学 API gateway hot plug system based on distributed KV storage system
CN109981757A (en) * 2019-03-13 2019-07-05 青岛特锐德电气股份有限公司 A kind of API gateway load-balancing algorithm towards small-scale micro services framework
CN110113394A (en) * 2019-04-19 2019-08-09 浙江数链科技有限公司 API Calls method and apparatus
CN110365809A (en) * 2019-07-23 2019-10-22 中南民族大学 Distributed server address configuration system and method
CN110493067A (en) * 2019-09-05 2019-11-22 中国银联股份有限公司 A kind of method and device that API gateway service updates
CN110784360A (en) * 2019-11-01 2020-02-11 浪潮云信息技术有限公司 Method and system for realizing Kong declarative configuration hot update
CN110995873A (en) * 2019-12-27 2020-04-10 美的集团股份有限公司 Gateway service interface discovery method, system, electronic device and storage medium
CN111049695A (en) * 2020-01-09 2020-04-21 深圳壹账通智能科技有限公司 Cloud gateway configuration method and system
CN111092774A (en) * 2019-12-25 2020-05-01 中国联合网络通信集团有限公司 Configuration method and equipment of acquisition gateway
CN112636986A (en) * 2020-12-29 2021-04-09 苏州思必驰信息科技有限公司 Gateway plug-in updating method and device
CN113076361A (en) * 2021-03-17 2021-07-06 国家气象信息中心(中国气象局气象数据中心) Method for realizing massive meteorological data unified service interface based on big data
CN113315710A (en) * 2021-05-29 2021-08-27 东方电子股份有限公司 Middle station API gateway management configuration and extension method based on asynchronous dynamic routing
CN113381866A (en) * 2020-02-25 2021-09-10 北京同邦卓益科技有限公司 Service calling method, device, equipment and storage medium based on gateway
CN114422358A (en) * 2022-01-26 2022-04-29 中国农业银行股份有限公司 API gateway configuration updating method and equipment
CN114666216A (en) * 2022-03-17 2022-06-24 北京思特奇信息技术股份有限公司 Management method and management system of API gateway

Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101640867A (en) * 2009-08-18 2010-02-03 中兴通讯股份有限公司 Method and system for updating equipment configuration information of message-type application gateway
CN103186401A (en) * 2011-12-31 2013-07-03 北京新媒传信科技有限公司 Method for updating software system and configuration thereof
CN104065517A (en) * 2014-07-07 2014-09-24 用友软件股份有限公司 Distributed-system software configuration management method and system
US20160092297A1 (en) * 2014-09-29 2016-03-31 Digital River, Inc. API Gateway System and Method
CN105677404A (en) * 2015-12-31 2016-06-15 拉扎斯网络科技(上海)有限公司 Zookeeper based configuration updating method and device
CN105827446A (en) * 2016-03-31 2016-08-03 深圳市金溢科技股份有限公司 Intelligent traffic API gateway and intelligent traffic service system
CN107360018A (en) * 2017-06-05 2017-11-17 小草数语(北京)科技有限公司 Config update method and device
CN107885541A (en) * 2016-09-30 2018-04-06 北京京东尚科信息技术有限公司 The method and device of processing system configuration
CN108076125A (en) * 2016-11-11 2018-05-25 北京京东尚科信息技术有限公司 Interface allocation method and system

Patent Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101640867A (en) * 2009-08-18 2010-02-03 中兴通讯股份有限公司 Method and system for updating equipment configuration information of message-type application gateway
CN103186401A (en) * 2011-12-31 2013-07-03 北京新媒传信科技有限公司 Method for updating software system and configuration thereof
CN104065517A (en) * 2014-07-07 2014-09-24 用友软件股份有限公司 Distributed-system software configuration management method and system
US20160092297A1 (en) * 2014-09-29 2016-03-31 Digital River, Inc. API Gateway System and Method
CN105677404A (en) * 2015-12-31 2016-06-15 拉扎斯网络科技(上海)有限公司 Zookeeper based configuration updating method and device
CN105827446A (en) * 2016-03-31 2016-08-03 深圳市金溢科技股份有限公司 Intelligent traffic API gateway and intelligent traffic service system
CN107885541A (en) * 2016-09-30 2018-04-06 北京京东尚科信息技术有限公司 The method and device of processing system configuration
CN108076125A (en) * 2016-11-11 2018-05-25 北京京东尚科信息技术有限公司 Interface allocation method and system
CN107360018A (en) * 2017-06-05 2017-11-17 小草数语(北京)科技有限公司 Config update method and device

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
HTTPS://WWW.CNBLOGS.COM/ZHANGJIANBIN/P/6262504.HTML: "分布式配置中心", 《博客园》 *

Cited By (18)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109710223A (en) * 2018-12-29 2019-05-03 北京邮电大学 API gateway hot plug system based on distributed KV storage system
CN109981757A (en) * 2019-03-13 2019-07-05 青岛特锐德电气股份有限公司 A kind of API gateway load-balancing algorithm towards small-scale micro services framework
CN109981757B (en) * 2019-03-13 2022-07-08 青岛特来电新能源科技有限公司 API gateway load balancing method for small-scale micro-service architecture
CN110113394A (en) * 2019-04-19 2019-08-09 浙江数链科技有限公司 API Calls method and apparatus
CN110365809A (en) * 2019-07-23 2019-10-22 中南民族大学 Distributed server address configuration system and method
CN110493067A (en) * 2019-09-05 2019-11-22 中国银联股份有限公司 A kind of method and device that API gateway service updates
CN110493067B (en) * 2019-09-05 2022-02-18 中国银联股份有限公司 Method and device for updating API gateway service
CN110784360A (en) * 2019-11-01 2020-02-11 浪潮云信息技术有限公司 Method and system for realizing Kong declarative configuration hot update
CN111092774A (en) * 2019-12-25 2020-05-01 中国联合网络通信集团有限公司 Configuration method and equipment of acquisition gateway
CN110995873A (en) * 2019-12-27 2020-04-10 美的集团股份有限公司 Gateway service interface discovery method, system, electronic device and storage medium
CN111049695A (en) * 2020-01-09 2020-04-21 深圳壹账通智能科技有限公司 Cloud gateway configuration method and system
CN113381866A (en) * 2020-02-25 2021-09-10 北京同邦卓益科技有限公司 Service calling method, device, equipment and storage medium based on gateway
CN112636986A (en) * 2020-12-29 2021-04-09 苏州思必驰信息科技有限公司 Gateway plug-in updating method and device
CN113076361A (en) * 2021-03-17 2021-07-06 国家气象信息中心(中国气象局气象数据中心) Method for realizing massive meteorological data unified service interface based on big data
CN113315710A (en) * 2021-05-29 2021-08-27 东方电子股份有限公司 Middle station API gateway management configuration and extension method based on asynchronous dynamic routing
CN114422358A (en) * 2022-01-26 2022-04-29 中国农业银行股份有限公司 API gateway configuration updating method and equipment
CN114422358B (en) * 2022-01-26 2024-01-30 中国农业银行股份有限公司 API gateway configuration updating method and equipment
CN114666216A (en) * 2022-03-17 2022-06-24 北京思特奇信息技术股份有限公司 Management method and management system of API gateway

Also Published As

Publication number Publication date
CN108965007B (en) 2021-08-27

Similar Documents

Publication Publication Date Title
CN108965007A (en) API gateway interface configures update method and device
CN105979009B (en) A kind of increase load automatic balancing method for cloud application container
CN104601592B (en) A kind of method and access device for accessing cloud service
CN108632338A (en) Storage system and for providing the method that discovery is automatically stored
CN106031116B (en) A kind of correlating method, the apparatus and system of NS and VNF
JP5582344B2 (en) Connection management system and connection management server linkage method in thin client system
CN107580083A (en) A kind of method and system of container IP address distribution
CN109768871A (en) Configure method, host and the storage medium of multiple Microsoft Loopback Adapters
CN109451088A (en) A kind of data access method and device
CN103795768B (en) The method and apparatus of remote access
WO2015078498A1 (en) Method and system for balancing load in a sdn network
CN103607424B (en) Server connection method and server system
CN108322502A (en) Method, gateway system and storage medium for equalization server load
CN110213391A (en) A kind of configuration method and device of internet protocol address
CN109040243A (en) A kind of message processing method and device
CN109792393A (en) Virtualize the software upgrading in off-line accounting system
CN107800814B (en) Virtual machine deployment method and device
CN109788068A (en) Heartbeat state information report method, device and equipment and computer storage medium
CN109901798A (en) Date storage method and device
CN109246078A (en) A kind of data interactive method and server
CN109240796A (en) Virtual machine information acquisition methods and device
CN105071965B (en) A kind of management system of the network equipment
CN109039764A (en) A kind of network parameter configuration method of distributed memory system
CN104683252B (en) A kind of gateway applied to gaming network is connected into method and system
CN1330124C (en) Method and apparatus for virtualizing network resources

Legal Events

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

Effective date of registration: 20211129

Address after: Room 103, building 1, yard 4, Hengxing Road, Gaoliying Town, Shunyi District, Beijing

Patentee after: Beijing Rockwell Technology Co.,Ltd.

Address before: Room 801, 8 / F, building 3, No.10 courtyard, Wangjing street, Chaoyang District, Beijing 100102

Patentee before: BEIJING CHJ AUTOMOTIVE TECHNOLOGY Co.,Ltd.