Hi, I use my Nestjs backend to receive leads via webhook or to collect them via polling (if the provider does not offer the possibility to send us the leads).
I currently use Cron from @nestjs/schedule for polling. If I now scale my Nestjs application horizontally, e.g. via docker scale or kubernetes, the job would be executed several times over the number of instances.
I have read that with Redis you can use Redlock to lock the job for all but one instance so that it is not executed multiple times.