The application provides an API flow limiting method, a
server device, a storage medium and a program product, the method comprising: a feedforward control step, using a Holt-Winters model to predict future API request quantity, and obtaining a feedforward adjustment amount according to the size relationship between the future API request quantity and the rated
processing API request quantity of the
server; a
feedback control step, performing PID control on the error between the expected average
response time of the
server and the actually measured average
response time of the server, and obtaining a feedback adjustment amount; a
control synthesis step, obtaining a synthesized adjustment amount and a candidate token
generation rate; an amplitude limiting step, generating a final token
generation rate based on the upper and lower limits of the token
generation rate and the candidate token generation rate. By using the above technical scheme, adaptive API flow limiting is realized, the calling rate can be dynamically adjusted in the flow limiting process, the complex and changeable business scenarios can be effectively adapted, the server
resource utilization efficiency is improved, and the
high availability and stability in the API calling process are guaranteed.