Skip to content

Latest commit

 

History

26 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

GoScaler — Elastic Optimization for Serverless Cold Starts

English | 中文

Rank Contest Language

Runner-up solution (2nd of 6506 teams) of the 2023 Cloud Native Programming Challenge, Track 1: elastic optimization for cold starts in Serverless scenarios.

Problem

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.

Approach

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

Quick start

make build          # or: go build ./cmd/scaler
./run.sh            # launch against the simulator / scoring platform

Docker-based scoring is available via the provided Dockerfile.

Resources

About

🥈 Runner-up (2nd of 6506) of the 2023 Cloud Native Challenge: elastic scaling to tame Serverless cold starts — k-means workload prediction in Go

Topics

Resources

Stars

2 stars

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages