Proposal: generic Kubernetes scaler

Đang mở
#124 0 bình luận 0 reaction 0 người được giao Xem trên GitHub

Chưa có ai nhận issue này.

Đánh giá

Độ khó
5/5
Thời gian dự kiến
Hơn một tuần
Mức phù hợp với người mới
35/100
Loại issue
Tính năng
Độ rõ ràng
Khá rõ ràng
Mức độ hoạt động
Sôi nổi
Công nghệ
helm, kubernetes, rust

Hướng nghiên cứu

Start by reading the existing scaler trait, scaling loop, and persistence code; their file paths are not given in the issue. Then review how Kubernetes deployments and HPA status can fit the proposed configuration. The issue needs maintainer feedback on the design before implementation, and done would include an accepted scaler design, implementation, and documentation of the Helm replica limitation.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

We run Trino on k8s with helm charts and we wanna use trino-lb in front for routing, queuing,etc...

Today there is no scaler trait implemented for generic clusters.

I would like to add an implementation for this kind of workload and I'd be happy to write the PR.
Before I start with anything, I would like to have your opinion on the design and whether you would accept it upstream.

Proposal

clusterAutoscaler:
  reconcileInterval: 30s
  kubernetes:
    clusters:
      trino-batch-1:
        namespace: trino-batch
        coordinatorDeployment: trino-batch-1-trino-coordinator
        # optional, only needed for worker-aware upscale
        workerDeployment: trino-batch-1-trino-worker

The idea is the scaler only touches coordinators and workers are left to users' own autoscaler.

This mainly means spawning new clusters will be the job or scaler while autoscaling each cluster goes by an HPA.

We can also make the scaler be aware of HPA using some opt-ins, to stop both scaler and HPA reacting to the same load.

trinoClusterGroups:
  batch:
    autoscaling:
      upscaleQueuedQueriesThreshold: 1
      waitForWorkerScaleUp: 2m

When it is set and the queue is above the threshold, trino-lb does not start the next cluster while any active
cluster in the group has a worker scale-up in progress (HPA desiredReplicas > currentReplicas), for at most
waitForWorkerScaleUp. If no scale-up is in progress (workers at max, or workers idle because the coordinator
is the limit), trino-lb starts the next cluster as it does today.

Known limit

The upstream Trino chart hardcodes replicas: 1 on the coordinator Deployment.
A helm upgrade or a GitOps sync will turn a stopped cluster back on unless the deploy tool ignores
/spec/replicas on the coordinator Deployment (e.g. Argo CD ignoreDifferences with RespectIgnoreDifferences=true).
We would document this next to the scaler.

Questions

  1. Is reading HPA status from trino-lb fine, or would you prefer another signal for 'a worker scaling is in progress'?
  2. Anything in the scaling loop or persistence we should know before starting?
Ngôn ngữ chính
Rust
Star
40
Fork
9
Merge trung bình
22 phút
Pull request đã merge (30 ngày)
1

Chuẩn bị môi trường

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của stackabletech/trino-lb

Tất cả issue của stackabletech/trino-lb

Issue tương tự

Thêm issue về Rust

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.