← Back to Leaderboard
Rsgl-project

sgl-project/rbg

Kubernetes controller for coordinating multi-role LLM inference workloads

AI FrameworkQuickstart ↓
Engineering Health (Methodology)
A+ · 90/100
Maintenance Activity
● Updated yesterday
Latest Release
v0.8.0
Commercial License Check
Apache-2.0 · Commercial Friendly

Automated SPDX check for reference only — not legal advice. Disclaimer

Maintenance35/35
Fork Adoption18/25
Release Cadence17/20
License Clarity20/20
DockerSelf-HostedAPI
Total Stars
★ 318
24h Growth
+0
7d Growth
+0
Forks
97

GitHub Star History

Full-history star trajectory from GitHub official history. Switch ranges or hover any point for exact counts.

sgl-project/rbg Star History (2025-08-27 - 2026-12-03) ALL-TIME STAR HISTORY (2025-08 – 2026-12) +317 in 463d · avg +1/day 336 168 0 2025-08-27: ★ 12025-09-27: ★ 652025-11-01: ★ 902025-12-06: ★ 1202026-01-10: ★ 1502026-02-14: ★ 1682026-03-21: ★ 1902026-04-25: ★ 2082026-05-30: ★ 2242026-07-04: ★ 2512026-08-08: ★ 2702026-09-12: ★ 2942026-10-17: ★ 3052026-11-15: ★ 3142026-12-03: ★ 318 ★ 318 2025-08 2026-04 2026-12

Evidence-Backed Technical Brief

AI Deep Review

Architecture & Core Mechanics

RoleBasedGroup (RBG) is a Kubernetes control plane for inference workloads, not an inference engine. A workloads.x-k8s.io/v1alpha2 RoleBasedGroup models a service as named roles, each with its own replica count, Pod template, and lifecycle settings. Dependencies gate startup on role readiness. RoleInstance groups Pods that share a lifecycle and supports in-place updates; RoleInstanceSet is the preferred workload type. CoordinatedPolicy is a separate CRD for operations that span roles.

The Go module is sigs.k8s.io/rbgs and declares Go 1.25.0, Kubernetes API and client libraries at v0.34.2, and OpenKruise v1.8.3. The tree separates API definitions (api/), client code (client-go/), and command entrypoints (cmd/). The image runs /manager and also ships kubectl-rbg. The integration boundary is the Kubernetes API and the Pod templates: RBG defines how the workload is organized and reconciled, while the containers implement model serving.

Key Capabilities & Differentiators

A role can use standalonePattern for one Pod per instance or leaderWorkerPattern for a distributed replica with a leader and workers. This lets a service mix single-Pod roles with multi-node tensor-parallel roles. Reusable role templates accept role-specific patches. RoleID injection and built-in discovery give workloads stable role identities and a way to discover peers; CoordinatedPolicy exposes maxSkew and progression for cross-role rollouts and scaling.

The SGLang examples cover both aggregated and prefill/decode-disaggregated serving. Dynamo examples cover both layouts, including multi-node variants. Mooncake examples cover KV-cache reuse and separate transfer-engine configurations for SGLang and vLLM. Topology-aware placement is intended to account for GPU interconnect and network locality, while gang-scheduling examples use Volcano or scheduler-plugins. These mechanisms help express placement and coordination requirements; they do not establish a throughput or latency improvement on a given cluster.

Trade-offs & Limitations

Compared with independent Deployments or StatefulSets, RBG makes startup dependencies, coordinated rollouts, and linked recovery part of the workload model rather than leaving them to scripts or operators. LeaderWorkerSet addresses the leader-worker grouping problem; RBG adds coordination among distinct roles that may have different replica layouts. For a single inference server, or for services whose roles can safely evolve independently, the native primitives are usually the simpler choice.

The cost is an additional controller, custom resources and webhooks, and an API migration path to manage. Compatibility mode keeps existing legacy workloads reconciling but rejects new uses; strict mode removes the corresponding watches and permissions and rejects legacy types on create and update. Gang scheduling and placement constraints can also leave replicas pending if the cluster cannot satisfy them, so validate scheduling with realistic GPU inventory. Apache-2.0 covers RBG itself, not the terms of model weights or third-party runtime images.

Hardware & Deployment Guide

Self-host on Kubernetes using Helm and pin the release chart after checking its compatibility guidance. The compatibility table lists v0.7.0 with Kubernetes v1.22.x or later and no LeaderWorkerSet requirement; v0.6.0 lists Kubernetes v1.28.x or later and LeaderWorkerSet v0.7.0 or later. Do not extrapolate that matrix to newer tags. The Docker build uses Go 1.26.6, produces the manager and CLI with make build and make build-cli, and ships them on Alpine. /manager runs as UID/GID 65532; a replacement base image must preserve /bin/sleep for the manager's preStop hook.

For new clusters, disable deprecated workload types and use RoleInstanceSet. On upgrades with legacy roles, keep compatibility mode until migration and reconciliation have completed and old RBG-owned workloads are gone, then disable it. The v0.7.0 milestone introduced conversion webhooks, coordinated policies, and gang scheduling alongside v1alpha2. The v0.9.0 alpha series separately records work on webhook shutdown draining, exclusive topology scheduling, and RoleInstance restart-budget handling. For GPU serving, provision the engine images, model artifacts, GPU capacity, and network independently of the controller.

Service topology: v1alpha2 RoleBasedGroup combines role dependencies, stable RoleID injection, and built-in service discovery.
Replica layout: standalonePattern uses one Pod per instance; leaderWorkerPattern represents a leader and workers for distributed execution.
Lifecycle coordination: CoordinatedPolicy uses maxSkew and progression to govern rolling updates and scaling across roles.
Placement: Topology-aware affinity covers GPU interconnect and network locality; gang-scheduling examples target Volcano and scheduler-plugins.
Runtime integrations: SGLang examples cover aggregated and prefill/decode-disaggregated serving, with separate Dynamo and Mooncake examples.
Migration controls: controller.deprecatedWorkloadTypes.enabled determines whether remaining legacy workloads can continue to reconcile.
Best For

Kubernetes platform teams deploying prefill/decode-disaggregated or multi-node inference that needs role-aware placement, controlled startup, and coordinated rollouts or scaling.

Skip If

You need a model server or hosted inference API, or your workload is a single role that a Deployment or StatefulSet can manage without cross-role policies.

Reviewed on 2026-12-02 · Grounded in GitHub README, root file tree & releasesMethodology

Quick Start & Installation

DockerSelf-HostedAPI
VERSION=$(curl -sL https://api.github.com/repos/sgl-project/rbg/releases/latest | grep '"tag_name"' | sed -E 's/.*"v([^"]+)".*/\1/')
helm upgrade --install rbgs https://github.com/sgl-project/rbg/releases/download/v$VERSION/rbgs-$VERSION.tgz \
            --namespace rbgs-system --create-namespace --wait

Comparison vs. Top LLMs & Inference Alternatives

Full comparison →
RepositoryStars7d TrendStackLicenseCore Positioning
rbg ★318—GoApache-2.0Kubernetes controller for coordinating multi-role LLM inference workloads
transformers169.6k+337PythonApache-2.0A PyTorch model-definition SDK for unified inference and training across modalit
langchaingo9.8k+11GoMITA Go SDK for composing LLM calls, retrieval, and tools inside applications
pytorch105.9k+299Python—Python-first tensor SDK for GPU-accelerated training and inference

AI Context Briefing (for Claude / Cursor / Windsurf)

Standardized architecture summary & quickstart commands ready to paste into coding agents.

Raw .md ↗
curl -sL https://repoforai.com/repo/sgl-project/rbg.md

Embed Star History Chart & Badges in README.md

Full-history Star History SVGs and velocity cards on GitHub Camo: drop-in replacement for OSSInsight and Star History widgets.

sgl-project/rbg Star History on RepoForAI

Active README embeds unlock Hot-Tier 6h Telemetry Refresh automatically (zero pay-to-rank).

Frequently Asked Questions about rbg

How do I wire a prefill/decode-disaggregated service into RBG?

Define the router, prefill, and decode roles in a v1alpha2 RoleBasedGroup, with a Pod template and replica count for each. Use dependencies to order startup and select standalonePattern or leaderWorkerPattern per role. RBG handles workload lifecycle and discovery; the chosen runtime still handles request routing, model execution, and KV-cache transfer.

How much GPU memory does RBG require?

RBG is a Go controller, not a runtime that loads model weights. Size the controller separately from the inference Pods. GPU capacity and VRAM depend on the model, context length, concurrency, KV cache, and parallelism. For multi-node roles, test GPU placement and interconnect performance under representative load; there is no fixed RBG VRAM requirement to use as a sizing baseline.

Can we self-host RBG commercially or in a restricted network?

RBG is Apache-2.0 licensed and can be self-hosted on Kubernetes using its Helm chart. Review the license and notice requirements when redistributing RBG, and check the terms of model weights, inference images, and optional components separately. For restricted networks, plan to mirror the chart and required images and make model artifacts available inside the environment.

When should we choose RBG over Deployment, StatefulSet, or LeaderWorkerSet?

Deployment and StatefulSet are simpler when a service has one role or when roles can be rolled out independently. LeaderWorkerSet is an option when the main abstraction is a leader-worker group. Choose RBG when dependencies, rollout or scaling skew, or linked recovery across distinct roles need to be represented as policy rather than managed through external scripts.

Upstream README & Documentation

This profile focuses on independent engineering analysis and live telemetry. Read the full upstream README, changelog, and examples directly on GitHub.

Maintaining sgl-project/rbg? Pin to Homepage + competitor /alternatives pages with a custom Cloud/Demo CTA.Feature sgl-project/rbg on Homepage & Alternatives ($19)
WEEKLY BREAKOUT DIGEST

Top 10 Breakout Open-Source AI Repos, Every Thursday

Signal-only digest of fast-growing AI repos, SPDX license alerts, and architecture picks. Zero spam.

Zero spam · 1-click unsubscribe · Privacy Policy

Saved in your browser · Export Markdown RFC tables or jump into /vs compare