0

I have a spring boot application and, I want to apply rate limits on some APIs which are integrated with 3rd party API for Payments that has rate limits. Basically a common pool for this external API, so that the API calls made to the 3rd party APIs don't exceed the rate limit.

I have gone through this link : https://medium.com/teamarimac/implementing-throttling-in-java-spring-boot-ec4723cfce9f.

In this link acquire() method defines my actual requirement.

But I have my application running on AWS cloud having multiple instances. The method mentioned in the link applies on single instance only, but I want a solution which will work with all the instances combined.

Thnaks

Gaurav
  • 37
  • 1
  • 8

1 Answers1

0

Below is the different solution that is useful to you.

You can use netflix zuul for this, with the help of below link you will get more details.

https://dzone.com/articles/adding-rate-limit-for-spring-cloud-netflix-zuul.

Or Another way based on your context either use EC2 throttling or API gateway throttling https://dzone.com/articles/customized-rate-limiting-for-api-gateway-by-path-p https://docs.aws.amazon.com/general/latest/gr/aws_service_limits.html https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-resource-limits.html

Maheshwar Ligade
  • 6,709
  • 4
  • 42
  • 59