CN104168133A - Method and system for dynamic API page view configuration, and gateway - Google Patents
Method and system for dynamic API page view configuration, and gateway Download PDFInfo
- Publication number
- CN104168133A CN104168133A CN201410331882.XA CN201410331882A CN104168133A CN 104168133 A CN104168133 A CN 104168133A CN 201410331882 A CN201410331882 A CN 201410331882A CN 104168133 A CN104168133 A CN 104168133A
- Authority
- CN
- China
- Prior art keywords
- visit capacity
- theoretical
- api
- next time
- weights
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Granted
Links
- 238000000034 method Methods 0.000 title claims abstract description 32
- 238000005457 optimization Methods 0.000 abstract description 11
- 238000004364 calculation method Methods 0.000 abstract description 6
- 238000009826 distribution Methods 0.000 abstract description 6
- 230000003068 static effect Effects 0.000 abstract description 3
- 239000008186 active pharmaceutical agent Substances 0.000 abstract 1
- 238000005516 engineering process Methods 0.000 description 7
- 238000010586 diagram Methods 0.000 description 5
- 230000006870 function Effects 0.000 description 5
- 238000007726 management method Methods 0.000 description 5
- 230000008569 process Effects 0.000 description 5
- 230000008859 change Effects 0.000 description 3
- 238000004458 analytical method Methods 0.000 description 1
- 238000004519 manufacturing process Methods 0.000 description 1
- 238000012544 monitoring process Methods 0.000 description 1
- 230000006855 networking Effects 0.000 description 1
- 230000009467 reduction Effects 0.000 description 1
- 238000013468 resource allocation Methods 0.000 description 1
- 238000003860 storage Methods 0.000 description 1
Landscapes
- Computer And Data Communications (AREA)
- Telephonic Communication Services (AREA)
- Management, Administration, Business Operations System, And Electronic Commerce (AREA)
Abstract
The invention discloses a method and system for dynamic application programming interface (API) page view configuration, and a gateway. The method comprises the following steps that: weights occupied by all APIs are calculated and all API historical page view weights in the API sets are calculated according to the historical page view; on the basis of the historical page view and an actual resource page view, a theoretical page view after correction is calculated; a relation between a next-time theoretical page view and a previous theoretical page view is determined based on the calculated theoretical page view after correction; and if the next-time theoretical page view is determined to be larger than the previous theoretical page view, the previous theoretical page view is configured to be the API page view; and if the next-time theoretical page view is determined to be less than the previous theoretical page view, a constrain set is reconstructed to carry out calculation. According to the embodiment of the invention, the dynamic planning optimization strategy is used for replacing the original static service configuration protocol file, thereby realizing the unified dispatching and reasonable distribution of the server resources.
Description
Technical field
The present invention relates to areas of information technology, be specifically related to a kind of method and gateway and system of dynamic-configuration API Access amount.
Background technology
Application programming interface (the Application Programming Interface that industrial quarters is conventional, API) Safety and Manage platform is a set of application software that operates in data center, cloud service center, for roles such as the API producer, API consumer, API managers, the assembly functions such as API gateway, API door, API life cycle management, API monitoring, API key management and the practical situation analysis of API are provided, and Fig. 1 shows the structural representation of API Safety and Manage platform.The system environments of API Safety and Manage platform operation comprises: meet the middleware (for example: Tomcat, Weblogic etc.) of J2EE specification, Oracle or Mysql database.Different from traditional direct calls application interface API of application program, API Safety and Manage software need to first be enabled by information centre, application program is calling application programming interfaces (API) in resource before, can be by an API gateway, this gateway can be realized safe access control and the dynamic call to API according to certain scheduling strategy, and API gateway module is responsible for whole API resource to carry out route agent, performance distribution.
As shown in Figure 2, API gateway is operated between application program and server A PI resource as intermediate node, plays the important function of API scheduling of resource and control.Such as 1 API background system of hypothesis maximum 100 concurrent requests of supporting per second, exceed this numerical value, system will be collapsed, therefore will be to request restriction.If there are at present 20 consumers to subscribe to, 1 of request in average 1 second, 10 of peak value requests per second, will limit the request of each subscription so below 10.Industry generally adopts one " air throttle " technology at present, by service-level agreement (Service-Level Agreement, SLA), the maximum available request number of every layer of service agreement is set.For example, one-level service maximum 5000 requests per hour, secondary service maximum 50 requests per hour.Can call number be 50 such as having set certain API maximum, each connect hours be 60000 milliseconds.Therefore in the time that this API of application call exceedes 50 times, just do not allow to have called, this is inappropriate concerning the application program of some specific transactions frequent operation again.
In existing API gateway technique, " air throttle " technology is a kind of file configuration method of static state.This technology is distributed and is arranged by service configuration document of agreement for the resource of API request.As shown in Figure 4, if certain consumer belongs to certain service agreement of API, this consumer getable API resource sum definite.But in actual applications, resource sum is limited, request is also various.The sometimes request of system API is extremely busy, just needs dynamic each consumer's of reduction API request; The sometimes request of system API is very not busy, also needs to expand dynamically each consumer's API request restriction.This just requires in the situation that API total resources is certain, can dynamically adjust to greatest extent and control each API consumer demand, and the system that simultaneously ensures can normally be moved.Static " air throttle " technology is as a kind of relatively simple but the collocation method of underaction obviously can not meet dynamic adjustment API consumption demand.
Summary of the invention
Technical scheme of the present invention is mainly the technical disadvantages for current services configuration file, adopt the method for Dynamic Programming to carry out dynamic assignment to API resource, realize load balancing, improve server resource utilance, make API user can rationally utilize server resource.
A kind of method that the invention provides dynamic-configuration API Access amount, described method comprises:
Calculate the shared weights of each application programming interfaces API, and calculate the historical visit capacity weights of each API in this API set according to historical visit capacity;
Calculate and revise rear theoretical visit capacity according to the actual access amount of historical visit capacity and resource;
Based on calculate revise after the theoretical visit capacity judgement magnitude relationship of theoretical visit capacity and last theoretical visit capacity next time;
If judgement next time theoretical visit capacity is more than or equal to last theoretical visit capacity, theoretical last time visit capacity is configured to API Access amount; If judge that theoretical visit capacity is less than last theoretical visit capacity next time, theoretical visit capacity heavy neotectonics constrain set afterwards is next time calculated.
Described based on calculate revise after the judgement of theoretical visit capacity next time theoretical visit capacity also comprise before with the magnitude relationship of last theoretical visit capacity:
Judge revise after resource service condition whether in load, if resource service condition in load, based on calculate revise after the theoretical visit capacity judgement magnitude relationship of theoretical visit capacity and last theoretical visit capacity next time;
If resource service condition is beyond load, computational load is introduced parameter, make to revise rear theoretical visit capacity in loading range, introduce parameter based on load and calculate revise after the theoretical visit capacity judgement magnitude relationship of theoretical visit capacity and last theoretical visit capacity next time.
If described judgement next time theoretical visit capacity is less than last theoretical visit capacity, in theoretical visit capacity heavy neotectonics constrain set afterwards next time being calculated, also comprise:
When theoretical visit capacity is next time less than last theoretical visit capacity, the heavy neotectonics after theoretical visit capacity is next time become to a constrain set, carry out the historical visit capacity weights of the shared weights of API and API and calculate, finally complete the configuration of API Access amount.
Described method also comprises:
In the time that access request amount newly-increased in certain period is greater than the pre-configured threshold parameter of client, trigger and carry out the shared weights of API and the historical visit capacity weights of API calculate, finally complete the configuration of API Access amount.
Accordingly, the present invention also provides a kind of API gateway, and described API gateway comprises:
API takies weights computing module, for calculating the shared weights of each application programming interfaces API;
Historical visit capacity weights computing module, for calculating the historical visit capacity weights of each API in this API set according to historical visit capacity;
Revise visit capacity computing module, revise rear theoretical visit capacity for calculating according to the actual access amount of historical visit capacity and resource;
Revised theory visit capacity comparison module, for based on calculate revise after the theoretical visit capacity judgement magnitude relationship of theoretical visit capacity and last theoretical visit capacity next time;
API Access amount configuration module, for when once theoretical visit capacity is more than or equal to once theoretical visit capacity, being configured to API Access amount by theoretical last time visit capacity in judgement; And in judgement once theoretical visit capacity be less than once theoretical visit capacity, the heavy neotectonics constrain set after theoretical visit capacity is next time calculated.
Described API gateway also comprises:
Load balancing module, be used for judging revise after resource service condition whether in load, if resource service condition in load, enters into revised theory visit capacity comparison module for judging the magnitude relationship of theoretical visit capacity and last theoretical visit capacity next time; If resource service condition is beyond load, computational load is introduced parameter, make to revise rear theoretical visit capacity in loading range, enter into revised theory visit capacity comparison module for judging the magnitude relationship of theoretical visit capacity and last theoretical visit capacity next time.
Described API Access amount configuration module is also in the time that theoretical visit capacity is less than last theoretical visit capacity next time, theoretical visit capacity heavy neotectonics afterwards is next time become to a constrain set, feed back to API take in weights computing module, carry out that the shared weights of API calculate and historical visit capacity weights computing module in carry out the historical visit capacity weights of API and calculate, again complete the configuration of API Access amount.
Described API gateway also comprises: threshold triggers module, for judging in the time that access request amount newly-increased in certain period is greater than the pre-configured threshold parameter of client, the shared weights of API are carried out in triggering and the historical visit capacity weights of API calculate, and finally complete the configuration of API Access amount.
Accordingly, the present invention also provides a kind of system of dynamic-configuration API Access amount, and described system comprises:
Multiple api interfaces, are connected with multiple applications client, for receiving calling of API application program;
Multiple API servers, for storing API resource;
API gateway, is connecting multiple api interfaces, and is connecting multiple API servers, for calculating the shared weights of each application programming interfaces API, and calculates the historical visit capacity weights of each API in this API set according to historical visit capacity; Calculate and revise rear theoretical visit capacity according to the actual access amount of historical visit capacity and resource; Based on calculate revise after the theoretical visit capacity judgement magnitude relationship of theoretical visit capacity and last theoretical visit capacity next time; If judgement next time theoretical visit capacity is more than or equal to last theoretical visit capacity, theoretical last time visit capacity is configured to API Access amount; If judge that theoretical visit capacity is less than last theoretical visit capacity next time, theoretical visit capacity heavy neotectonics constrain set afterwards is next time calculated.
Technical solution of the present invention adopts Dynamic Programming optimization strategy to substitute original services configuration protocol file, realizes United Dispatching, reasonable distribution to server resource.According to Dynamic Programming strategy to the historical access situation of each API, each API occupation condition, call API required service device resource situation etc. and distribute, frequency and the access control of coordinate application to API Calls.Also improve the invoked efficiency of API.Calling of API do not had to parameter limit, along with the changes in demand of application program and aggregate resource service condition and change.That is to say, API is flexibly by calling of different application.
Brief description of the drawings
In order to be illustrated more clearly in the embodiment of the present invention or technical scheme of the prior art, to the accompanying drawing of required use in embodiment or description of the Prior Art be briefly described below, apparently, accompanying drawing in the following describes is only some embodiments of the present invention, for those of ordinary skill in the art, do not paying under the prerequisite of creative work, can also obtain according to these accompanying drawings other accompanying drawing.
Fig. 1 is API Safety and Manage platform structure schematic diagram of the prior art;
Fig. 2 is the system configuration schematic diagram based on SAL provisioning API visit capacity of the prior art;
Fig. 3 is the system configuration schematic diagram of the dynamic-configuration API Access amount in the embodiment of the present invention;
Fig. 4 is the method flow diagram of the dynamic-configuration API Access amount in the embodiment of the present invention;
Fig. 5 is the API gateway structural representation in the embodiment of the present invention.
Embodiment
Below in conjunction with the accompanying drawing in the embodiment of the present invention, the technical scheme in the embodiment of the present invention is clearly and completely described, obviously, described embodiment is only the present invention's part embodiment, instead of whole embodiment.Based on the embodiment in the present invention, those of ordinary skill in the art, not making all other embodiment that obtain under creative work prerequisite, belong to the scope of protection of the invention.
The system of dynamic-configuration API Access amount as shown in Figure 3, the multiple servers of API gateway management and multiple application, store multiple API on each server.This system includes multiple api interfaces, is connected, for receiving calling of API application program with multiple applications client; Multiple API servers, for storing API resource; API gateway, is connecting multiple api interfaces, and is connecting multiple API servers, for calculating the shared weights of each application programming interfaces API, and calculates the historical visit capacity weights of each API in this API set according to historical visit capacity; Calculate and revise rear theoretical visit capacity according to the actual access amount of historical visit capacity and resource; Based on calculate revise after the theoretical visit capacity judgement magnitude relationship of theoretical visit capacity and last theoretical visit capacity next time; If judgement next time theoretical visit capacity is greater than last theoretical visit capacity, theoretical last time visit capacity is configured to API Access amount; If judge that theoretical visit capacity is less than last theoretical visit capacity next time, theoretical visit capacity heavy neotectonics constrain set afterwards is next time calculated.
Application program is called the API being deployed on different server by API gateway.Technical scheme of the present invention is on API gateway management, adopts Dynamic Programming optimization strategy, substitutes original services configuration protocol file.API, each API history of in the embodiment of the present invention, making API gateway record on the spendable resource of each server, server maximum load capability, server are called the frequency, are moved required server resource amount of API etc., these data participate in the calculating of Dynamic Programming optimization method, and the optimum that obtains API on each server can call number, thereby realize the dynamic control to API Calls, dynamic calculation is set simultaneously and carries out triggering threshold values, in the time that access request reaches threshold values, automatically carry out dynamic calculation, distribution.
Dynamic Programming is a kind of method that solves multistage decision process optimization problem, is proposed in the 1950's by people such as U.S. mathematician Bels graceful (Ballman).Multistage decision process refers to the special active procedure of such class, it can resolve into some subs that connect each other in chronological order, will make a policy at each sub, the decision-making of all processes is a sequence of decisions, so multistage decision problem is also referred to as sequential decision problem.The graceful feature of people for multistage decision problem that wait of Bel, has proposed to solve " principle of optimality " of this class problem, and has successfully solved many practical problems of the aspect such as production management, engineering.Bel graceful (Bellman) principle of optimality has such characteristic: no matter initial condition and initial decision-making are how, and the state forming with respect to first decision-making, remaining decision-making must form an optimal policy.Application Bellman principle of optimality must meet following two conditions: the 1. separability of target function; 2. the separability of state.Wherein the separability of target function refers to, for all K, the target function of last K sub of a process, only depends on current state and last K decision-making.The separability of state refers to that, after a decision-making, next state only depends on current state and decision-making, and irrelevant with state above.
In this paper technology, taking server system resource service condition as optimal policy target, analyze and set up corresponding Dynamic Programming Mathematical Modeling.Make the load capacity of server be
, server operation ability, networking environment are relatively stable.Obtain the optimization strategy of system resource allocation, in dynamic access amount situation, the visit capacity that ensures API resource rationally, load balancing, dynamically adjust, resource makes full use of and allows visit capacity to reach maximum, dynamic calculation is set simultaneously and carries out triggering threshold values, in the time that access request reaches threshold values, automatically carry out dynamic calculation, distribution.
Symbol description:
A
i: i application request;
: represent server maximum load-carrying capacity, normal use is no more than 90%;
X
i,j: represent that i application requests call the server resource amount that j API need consume;
ε
i,j: the request amount that represents the actual access of j API;
ε '
i,j: the revised request amount that represents j API;
: be the theoretical visit capacity that allows j API of access after revising for the r time.
: the weights of the historical visit capacity statistics of j API while representing to revise for the r time;
λ
j: represent j the shared resource weights of API;
: j the shared resource weights of API while representing to revise for the r time;
φ
k: represent that user can customize configure trigger dynamic calculation parameter.
φ '
k: represent that server is at Δ T
kthe resource percentage that newly-increased API Access request is shared;
Δ ε
i,j: represent Δ T
kthe newly-increased request amount of j API in time.
According to API scheduling of resource rule, for making server resource obtain maximum using, promote API Access amount simultaneously, at node sometime, solve following optimization problem:
And constraints is:
Solve after this optimization problem ε '
i,joptimum access value while being j API resource of i request call.Solving of this model is the comprehensive optimization problem of Dynamic Programming and integer programming.This optimization method has been considered following factor:
According to the historical access situation of each API, calculate API Access situation weights;
According to each API occupation condition, statistics API resource occupation weights;
Overall goal is to ensure that in the historical access situation of API, the link that visit capacity resources occupation amount is large is as far as possible little.
In the process of the embodiment of the present invention, first calculate the shared weights of each application programming interfaces API, and calculate the historical visit capacity weights of each API in this API set according to historical visit capacity; Calculate and revise rear theoretical visit capacity according to the actual access amount of historical visit capacity and resource; Based on calculate revise after the theoretical visit capacity judgement magnitude relationship of theoretical visit capacity and last theoretical visit capacity next time; If judgement next time theoretical visit capacity is greater than last theoretical visit capacity, theoretical last time visit capacity is configured to API Access amount; If judgement next time theoretical visit capacity is less than last theoretical visit capacity, structure constraint set is calculated.
Concrete, Fig. 4 shows the method flow diagram of the dynamic-configuration API Access amount in the embodiment of the present invention, comprises the steps:
S401, calculate the shared weights of each application programming interfaces API;
Calculate in the set of the related API resource of access request the resource occupation weights of each API
aPI resource { the A applying for according to request
j| 1≤j≤L, the server resource duration set { κ that j ∈ N} is shared
j| 1≤j≤L, j ∈ N}, calculates each API resource occupation weights
S402, can calculate the historical visit capacity weights of each API in this set according to historical visit capacity;
According to ε
i,jcan get the API resource access collection { A that access request relates to
i| 1≤i≤K, i ∈ N} and historical visit capacity set { ρ
i| 1≤i≤K, i ∈ N}, can calculate the historical visit capacity weights of each API in this set according to historical visit capacity
Calculate in the set of the related API resource of access request the historical visit capacity weights of each API.
S403, according to the actual access amount of historical visit capacity and resource calculate revise after theoretical visit capacity;
Calculate and revise rear theoretical visit capacity, be the theoretical visit capacity that allows j API of access after revising
According to the actual access amount of history access situation and resource, actual access amount is repeatedly revised, ensure that visit capacity is large in history, allow visit capacity also larger.
S404, judge revise after resource service condition whether in load, if in load, enter into S406, otherwise enter into S405;
Foundation
if set up, after the implication correction of whole equation expression, resource service condition, in load, can enter into S406
If
be false, need to enter into S405.
S405, computational load are introduced parameter, make to revise rear theoretical visit capacity in loading range;
When
time, introduce parameter
while making request exceed maximum value of taking of resource permission, a coefficient is multiplied by unification, is allowed to condition in resource permission and makes
and
Here order
S406, judgement theoretical visit capacity and last theoretical visit capacity size next time, if be greater than, carry out S407, otherwise enter into S408;
If S407 next time theoretical visit capacity is more than or equal to last theoretical visit capacity, get last theoretical visit capacity;
Meet
(1≤j≤S
r) part, the theoretical visit capacity situation that the theoretical visit capacity of the r+1 time is greater than the r time, allows this actual access amount for the last visit capacity of revising, and the revised request amount of j API is the theoretical visit capacity that allows j API of access after revising for the r time
ε '
i,jthe visit capacity allowing while calling j API resource for i application requests.
If S408 next time theoretical visit capacity is less than last theoretical visit capacity, theoretical visit capacity heavy neotectonics afterwards is next time become to a constrain set;
For
(S
r≤ j≤L) part, reconstitute set { A
i| S
r≤ j≤L, i ∈ N}, constraints becomes:
It should be noted that, the constraints that this step is carried out reenters in the procedure of dynamic-configuration API Access amount again, enters into S401 until API Access amount configuration successful.
It should be noted that, in the time that access request amount newly-increased in certain period is greater than the pre-configured threshold parameter of client, trigger and carry out the shared weights of API and the historical visit capacity weights of API calculate the configuration that finally completes API Access amount, work as
time, start S401 and start to calculate.
In the time that access request newly-increased in certain period is greater than the threshold parameter of client's configuration, inspire computational process.
Accordingly, Fig. 5 also shows the API gateway structural representation in the embodiment of the present invention, and this API gateway comprises:
API takies weights computing module, for calculating the shared weights of each application programming interfaces API;
Historical visit capacity weights computing module, for calculating the historical visit capacity weights of each API in this API set according to historical visit capacity;
Revise visit capacity computing module, revise rear theoretical visit capacity for calculating according to the actual access amount of historical visit capacity and resource;
Revised theory visit capacity comparison module, for based on calculate revise after the theoretical visit capacity judgement magnitude relationship of theoretical visit capacity and last theoretical visit capacity next time;
API Access amount configuration module, for when once theoretical visit capacity is greater than once theoretical visit capacity, being configured to API Access amount by theoretical last time visit capacity in judgement; And in judgement once theoretical visit capacity be less than once theoretical visit capacity, the heavy neotectonics constrain set after theoretical visit capacity is next time calculated.
What need to further illustrate is, this API gateway also comprises: load balancing module, be used for judging revise after resource service condition whether in load, if resource service condition in load, enters into revised theory visit capacity comparison module for judging the magnitude relationship of theoretical visit capacity and last theoretical visit capacity next time; If resource service condition is beyond load, computational load is introduced parameter, make to revise rear theoretical visit capacity in loading range, enter into revised theory visit capacity comparison module for judging the magnitude relationship of theoretical visit capacity and last theoretical visit capacity next time.
It should be noted that, this API Access amount configuration module is also in the time that theoretical visit capacity is less than last theoretical visit capacity next time, theoretical visit capacity heavy neotectonics afterwards is next time become to a constrain set, feed back to API take in weights computing module, carry out that the shared weights of API calculate and historical visit capacity weights computing module in carry out the historical visit capacity weights of API and calculate, again complete the configuration of API Access amount.
What need to further illustrate is, this API gateway also comprises: threshold triggers module, for judging in the time that access request amount newly-increased in certain period is greater than the pre-configured threshold parameter of client, the shared weights of API are carried out in triggering and the historical visit capacity weights of API calculate, and finally complete the configuration of API Access amount.
To sum up, technical solution of the present invention adopts Dynamic Programming optimization strategy to substitute original services configuration protocol file, realizes United Dispatching, reasonable distribution to server resource.According to Dynamic Programming strategy to the historical access situation of each API, each API occupation condition, call API required service device resource situation etc. and distribute, frequency and the access control of coordinate application to API Calls.Also improve the invoked efficiency of API.Calling of API do not had to parameter limit, along with the changes in demand of application program and aggregate resource service condition and change.That is to say, API is flexibly by calling of different application.
One of ordinary skill in the art will appreciate that all or part of step in the whole bag of tricks of above-described embodiment is can carry out the hardware that instruction is relevant by program to complete, this program can be stored in a computer-readable recording medium, storage medium can comprise: read-only memory (ROM, Read Only Memory), random access memory (RAM, Random Access Memory), disk or CD etc.
The method of the dynamic-configuration API Access the amount above embodiment of the present invention being provided and gateway and system are described in detail, applied specific case herein principle of the present invention and execution mode are set forth, the explanation of above embodiment is just for helping to understand method of the present invention and core concept thereof; , for one of ordinary skill in the art, according to thought of the present invention, all will change in specific embodiments and applications, in sum, this description should not be construed as limitation of the present invention meanwhile.
Claims (9)
1. a method for dynamic-configuration API Access amount, is characterized in that, described method comprises:
Calculate the shared weights of each application programming interfaces API, and calculate the historical visit capacity weights of each API in this API set according to historical visit capacity;
Calculate and revise rear theoretical visit capacity according to the actual access amount of historical visit capacity and resource;
Based on calculate revise after the theoretical visit capacity judgement magnitude relationship of theoretical visit capacity and last theoretical visit capacity next time;
If judgement next time theoretical visit capacity is more than or equal to last theoretical visit capacity, theoretical last time visit capacity is configured to API Access amount; If judge that theoretical visit capacity is less than last theoretical visit capacity next time, theoretical visit capacity heavy neotectonics constrain set afterwards is next time calculated.
2. the method for dynamic-configuration API Access amount as claimed in claim 1, is characterized in that, described based on calculate revise after the judgement of theoretical visit capacity next time theoretical visit capacity also comprise before with the magnitude relationship of last theoretical visit capacity:
Judge revise after resource service condition whether in load, if resource service condition in load, based on calculate revise after the theoretical visit capacity judgement magnitude relationship of theoretical visit capacity and last theoretical visit capacity next time;
If resource service condition is beyond load, computational load is introduced parameter, make to revise rear theoretical visit capacity in loading range, introduce parameter based on load and calculate revise after the theoretical visit capacity judgement magnitude relationship of theoretical visit capacity and last theoretical visit capacity next time.
3. the method for dynamic-configuration API Access amount as claimed in claim 2, it is characterized in that, if described judgement next time theoretical visit capacity is less than last theoretical visit capacity, in theoretical visit capacity heavy neotectonics constrain set afterwards next time being calculated, also comprise:
When theoretical visit capacity is next time less than last theoretical visit capacity, the heavy neotectonics after theoretical visit capacity is next time become to a constrain set, carry out the historical visit capacity weights of the shared weights of API and API and calculate, finally complete the configuration of API Access amount.
4. the method for the dynamic-configuration API Access amount as described in claims 1 to 3 any one, is characterized in that, described method also comprises:
In the time that access request amount newly-increased in certain period is greater than the pre-configured threshold parameter of client, trigger and carry out the shared weights of API and the historical visit capacity weights of API calculate, finally complete the configuration of API Access amount.
5. an API gateway, is characterized in that, described API gateway comprises:
API takies weights computing module, for calculating the shared weights of each application programming interfaces API;
Historical visit capacity weights computing module, for calculating the historical visit capacity weights of each API in this API set according to historical visit capacity;
Revise visit capacity computing module, revise rear theoretical visit capacity for calculating according to the actual access amount of historical visit capacity and resource;
Revised theory visit capacity comparison module, for based on calculate revise after the theoretical visit capacity judgement magnitude relationship of theoretical visit capacity and last theoretical visit capacity next time;
API Access amount configuration module, for when once theoretical visit capacity is more than or equal to once theoretical visit capacity, being configured to API Access amount by theoretical last time visit capacity in judgement; And in judgement once theoretical visit capacity be less than once theoretical visit capacity, the heavy neotectonics constrain set after theoretical visit capacity is next time calculated.
6. API gateway as claimed in claim 5, is characterized in that, described API gateway also comprises:
Load balancing module, be used for judging revise after resource service condition whether in load, if resource service condition in load, enters into revised theory visit capacity comparison module for judging the magnitude relationship of theoretical visit capacity and last theoretical visit capacity next time; If resource service condition is beyond load, computational load is introduced parameter, make to revise rear theoretical visit capacity in loading range, enter into revised theory visit capacity comparison module for judging the magnitude relationship of theoretical visit capacity and last theoretical visit capacity next time.
7. API gateway as claimed in claim 6, it is characterized in that, described API Access amount configuration module is also in the time that theoretical visit capacity is less than last theoretical visit capacity next time, theoretical visit capacity heavy neotectonics afterwards is next time become to a constrain set, feed back to API take in weights computing module, carry out that the shared weights of API calculate and historical visit capacity weights computing module in carry out the historical visit capacity weights of API and calculate, again complete the configuration of API Access amount.
8. the API gateway as described in claim 5 to 7 any one, it is characterized in that, described API gateway also comprises: threshold triggers module, for judging in the time that access request amount newly-increased in certain period is greater than the pre-configured threshold parameter of client, the shared weights of API are carried out in triggering and the historical visit capacity weights of API calculate, and finally complete the configuration of API Access amount.
9. a system for dynamic-configuration API Access amount, is characterized in that, described system comprises:
Multiple api interfaces, are connected with multiple applications client, for receiving calling of API application program;
Multiple API servers, for storing API resource;
API gateway, is connecting multiple api interfaces, and is connecting multiple API servers, for calculating the shared weights of each application programming interfaces API, and calculates the historical visit capacity weights of each API in this API set according to historical visit capacity; Calculate and revise rear theoretical visit capacity according to the actual access amount of historical visit capacity and resource; Based on calculate revise after the theoretical visit capacity judgement magnitude relationship of theoretical visit capacity and last theoretical visit capacity next time; If judgement next time theoretical visit capacity is more than or equal to last theoretical visit capacity, theoretical last time visit capacity is configured to API Access amount; If judge that theoretical visit capacity is less than last theoretical visit capacity next time, theoretical visit capacity heavy neotectonics constrain set afterwards is next time calculated.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201410331882.XA CN104168133B (en) | 2014-07-11 | 2014-07-11 | The method and gateway and system of a kind of dynamic configuration API Access amount |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201410331882.XA CN104168133B (en) | 2014-07-11 | 2014-07-11 | The method and gateway and system of a kind of dynamic configuration API Access amount |
Publications (2)
Publication Number | Publication Date |
---|---|
CN104168133A true CN104168133A (en) | 2014-11-26 |
CN104168133B CN104168133B (en) | 2017-07-18 |
Family
ID=51911780
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201410331882.XA Expired - Fee Related CN104168133B (en) | 2014-07-11 | 2014-07-11 | The method and gateway and system of a kind of dynamic configuration API Access amount |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN104168133B (en) |
Cited By (10)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN106803815A (en) * | 2015-11-26 | 2017-06-06 | 阿里巴巴集团控股有限公司 | A kind of flow control methods and device |
WO2017128980A1 (en) * | 2016-01-29 | 2017-08-03 | 华为技术有限公司 | Method and device for managing resources in cloud platform |
CN108023958A (en) * | 2017-12-08 | 2018-05-11 | 中国电子科技集团公司第二十八研究所 | A kind of resource scheduling system based on cloud platform resource monitoring |
CN108228346A (en) * | 2016-12-13 | 2018-06-29 | 佳能株式会社 | service system and its control method |
CN108388475A (en) * | 2018-02-27 | 2018-08-10 | 广州联智信息科技有限公司 | A kind of method and system based on terminal type provisioning API resource |
CN108845869A (en) * | 2018-05-31 | 2018-11-20 | 中国平安人寿保险股份有限公司 | Concurrent request control method, device, computer equipment and storage medium |
CN109936589A (en) * | 2017-12-15 | 2019-06-25 | 中国移动通信集团浙江有限公司 | Dynamic load balancing method, device and platform based on API heat value |
WO2019178761A1 (en) * | 2018-03-21 | 2019-09-26 | 华为技术有限公司 | Control method for application programming interface (api) gateway cluster, and api gateway cluster |
CN112788099A (en) * | 2020-11-11 | 2021-05-11 | 中移雄安信息通信科技有限公司 | Method, device and equipment for loading back-end service and computer storage medium |
CN119003288A (en) * | 2024-10-24 | 2024-11-22 | 河北东软软件有限公司 | Government affair data interface management system and method |
Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
KR20060126086A (en) * | 2005-06-03 | 2006-12-07 | 주식회사 케이티프리텔 | Parlay gateway based bidirectional mobile communication service system and method |
CN1968134A (en) * | 2006-04-03 | 2007-05-23 | 华为技术有限公司 | Middleware-based multimedia consolidation service realizing method and system |
CN101997746A (en) * | 2009-12-18 | 2011-03-30 | 中国科学院声学研究所 | Dynamic service quality strategy method and system of home network |
CN102281311A (en) * | 2010-06-10 | 2011-12-14 | 阿里巴巴集团控股有限公司 | Method, system and device for implementing network service based on open application programming interface |
-
2014
- 2014-07-11 CN CN201410331882.XA patent/CN104168133B/en not_active Expired - Fee Related
Patent Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
KR20060126086A (en) * | 2005-06-03 | 2006-12-07 | 주식회사 케이티프리텔 | Parlay gateway based bidirectional mobile communication service system and method |
CN1968134A (en) * | 2006-04-03 | 2007-05-23 | 华为技术有限公司 | Middleware-based multimedia consolidation service realizing method and system |
CN101997746A (en) * | 2009-12-18 | 2011-03-30 | 中国科学院声学研究所 | Dynamic service quality strategy method and system of home network |
CN102281311A (en) * | 2010-06-10 | 2011-12-14 | 阿里巴巴集团控股有限公司 | Method, system and device for implementing network service based on open application programming interface |
Cited By (22)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN106803815B (en) * | 2015-11-26 | 2020-03-24 | 阿里巴巴集团控股有限公司 | Flow control method and device |
CN106803815A (en) * | 2015-11-26 | 2017-06-06 | 阿里巴巴集团控股有限公司 | A kind of flow control methods and device |
WO2017128980A1 (en) * | 2016-01-29 | 2017-08-03 | 华为技术有限公司 | Method and device for managing resources in cloud platform |
CN107026877A (en) * | 2016-01-29 | 2017-08-08 | 华为技术有限公司 | The method and apparatus that resource is managed in cloud platform |
US10805385B2 (en) | 2016-01-29 | 2020-10-13 | Huawei Technologies Co., Ltd. | Method and apparatus for managing resource on cloud platform |
CN107026877B (en) * | 2016-01-29 | 2020-07-07 | 华为技术有限公司 | Method and device for managing resources in cloud platform |
CN108228346B (en) * | 2016-12-13 | 2022-01-18 | 佳能株式会社 | Service system and control method thereof |
CN108228346B9 (en) * | 2016-12-13 | 2022-04-22 | 佳能株式会社 | Service system and control method thereof |
US11303546B2 (en) | 2016-12-13 | 2022-04-12 | Canon Kabushiki Kaisha | Service system and control method of the same |
CN108228346A (en) * | 2016-12-13 | 2018-06-29 | 佳能株式会社 | service system and its control method |
CN108023958A (en) * | 2017-12-08 | 2018-05-11 | 中国电子科技集团公司第二十八研究所 | A kind of resource scheduling system based on cloud platform resource monitoring |
CN109936589B (en) * | 2017-12-15 | 2021-09-03 | 中国移动通信集团浙江有限公司 | Dynamic load balancing method, device and platform based on API (application program interface) heat value |
CN109936589A (en) * | 2017-12-15 | 2019-06-25 | 中国移动通信集团浙江有限公司 | Dynamic load balancing method, device and platform based on API heat value |
CN108388475A (en) * | 2018-02-27 | 2018-08-10 | 广州联智信息科技有限公司 | A kind of method and system based on terminal type provisioning API resource |
CN108388475B (en) * | 2018-02-27 | 2021-06-29 | 周翠敏 | Method and system for configuring API (application program interface) resources based on terminal type |
WO2019178761A1 (en) * | 2018-03-21 | 2019-09-26 | 华为技术有限公司 | Control method for application programming interface (api) gateway cluster, and api gateway cluster |
US11362952B2 (en) | 2018-03-21 | 2022-06-14 | Huawei Cloud Computing Technologies Co., Ltd. | Application programing interface API gateway cluster control method and API gateway cluster |
US11743187B2 (en) | 2018-03-21 | 2023-08-29 | Huawei Cloud Computing Technolgoies Co., Ltd. | Application programing interface (API) gateway cluster control method and API gateway cluster |
CN108845869A (en) * | 2018-05-31 | 2018-11-20 | 中国平安人寿保险股份有限公司 | Concurrent request control method, device, computer equipment and storage medium |
CN112788099A (en) * | 2020-11-11 | 2021-05-11 | 中移雄安信息通信科技有限公司 | Method, device and equipment for loading back-end service and computer storage medium |
CN119003288A (en) * | 2024-10-24 | 2024-11-22 | 河北东软软件有限公司 | Government affair data interface management system and method |
CN119003288B (en) * | 2024-10-24 | 2025-03-07 | 河北东软软件有限公司 | Government affair data interface management system and method |
Also Published As
Publication number | Publication date |
---|---|
CN104168133B (en) | 2017-07-18 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN104168133A (en) | Method and system for dynamic API page view configuration, and gateway | |
US8751659B2 (en) | Data center batch job quality of service control | |
CN101719931B (en) | Multi-intelligent body-based hierarchical cloud computing model construction method | |
CN108009023B (en) | Task scheduling method based on BP neural network time prediction in hybrid cloud | |
DE102020203877A1 (en) | PROCEDURES AND EQUIPMENT FOR CONTROLLING THE PROCESSING OF TELEMETRY DATA ON AN EDGE PLATFORM | |
CN109995669B (en) | Distributed current limiting method, device, equipment and readable storage medium | |
CN108632365A (en) | Service Source method of adjustment, relevant apparatus and equipment | |
CN110162388A (en) | A kind of method for scheduling task, system and terminal device | |
CN102193833A (en) | Efficient utilization of idle resources in a resource manager | |
US9559906B2 (en) | Server load management | |
CN117971499B (en) | Resource allocation method, device, electronic equipment and storage medium | |
CN111813524B (en) | Task execution method and device, electronic equipment and storage medium | |
CN110912972B (en) | Service processing method, system, electronic equipment and readable storage medium | |
CN117972367B (en) | Data storage prediction method, data storage subsystem and intelligent computing platform | |
CN115421930B (en) | Task processing method, system, device, equipment and computer readable storage medium | |
AlOrbani et al. | Load balancing and resource allocation in smart cities using reinforcement learning | |
CN104052677A (en) | Soft load balancing method and apparatus of single data source | |
CN112202829A (en) | Social robot scheduling system and scheduling method based on micro-service | |
CN116126534A (en) | Cloud resource dynamic expansion method and system | |
Antonescu et al. | Towards cross stratum sla management with the geysers architecture | |
CN111556126B (en) | Model management method, system, computer device and storage medium | |
CN111143033A (en) | Operation execution method and device based on scalable operating system | |
Mohamed et al. | Optimal assignment of autonomic managers to cloud resources | |
Le et al. | Agent-based sensor-mission assignment for tasks sharing assets | |
CN104407904A (en) | Module information allocation method and system |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
C06 | Publication | ||
PB01 | Publication | ||
C10 | Entry into substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant | ||
CF01 | Termination of patent right due to non-payment of annual fee | ||
CF01 | Termination of patent right due to non-payment of annual fee |
Granted publication date: 20170718 Termination date: 20200711 |