CenturyLinkCloud / mdw

https://centurylinkcloud.github.io/mdw/
MIT License
46 stars 10 forks source link

Inbound request queuing and throttling #829

Open donaldoakes opened 4 years ago

donaldoakes commented 4 years ago

Provide a mechanism to smooth out large surges in request volume:

  1. Persist request documents and metatdata as usual.
  2. If request volume exceeds a specified threshold (requests/second), instead of invoking from the listener right away, queue the request IDs in a persistent store for later processing.
  3. Drain requests according to their IDs at a designated rate.

Request queuing and throttling should be optional based on configuration.