How to send requests through nginx for rate limiting ( throttle) per second?

580 Views Asked by At

I have script i node.js that makes requests to other api s. This script can run locally, on server, anywhere, it does not matter. The servers have limitations on requests per second. How can i send the reqs through NGINX?How to set nginx for it? should i change the urls, for example if i want to send requests to facebook, i need to configure specific nginx path like localhost:8081/facebooklocal, for it, and send reqs to nginxs localhost:8081/facebooklocal, and set req limits for it? Which way is better? Also i need, to limit reqs with specific parameter in it* There are a lot of tutorials about incoming requests, but i am asking about outcoming requests (from locally running server to some API s).

How to redirect requests to localhost:8085/api to theremotesite/api ?

0

There are 0 best solutions below