English | 䏿–‡
Runner-up solution (2nd of 6506 teams) of the 2023 Cloud Native Programming Challenge, Track 1: elastic optimization for cold starts in Serverless scenarios.
A FaaS platform must serve bursty request traffic while minimizing both cold-start latency and idle resource cost. The scaler decides when to pre-warm containers, how many to keep, and when to reclaim them.
Built on the official contest scaffold (AliyunContainerService/scaler), the
core scheduling logic is custom:
- k-means workload clustering (
pkg/kmeans) — clusters historical request-rate series to recognize recurring load patterns and predict demand windows, trading warm-container inventory against cold-start risk - Resource lifecycle management (
pkg/scaler) — fine-grained warm container scheduling and reclamation (app.go/resource.go/gc.go) - gRPC serving layer (
pkg/server,cmd/scaler) implementing the contest's platform protocol, with simulator configs (sim*.yaml) for offline evaluation
make build # or: go build ./cmd/scaler
./run.sh # launch against the simulator / scoring platformDocker-based scoring is available via the provided Dockerfile.