Rate Limiting

This article discusses the causes of rate limiting and mitigation options.

About Rate Limiting

Workflow execution rates are by default limited to 1000 Node invokes per 60 seconds per Flowgear Site. When this rate is exceeded over a rolling 60 second period, a Rate Limiting entry will be generated in the logs lasting up to 10 seconds at a time.

Rate limiting ensures that Workflows that are executing steps at a high rate do not degrade the performance of other Workflows. It is seldom triggered in a legitimate scenario and almost always results from a Workflow iterating or looping in a way that was unintended.

Mitigating Rate Limiting

Here are some tips for identifying and dealing with rate limiting:

  • Begin by identifying the Workflow that is responsible for the highest execution rate. If you are not able to determine this from the Workflow Logs, you can request a report from Flowgear that will present your execution rates for all Workflows in your Sites
  • High invoke counts often emanate from iterator or loop operations such as Splitter or Loop. Check that the upper bound on a loop operation is being correctly set or that the XPath used in a Splitter is not matching elements more than once. Also check the size of the incoming document
  • If a Workflow is being invoked by API, it's possible that a consuming application is triggering it erroneously. Reset the credentials you're using and then update the consuming apps and services one at a time in order to determine which app or service is responsible for the high number of calls
  • If you have a Workflow that is legitimating iterating thousands of times, consider refactoring a set of steps downstream from an iterator into a more concise form. A code Script or custom Node would be good options. Alternatively, if you are only occasionally hitting rate limits, consider migrating some of your Workflows to a separate Flowgear Site.

Increasing Rate Limits

If your integration scenario requires a high throughput of Nodes, log a ticket with Flowgear support to have the rate limit increased.