.nethangfire

Hangfire rate limiting


I am using Hangfire in .NET to run some background jobs (send emails specifically). My email service has rate limiting of 100 emails a minute and 1000 per hour.

Is there any way to configure rate limiting in Hangfire to ensure I don't go over these limits?


Solution

  • As far as I know this rate limiting feature can be achieved through the Hangfire.Ace rate limiting feature extensibility package which is available through a paid subscription.

    Rate Limiters

    Fixed Window Counters – limit how many job executions are allowed within a given fixed time interval.

    Sliding Window Counters – limit how many job executions are allowed to run within any specific time interval.

    Dynamic Window Counters – allow to create window counters dynamically depending on job arguments.