openfaas / faas

OpenFaaS - Serverless Functions Made Simple
https://www.openfaas.com
MIT License
25.06k stars 1.93k forks source link

Enabling "scaling to zero" functionality on faasd #1840

Closed DanieleLattaioli closed 4 months ago

DanieleLattaioli commented 4 months ago

My actions before raising this issue

Why do you need this?

I have some functions that are not triggered for a long time

Expected Behaviour

I would like to scale my functions replicas to zero

Current Behaviour

When I deploy the function with faas-cli deploy -f hello.yml and then faas-cli list, there is a replica of hello function

danielelattaioli@MBPdiDaniele2 Multipass % faas-cli list
Function                        Invocations     Replicas
hello                           1               1     
nitishkumar71 commented 4 months ago

Hi

Please refer https://github.com/openfaas/faasd/issues/353. Scale to zero is not supported in any community edition implementation of OpenFaas.

alexellis commented 4 months ago

Thanks for the interest. The documentation you're referring to is about OpenFaaS on Kubernetes, the Community Edition of faasd doesn't support scaling to zero, however after a reboot, all functions start off at 0/0 replicas.

alexellis commented 4 months ago

/lock: resolved