Skip to content

feat: support rbgs scaling#1

Merged
cheyang merged 1 commit intosgl-project:mainfrom
gujingit:feature/rbgs-scaling
Aug 28, 2025
Merged

feat: support rbgs scaling#1
cheyang merged 1 commit intosgl-project:mainfrom
gujingit:feature/rbgs-scaling

Conversation

@gujingit
Copy link
Copy Markdown
Collaborator

Feature

support for scaling rbgs

How to use

  1. create rbgs with replicas=2
kubectl apply -f examples/rbgs/rbgs-base.yaml
$ kubectl get rbgs
NAME        DESIRED   READY   AGE
rbgs-test   2         2       48s

$ kubectl get rbg
NAME          READY   AGE
rbgs-test-0   True    47s
rbgs-test-1   True    47s

$ kubectl get po
NAME                                  READY   STATUS    RESTARTS   AGE
rbgs-test-0-role-1-0                  1/1     Running   0          56s
rbgs-test-0-role-2-5dd697886d-dpzx6   1/1     Running   0          56s
rbgs-test-0-role-2-5dd697886d-xkcjp   1/1     Running   0          56s
rbgs-test-1-role-1-0                  1/1     Running   0          56s
rbgs-test-1-role-2-55c778bc5f-whcjx   1/1     Running   0          56s
rbgs-test-1-role-2-55c778bc5f-zsvf2   1/1     Running   0          56s

  1. scale up rbgs with replicas=3
kubectl scale rbgs rbgs-test --replicas=3
$ kubectl get rbgs
NAME        DESIRED   READY   AGE
rbgs-test   3         3       93s

$ kubectl get rbg
NAME          READY   AGE
rbgs-test-0   True    92s
rbgs-test-1   True    92s
rbgs-test-2   True    20s

$ kubectl get po
NAME                                  READY   STATUS    RESTARTS   AGE
rbgs-test-0-role-1-0                  1/1     Running   0          107s
rbgs-test-0-role-2-5dd697886d-dpzx6   1/1     Running   0          107s
rbgs-test-0-role-2-5dd697886d-xkcjp   1/1     Running   0          107s
rbgs-test-1-role-1-0                  1/1     Running   0          107s
rbgs-test-1-role-2-55c778bc5f-whcjx   1/1     Running   0          107s
rbgs-test-1-role-2-55c778bc5f-zsvf2   1/1     Running   0          107s
rbgs-test-2-role-1-0                  1/1     Running   0          35s
rbgs-test-2-role-2-64b54f467d-l7g6g   1/1     Running   0          35s
rbgs-test-2-role-2-64b54f467d-zlkqt   1/1     Running   0          35s

  1. scale down rbgs with replicas=2

Noted: When scaling down rbgs, the max index rbg will be deleted first.

kubectl scale rbgs rbgs-test --replicas=2
$ kubectl get rbgs
NAME        DESIRED   READY   AGE
rbgs-test   2         2       3m6s

$ kubectl get rbg
NAME          READY   AGE
rbgs-test-0   True    3m8s
rbgs-test-1   True    3m8s


$ kubectl get po
NAME                                  READY   STATUS    RESTARTS   AGE
rbgs-test-0-role-1-0                  1/1     Running   0          3m19s
rbgs-test-0-role-2-5dd697886d-dpzx6   1/1     Running   0          3m19s
rbgs-test-0-role-2-5dd697886d-xkcjp   1/1     Running   0          3m19s
rbgs-test-1-role-1-0                  1/1     Running   0          3m19s
rbgs-test-1-role-2-55c778bc5f-whcjx   1/1     Running   0          3m19s
rbgs-test-1-role-2-55c778bc5f-zsvf2   1/1     Running   0          3m19s

Copy link
Copy Markdown
Collaborator

@cheyang cheyang left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/lgtm
/approve

@cheyang cheyang merged commit b4edfaa into sgl-project:main Aug 28, 2025
@gujingit gujingit deleted the feature/rbgs-scaling branch September 1, 2025 08:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants