Applying Throttling for Performance Improvement

Learn how to throttle incoming requests in Azure Functions.

Sometimes, instead of enabling our application to process as many concurrent operations as possible, we need to decrease this number. This process is known as throttling. Although it might seem counterintuitive, throttling is performed to increase the performance, but it applies to the system as a whole and not just one specific application in the system.

For example, we might not care about how fast the function app processes incoming requests as long as it can process them all within a specific amount of time. However, if it’s connected to a database that other applications use, attempting to process too many requests simultaneously can overload the database and make other applications in the system slow. Therefore, we would use throttling to drip data through the function app at a manageable rate.

Applying throttling in Azure Functions

Throttling is configured in the host.json file. The following interactive playground demonstrates how it can be done:

Get hands-on with 1200+ tech skills courses.