Skip to content

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

41 Commits

Folders and files

Repository files navigation

Cell Congestion Optimization rApp

The open-source edition of the CoRAN Labs Cell Congestion Optimization rApp: a Non-RT RIC rApp that watches per-cell PM streamed over O1, detects PRB congestion, and relieves it by handing the heaviest UEs over to a declared neighbour cell - a full closed loop over O1, with a live dashboard.

Animated closed loop: the serving cell crosses the PRB threshold, the rApp triggers a handover over O1, the heaviest UEs migrate to the neighbour cell, and the load rebalances - the same view the dashboard's Activity topology renders live.

How it works

gNB ──WS metrics──▶ O1 adapter ──POST /pm──▶ rApp ──▶ dashboard + InfluxDB
     (PerfMetricJob: streamTarget,            │  classify every report
      granularityPeriod)                      │  pick neighbour target + UEs
                                              ▼
gNB ◀──ho command── O1 adapter ◀──NETCONF── SDNR ◀──RESTCONF PATCH── rApp
  • Ingest - the O1 adapter streams PM envelopes to POST /pm. Cadence is controlled by the O1-provisioned PerfMetricJob (granularityPeriod); the envelope carries per-cell PRB/throughput/HARQ counters, per-UE KPIs, and the RAN's configured neighbour relations.
  • Classify - every report is evaluated instantly: PRB load above prb_high_pct (default 80%) is RESOURCE_CONGESTION. High BLER outranks congestion: RF_INFLUENCED_LOAD and RF_DEGRADED are recognised and never actioned. A weighted multi-KPI engine can be selected instead of the rule engine.
  • Decide - relief targets must be declared neighbours of the congested cell, reporting fresh PM, and projected below target_max_load_pct (default 70%) including in-flight reservations. A cell without neighbour relations never hands over. Batch size scales with the load excess; the heaviest PRB consumers move first; a cooldown separates batches.
  • Actuate - each handover is one RESTCONF PATCH to the RAN through SDNR, gated by O1_HANDOVER_ENABLED. Failures release reservations pro rata.

Dashboard

Served at / from the same binary, behind a login. Pages:

  • Overview - live cells (NR Cell Identity, load, state), recent decisions with skip reasons, handover stats, PRB utilization trend (15m/1h/6h/7d).
  • Activity - live cell topology: serving cell and neighbourhood, UE distribution, and the handover stages animated when the rApp acts.
  • Notifications - neighbour events (NO_NEIGHBOURS/NEIGHBOURS_LISTED) and policy changes with the operator who applied them.
  • Handover history - every acted handover with its HO-<n> event id.
  • Settings - the live policy editor (see Runtime policy).

Accounts are bcrypt hashes in the chart values (webui.users); generate one with go run ./cmd/hashpw '<password>'. Sessions are server-side, 12 h, HttpOnly cookies; repeated failures lock the source IP for a minute.

Runtime policy

GET /api/policy returns the decision policy the engine is running right now; PUT /api/policy overlays, validates, and applies a new one to the live engine; the next PM report is evaluated with it, no restart. Runtime overrides revert to the deployed values on pod restart. Every change raises a notification naming the signed-in operator.

Persistence

Cell samples and handovers are written to InfluxDB (deployed alongside the rApp in the same R1 composition); GET /trend serves windowed mean/peak PRB load for the dashboard graph. Everything else (registry, decisions, sessions, runtime policy) is in-memory by design.

HTTP endpoints

Endpoint Auth Purpose
POST /pm open PM envelope ingest from the O1 adapter
GET /congestion session Cells, decisions, notifications, HO stats
GET /trend?range=15m|1h|6h|7d session Aggregated PRB load from InfluxDB
GET /api/policy / PUT session Runtime decision policy
POST /api/login / /api/logout / GET /api/me - Session management
GET /health /status /metrics open Liveness and service status
/r1/* open DME producer health and job callbacks

Deployment

Helm chart in deploy/helm/congestion (SDNR endpoint and credentials, node id, dashboard accounts, Influx wiring - all in values.yaml; secrets land in a Kubernetes Secret). deploy/helm/congestion-influxdb is the companion InfluxDB chart. Both are packaged into an rApp CSAR (scripts/create-csar.sh, rapp-package/) for onboarding through rApp Manager over R1. Fill in the xxx placeholders in both values.yaml files before packaging - the charts are baked into the CSAR at build time.

Key environment variables (all rendered by the chart, read once at startup):

Variable Meaning
RAPP_MODE ocudu (HTTP POST /pm) or osc (Kafka)
SDNR_ADDR SDNR_USER SDNR_PASSWORD NODE_ID SDNR RESTCONF target
O1_HANDOVER_ENABLED true sends handovers to the RAN; otherwise log-only
WEBUI_USERS name:bcrypt-hash pairs; empty disables the login
INFLUX_URL INFLUX_ORG INFLUX_BUCKET INFLUX_TOKEN PM persistence; empty URL disables
LOG_LEVEL / LOG_FORMAT LOG_FORMAT=json for machine-readable logs

Build & run

go build -o rapp ./cmd/rapp
RAPP_MODE=ocudu HTTP_PORT=8090 ./rapp                          # log-only
RAPP_MODE=ocudu HTTP_PORT=8090 O1_HANDOVER_ENABLED=true ./rapp # live handovers

Demonstrating the closed loop

  1. Feed PM from at least two neighbouring cells (each gNB's metrics stream through the O1 adapter to POST /pm) - the Activity topology shows every reporting cell with its live load ring and attached UEs.
  2. Attach UEs and drive traffic on one cell until its PRB load crosses the congestion threshold.
  3. Watch the rApp flag RESOURCE_CONGESTION, pick the neighbour under the target ceiling, and move the heaviest UEs - the topology animates the handover stages as they happen, Handover history records the HO-<n> events, and the trend graph shows the load draining.

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages