Shwetabh Shekhar
Shwetabh Shekhar

Reputation: 3054

Is it possible to reach the Lambda invocation limit(10000) without reaching its concurrency limit(1000)?

By, default Lambda concurrent execution limit is 1000 and invocation is (*10 * current_execution_limit*) 10,000. https://docs.aws.amazon.com/lambda/latest/dg/limits.html

How and when will the invocation limit come into play? If I invoke a total of say 1001 functions at a given time in 1 account it will give a throttling error as 1000 functions will be active, then what is the point of setting an invocation limit when it can never be reached? Is my understanding correct? How can one reach the invocation limit without disturbing concurrency limit?

Upvotes: 2

Views: 1778

Answers (1)

Michael - sqlbot
Michael - sqlbot

Reputation: 179384

The invocation frequency limit is a limit of the allowed number of requests per second to invoke the function.

For synchronous invocations, you can only exceed this limit only if your function finishes executing less than 1/10 s = 100 ms, because you could -- in that case -- invoke in excess of 10,000 requests per second while still not exceeding a concurrency of 1,000. If your function runs for more than 100 ms, you could not exceed 10,000 invocations per second because the concurrency limit would make that impossible.

For asynchronous invocations, you can more easily exceed the invocation frequency limit, because asynchronous invocations return a response without waiting for the function to actually run -- the return value from the function is discarded. Lambda enqueues the requests and will run them at up to the max concurrency, but it won't accept them at a rate exceeding the invocation frequency limit.

Upvotes: 3

Related Questions