-
- Downloads
Add feature: scale from zero to 1 replicas
This change allows functions to be "idled" or scaled to zero
replicas and then be invoked later on. There is a penalty to
scaling up - the API gateway proxy will block until the function
is ready.
A cache is included to off-set the calls to upstream API to check
on readiness along with unit tests.
Testing via scaling to zero replicas and then invoking function.
On Swarm I observed 3 seconds on an Intel Nuc i5 for scaling back
from zero replicas.
Signed-off-by:
Alex Ellis (VMware) <alexellis2@gmail.com>
Showing
- gateway/handlers/function_cache.go 59 additions, 0 deletionsgateway/handlers/function_cache.go
- gateway/handlers/function_cache_test.go 72 additions, 0 deletionsgateway/handlers/function_cache_test.go
- gateway/handlers/scaling.go 147 additions, 0 deletionsgateway/handlers/scaling.go
- gateway/server.go 10 additions, 2 deletionsgateway/server.go
Loading
Please register or sign in to comment