Skip to content

Concurrency is set to 80 by default #202

Closed as not planned
Closed as not planned
@andreas-thomik

Description

@andreas-thomik

Description

According to the documentation, a default function has a memory of 256MB (which translates to .167 vCPU according to this).

    memory: int | MemoryOption | Expression[int] | _util.Sentinel | None = None
    """
    Amount of memory to allocate to a function.
    A value of ``RESET_VALUE`` restores the defaults of 256MB.
    """
 
    ...

    concurrency: int | Expression[int] | _util.Sentinel | None = None
    """
    Number of requests a function can serve at once.
    Can be applied only to functions running on Cloud Functions (2nd gen).
    A value of ``RESET_VALUE`` restores the default concurrency (80 when CPU >= 1, 1 otherwise).
    Concurrency cannot be set to any value other than 1 if `cpu` is less than 1.
    The maximum value for concurrency is 1,000.
    """

However, when creating a function with a default setup like that

from firebase_functions import https_fn

@https_fn.on_call()
def test_func():
    return None

We end up with a concurrency of 80:
image

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions