Add a comparison with the ratelimit middleware

This commit is contained in:
Radoslav Gatev 2021-01-03 21:30:23 +02:00 committed by GitHub
parent 4ee8bf2f19
commit 7e0a3fbb4d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 0 deletions

View File

@ -11,6 +11,8 @@ Using Dapr, you can control how many requests and events will invoke your applic
*Note that this rate limiting is guaranteed for every event that's coming from Dapr, meaning Pub/Sub events, direct invocation from other services, bindings events etc. Dapr can't enforce the concurrency policy on requests that are coming to your app externally.*
*Note that rate limitting can be achieved by using the **middleware.http.ratelimit**. However, there is an imporant difference between the two approaches. The ratelimit middlware is time bound and limits the number of requests per second, while the app-max-concurrency specifies the number of concurrent requests (and events) at any point of time.*
## Setting app-max-concurrency
Without using Dapr, a developer would need to create some sort of a semaphore in the application and take care of acquiring and releasing it.