Quantcast
Channel: Active questions tagged https - Stack Overflow
Viewing all articles
Browse latest Browse all 1529

How to handle multiple requests to third-party APIs with rate limits in a web application? [closed]

$
0
0

I’m working on a web application that needs to send multiple requests to third party API, which have strict rate limits/per sec. When exceeding these limits, I receive a 429 Too Many Requests error, causing some requests to fail.

The challenge is that users expect immediate results in the web application. Since we don't have user authentication (its application requirement), it’s difficult to associate background jobs with specific users.

Making multiple API requests is a critical part of my application functionality, so I need a way to queue these requests while respecting rate limits. Using the sleep method isn't good because it would block the Puma server and affect other requests.


Viewing all articles
Browse latest Browse all 1529

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>