Zum Inhalt springen
GigadriveDocs

Concurrency

How a Function serves many requests at the same time, when Gigadrive Network adds capacity, and what happens at the plan limit.

Concurrency is the number of requests one Function is processing at the same moment. There is no concurrency setting to tune: Gigadrive Network spreads requests across running copies of your Function and adds copies when they fill up.

The limit that binds

Your plan sets a Concurrency limit, counted in requests and summed across every copy of a single Function.

PlanConcurrency per Function
Starter100 requests
Pro500 requests
EnterpriseUnlimited

The limit is per Function, not per application and not per organization. Two Functions in the same deployment each get the full allowance. Other ceilings, including organization-wide ones, are in Limits and billing.

How capacity is added

The first request to a Function starts it. From there:

  • Each request is routed to the least loaded copy.
  • Once a copy is holding 8 requests, another copy starts in the background while the current one keeps serving.
  • No single copy takes more than 32 requests at a time.

Scale-out is a background action, so a burst does not stall behind it. A request that arrives while every copy is busy waits up to 2 seconds for a slot to free up or for new capacity to come online, then gives up.

The limit is not enforced to the exact request under a sharp burst, so a Function can overshoot it slightly. Size against the limit, not against the precise number.

When the limit is reached

Two different refusals, with two different fixes:

StatuserrorCodeMeaning
429EDGE_FUNCTION_CONCURRENCY_LIMITThe plan's Concurrency is fully in use. Raise the plan or shed load.
503EDGE_FUNCTION_AT_CAPACITYUnder the limit, but no copy freed up within the wait budget. Retry.

Both carry Retry-After: 2. A Function that is already at its Concurrency limit will not start another copy, because a new copy could not admit anything anyway; you get the 429 instead of a cold start you would pay for.

Scaling down

A Function with no traffic for 5 minutes is paused. Its memory is released, billing stops, and the next request wakes it. Surplus copies are retired first, and the last one is kept in a state it can resume from.

A second, much faster pause runs between requests. Two seconds after the last in-flight request completes, the Function's CPU is stopped, and the next request resumes it before it is forwarded. A Function that is up but not working is not burning CPU time you pay for.

PHP

A PHP Function runs on php-fpm with 4 worker processes, so one copy serves at most 4 requests at a time regardless of the Concurrency limit. The limit is reached by running more copies. Node and Bun Functions have no such per-copy worker count; their ceiling is 32 concurrent requests.

The deployment's Resources page in the console charts live concurrency per Function against the limit, which is the fastest way to tell a concurrency refusal apart from a slow Function.