What is considered function invocation?

Hello Team,

I’m trying to understand how netlify counts invocations. I’m having api routes for my nextjs app.
Making 10 GET /api/users/:id requests counted as ten invocations? or just the first call (cold start) to start the function and subsequent requests until the function sleeps counted as 1 invocation?

Thank you!

From my experience, I would assume that 1 invocation is per function call regardless of cold or warm (Realistically it could stay warm for 5 mins but I don’t think there’s any guarantee you use the same lambda unless you manage specific connection keys so maybe 1 in 10* use the same connection anyways?)

*1 in 10 made up stat just for the example.

Hi, @s-kris. Each HTTP request is an invocation. Cold start or not, all HTTP requests to the Function count as an invocation.

If there are other questions, please let us know.

Thank you! @luke @AaronP

2 Likes