I am working on an app that requires fetching data from a third-party server and that server allows max 1 request per seconds.
Now, all request send as job and I am
You could use this package to use rate limiting with Redis or another source, like a file. Uses settings to set bucket size and rate as fractions of the time limit, so very small storage.
composer require bandwidth-throttle/token-bucket
https://github.com/bandwidth-throttle/token-bucket
It allows you to wrap the check in an if, so it will wait for a free token to be available, 1 a minute in your example. In effect, it makes the service sleep for the required amount of time until a new minute.