The O-RAN RIC is only as powerful as the applications running on it. xApps (on Near-RT RIC, 10ms-1s loop) and rApps (on Non-RT RIC, >1s loop) are containerized, third-party applications that implement AI/ML-based RAN optimization. They are the reason O-RAN exists — without them, the RIC is just an expensive empty platform. In this article, we explore the top use cases, the development lifecycle, ML model deployment, and the critical challenge of conflict resolution when multiple xApps try to control the same cell.

xApps
Near-RT (10ms-1s)
rApps
Non-RT (>1s)
8+
Key Use Cases
E2
RAN Interface

xApps vs rApps: Quick Reference

AspectxApp (Near-RT RIC)rApp (Non-RT RIC)
Control Loop10ms to 1 second>1 second (minutes to hours)
Interface to RANE2 (E2SM-KPM, E2SM-RC)A1 policies (via Near-RT RIC) or O1
Use CasesTraffic steering, HO optimization, QoS, interferenceCoverage optimization, energy saving, capacity planning, ML training
Data AccessReal-time KPIs from E2 nodesHistorical data from data lake + A1 enrichment
ML ModelsInference only (pre-trained models)Training + deployment of models to xApps
DeploymentContainerized (Kubernetes pod)Containerized (Kubernetes pod)
01

xApps vs rApps: When to Use Which

Timescale determines where your intelligence runs

The golden rule: if your decision needs to happen in <1 second, it is an xApp. If it can wait, it is an rApp. Traffic steering (move this UE NOW) = xApp. Coverage optimization (adjust tilts over the next hour) = rApp. Model training (retrain every night) = rApp. The Non-RT RIC trains models and sets policies; the Near-RT RIC executes them in real-time.

Near-RT RIC (10ms - 1s) TS xApp HO xApp QoS xApp Anomaly xApp E2 Interface O-DU / O-CU (RAN) Non-RT RIC (>1s) Coverage rApp Energy rApp ML Training Capacity rApp A1 Policies & ML Models
xApp vs rApp Timescale — Real-time control vs. strategic optimization
Hands-On TaskClassify the Use Case

xApp or rApp?

Quick Quiz
An application that retrains ML models nightly should run as:
AxApp on Near-RT RIC
BrApp on Non-RT RIC
CDirectly on O-DU
DOn the O-RU
Correct! Model training is a Non-RT task (minutes to hours). The trained model is then deployed to xApps via A1.
Model training runs on Non-RT RIC (rApp). Only inference runs on Near-RT RIC (xApp).
02

Use Case: Traffic Steering xApp

Move UEs between cells/carriers/slices in real-time

Traffic steering is the flagship xApp use case. The xApp monitors per-cell load (PRB utilization, active UEs, throughput) via E2SM-KPM, identifies congested cells, and sends handover/redirect commands via E2SM-RC to move UEs to less-loaded cells, carriers, or slices. Decision latency: 100-500ms. KPI impact: +15-25% cell-edge throughput, -30% congestion events.

1. Subscribe to Load KPIs

E2 Subscription: PRB.Used.DL.Avg, RRC.ConnMean, DL.THP per cell. Reporting period: 100ms. Covers 100-500 cells per xApp instance.

2. ML Decision

Model predicts: which UEs to move, to which target cell, at what time. Inputs: current load, predicted load (next 5min), UE RSRP to neighbors, UE QoS requirements.

3. E2 Control

Send E2SM-RC CONTROL message: handover specific UE to target cell. Or: change CIO to influence future handovers. Or: activate inter-frequency redirect.

4. Feedback Loop

Monitor KPIs after action. Did throughput improve? Did the target cell become congested? Adjust model weights. Continuous learning.

Near-RT RIC (xApp) Cell A 95% PRB UE UE UE Cell B 40% PRB E2 KPM E2 RC UE Handover xApp detects congestion on Cell A, steers UE to Cell B via E2SM-RC
Traffic Steering xApp — Real-time UE migration from congested to available cells
+25%
Edge Throughput
-30%
Congestion Events
100ms
Decision Latency
500
Cells Per Instance
Quick Quiz
Traffic steering xApp sends control actions via which E2 Service Model?
AE2SM-KPM
BE2SM-RC
CE2SM-NI
DA1 Policy
Correct! E2SM-RC (RAN Control) carries control actions. E2SM-KPM carries metrics.
Control actions use E2SM-RC. Metrics use E2SM-KPM.
03

Use Case: Handover Optimization xApp

AI-optimized A3 parameters per cell-pair

This xApp subscribes to handover KPIs (HO success/failure/ping-pong counts) via E2SM-KPM and adjusts per-cell-pair parameters (A3-Offset, TTT, CIO) via E2SM-RC. Unlike traditional SON MRO (fixed +/-1dB steps), the AI model optimizes multiple parameters simultaneously using reinforcement learning. Production results: HOSR 97% to 99.1%, ping-pong -62%.

Cell A Source Cell B Target Handover RL Agent Multi-param optimizer A3-Offset TTT CIO Hys Reward
HO Optimization xApp — Multi-parameter RL tuning per cell-pair
99.1%
HOSR Achieved
-62%
Ping-Pong
RL
Algorithm
Multi
Parameter
Quick Quiz
What advantage does an AI HO xApp have over traditional SON MRO?
AOptimizes multiple parameters simultaneously (A3-Offset + TTT + CIO)
BRuns faster
CUses less data
DDoes not need E2
Correct! SON MRO adjusts one parameter (CIO) at a time. AI optimizes A3-Offset, TTT, and CIO together.
AI HO xApp optimizes multiple parameters simultaneously via RL.
04

Use Case: QoS Management xApp

SLA-aware resource allocation per slice per cell

In a 5G network with multiple slices (eMBB, URLLC, mMTC), this xApp ensures each slice meets its SLA. It monitors per-slice KPIs (throughput, latency, packet loss) via E2SM-KPM and adjusts scheduling weights, PRB allocation, and admission control via E2SM-RC. When URLLC latency approaches the SLA threshold, the xApp can preempt eMBB resources to protect URLLC.

Total PRB Pool (95% utilized) eMBB 80 Mbps (SLA: 50) 60% PRBs allocated SLA OK (+30 Mbps headroom) URLLC 9ms (SLA: 10ms) 25% PRBs allocated NEAR BREACH (1ms margin) mMTC 99.5% (SLA: 99%) 15% PRBs allocated SLA OK PRB Preemption QoS xApp preempts eMBB resources to protect URLLC SLA
QoS xApp — Per-slice SLA monitoring and dynamic resource allocation
Hands-On TaskSlice Resource Conflict

URLLC latency is at 9ms (SLA = 10ms). eMBB throughput is at 80 Mbps (SLA = 50 Mbps). PRBs are 95% utilized. What should the QoS xApp do?

Quick Quiz
When should a QoS xApp preempt eMBB resources for URLLC?
ANever — slices are isolated
BWhen URLLC approaches SLA breach and eMBB has headroom above its SLA
CAlways — URLLC always has priority
DOnly during night hours
Correct! Preemption is justified when URLLC is at risk AND eMBB has headroom. The xApp checks both SLAs before acting.
Preempt when URLLC is near SLA breach AND eMBB has headroom above its minimum SLA.
05

Use Case: Anomaly Detection xApp

Sleeping cells, interference, and KPI degradation

This xApp uses autoencoders (trained by rApp on Non-RT RIC) to detect cells behaving abnormally: sleeping cells (low traffic, no alarms), sudden KPI degradation (HOSR drop, throughput collapse), interference patterns (periodic PIM, external). It receives per-cell KPIs via E2SM-KPM, calculates reconstruction error, and raises alerts when error exceeds threshold. Can also trigger automated recovery: cell restart, parameter reset, or neighbor compensation.

Autoencoder Reconstruction Error per Cell Threshold ANOMALY ANOMALY Cell Index Reconstruction Error Normal Anomaly (sleeping cell) Warning
Anomaly Detection xApp — Autoencoder reconstruction error per cell
89%
Detection Rate
AE
Autoencoder Model
0
Labels Required
Real-Time
Detection
Quick Quiz
Why are autoencoders preferred for sleeping cell detection?
ASleeping cells are rare and unlabeled; autoencoders only need normal data
BAutoencoders are faster
CSupervised models work better
D3GPP requires autoencoders
Correct! Sleeping cells produce no alarms and are hard to label. Autoencoders detect them by learning what "normal" looks like.
Autoencoders need only normal data for training; sleeping cells are too rare to label.
06

xApp Development Lifecycle

From idea to production: containerization, testing, deployment

An xApp is a Docker container deployed on the Near-RT RIC (Kubernetes). The development lifecycle: (1) Define use case and required KPIs, (2) Implement E2 subscription/control logic using the RIC SDK (C++/Python/Go), (3) Package as Docker image with xApp descriptor (JSON), (4) Test in RIC simulation environment (E2 simulator), (5) Deploy to staging RIC with shadow mode (read-only), (6) Production deployment with kill switch.

1. Develop

Use O-RAN SC RIC SDK (C++/Python). Implement E2 subscribe/indicate/control handlers. Define xApp descriptor (name, version, E2SM types, config).

2. Containerize

Package as Docker image. Include ML model files, config, and dependencies. Image size: typically 200-500MB.

3. Test

Deploy on RIC test environment with E2 simulator. Verify E2 subscriptions work, control actions execute correctly. Load test with 500+ simulated cells.

4. Deploy

Shadow mode first (observe only, no control). Then gradual rollout: 10 cells -> 100 cells -> full network. Kill switch: auto-disable if KPIs degrade >5%.

Code RIC SDK Docker Container RIC Test E2 Sim Shadow Observe Only 10 Cells Pilot Production Full Network + Kill Switch Deployment Pipeline Progress
xApp Development Pipeline — Code to production deployment
Hands-On TaskxApp Deployment Strategy

A new traffic steering xApp is ready. What is the safest deployment approach?

Quick Quiz
What is "shadow mode" in xApp deployment?
AxApp receives data and makes decisions but does NOT send control actions (observe only)
BxApp runs at night only
CxApp runs on a separate RIC instance
DxApp is hidden from monitoring
Correct! Shadow mode lets you validate xApp decisions against actual network outcomes before enabling control.
Shadow mode = observe only. The xApp processes data and logs decisions but does not send E2 control actions.
07

ML Model Lifecycle in O-RAN

Train on Non-RT RIC, deploy to xApp via A1, monitor drift

The ML lifecycle spans both RICs: (1) Data collection: Non-RT RIC aggregates historical KPIs from data lake, (2) Training: rApp trains model (XGBoost/LSTM/RL) on Non-RT RIC or external ML platform, (3) Validation: Test on held-out data + shadow mode validation, (4) Deployment: Push model to xApp via A1 interface (model package), (5) Monitoring: Track model accuracy over time, detect drift, trigger retraining when accuracy drops below threshold.

1. Data Lake Historical KPIs 2. Train Non-RT RIC (rApp) 3. A1 Deploy Model Package 4. Inference Near-RT RIC (xApp) 5. Monitor Drift Detection Drift Detected Retrain!
ML Lifecycle — Train (Non-RT) > Deploy via A1 > Inference (Near-RT) > Monitor > Retrain
Non-RT
Training
A1
Model Delivery
Near-RT
Inference
Drift
Detection
Quick Quiz
ML model drift means:
AModel accuracy degrades over time as network conditions change
BThe model moves to a different server
CThe model gets faster
DA new version is available
Correct! As the network evolves (new sites, traffic changes), the model trained on old data becomes less accurate. Drift detection triggers retraining.
Drift = model accuracy degrades because network conditions changed since training.
08

Conflict Resolution

What happens when two xApps want to change the same cell?

This is the hardest unsolved problem in O-RAN. Scenario: the Traffic Steering xApp wants to increase CIO on Cell A (push users to Cell B), but the HO Optimization xApp wants to decrease CIO (reduce ping-pong from Cell A to Cell B). Both send E2 CONTROL messages to the same cell. Who wins? Three approaches: (1) Priority-based: assign static priorities to xApps, (2) Conflict Manager: a dedicated component in the RIC that mediates, (3) A1 Policy constraints: Non-RT RIC sets boundaries that xApps cannot exceed.

Traffic Steering xApp Wants: CIO +3dB "Push UEs to Cell B" HO Optimization xApp Wants: CIO -1dB "Reduce ping-pong" Conflict Manager Evaluates KPI impact of both requests Decision: CIO +1dB (Pareto optimal) A1 Policy: CIO range [-2dB, +4dB] Policy Boundary
Conflict Resolution — Two xApps competing for the same cell parameter
Hands-On TaskResolve the xApp Conflict

Traffic Steering wants CIO +3dB. HO Optimization wants CIO -1dB. Same cell. How to resolve?

Quick Quiz
What is the recommended approach for xApp conflict resolution in O-RAN?
ALet all xApps execute freely (no coordination)
BOnly allow one xApp per RIC
CConflict Manager + A1 Policy boundaries from Non-RT RIC
DLet the operator manually approve each action
Correct! The Conflict Manager mediates between xApps, and A1 policies from Non-RT RIC set the boundaries within which xApps must operate.
Best approach: Conflict Manager in the RIC + A1 Policy boundaries set by Non-RT RIC.

Final Assessment

10 questions on O-RAN xApps & rApps

1. xApps run on which RIC?
ANear-RT RIC
BNon-RT RIC
CBoth
DO-DU
Correct!
xApps = Near-RT RIC.
2. rApps handle which timescale?
A10ms-1s
B>1 second (minutes to hours)
C<1ms
DExactly 1s
Correct!
rApps: >1 second timescale.
3. Traffic steering xApp uses E2SM-RC for:
ASending handover/redirect commands to RAN
BCollecting KPIs
CTraining models
DManaging cloud infra
Correct!
E2SM-RC = control actions (handover, redirect).
4. Shadow mode means:
AObserve only, no control actions sent
BNight-time operation
CHidden from monitoring
DBackup mode
Correct!
Shadow mode = observe and log decisions without sending control.
5. ML models are delivered from Non-RT to Near-RT RIC via:
AA1 interface
BE2
CO1
DOpen Fronthaul
Correct!
A1 delivers policies and models.
6. Model drift triggers:
ARetraining on updated data
BDeleting the model
CNothing (drift is normal)
DSwitching to SON
Correct!
Drift detection triggers retraining.
7. QoS xApp preempts eMBB for URLLC when:
AURLLC near SLA breach AND eMBB has headroom
BAlways
CNever
DOnly at night
Correct!
Preempt only when URLLC is at risk AND eMBB has headroom.
8. xApp conflict resolution best practice:
AConflict Manager + A1 Policy boundaries
BLet xApps fight it out
COnly one xApp allowed
DManual operator approval
Correct!
Conflict Manager + A1 boundaries.
9. Anomaly detection xApp uses which model type?
AAutoencoder (unsupervised)
BXGBoost (supervised)
CK-Means (clustering)
DARIMA (time-series)
Correct!
Autoencoder for anomaly detection (unsupervised).
10. xApps are packaged as:
ADocker containers on Kubernetes
BBare-metal binaries
CVM images
DFPGA firmware
Correct!
xApps are Docker containers deployed on Kubernetes.

Master O-RAN Development

Build xApps and deploy AI on the RIC

Browse All Courses
AK
Abhijeet Kumar
Telecom AI Researcher · CafeTele

Comments