What is SONiC?
SONiC (Software for Open Networking in the Cloud) is an open-source, Linux-based Network Operating System backed by most of the key network players in today's world. It runs on a wide variety of switches and ASICs — almost 70% of all hardware platforms — from vendors including Arista, Barefoot, Dell, Mellanox, and Juniper Networks.
The hardware flexibility is enabled by the Switch Abstraction Layer (SAI), which guarantees the OS works across multiple vendor switch platforms. SONiC is actively deployed by telcos, large enterprises, and hyperscalers like Tencent and Alibaba — and it powers Microsoft Azure.
SONiC falls under the Open Compute Project umbrella, where organizations like Google, Intel, IBM, Dell, and Nokia share data-center designs and best practices.
lighty.io & SONiC Integration
SONiC offers both RESTCONF and gNMI for programmatic configuration. We ran a series of benchmarks to compare their performance using lighty.io's southbound plugins.
Testbed: Intel i7-6820HQ 2.70 GHz (2 Cores) · 11.21 GB RAM · Ubuntu 18.04.1
RESTCONF — Multiple Sessions
| # Requests | Avg Speed (MB/s) | Data (MB) | Duration (s) | ACL/s |
|---|---|---|---|---|
| 1,000 | 0.79 | 17.45 | 21.9 | 45.71 |
| 10,000 | 0.55 | 175.06 | 318.1 | 31.51 |
| 50,000 | 0.22 | 911.39 | 4,119.2 | 12.14 |
RESTCONF — Single Session
| # Requests | Avg Speed (MB/s) | Data (MB) | Duration (s) | ACL/s |
|---|---|---|---|---|
| 1,000 | 0.87 | 14.2 | 45.39 | 63.88 |
| 10,000 | 0.52 | 135.6 | 261.75 | 38.26 |
gNMI — Multiple Sessions
| # Requests | Avg Speed (MB/s) | Data (MB) | Duration (s) | ACL/s |
|---|---|---|---|---|
| 1,000 | 0.48 | 21.70 | 45.39 | 22.10 |
| 10,000 | 0.39 | 219.77 | 566.35 | 17.66 |
gNMI — Single Session (Recommended)
| # Requests | Avg Speed (MB/s) | Data (MB) | Duration (s) | ACL/s |
|---|---|---|---|---|
| 1,000 | 1.35 | 14.56 | 10.82 | 92.56 |
| 10,000 | 0.68 | 143.15 | 211.84 | 47.21 |
Key Findings
Our tests identified that SONiC's Telemetry module processes requests via gNMI faster than the MGMT-Framework using REST. While REST processed approximately 65 requests per second, gNMI managed approximately 90 requests per second in a single-session configuration.
The critical takeaway is that session management matters: a single persistent gNMI session dramatically outperforms creating a new session per request, regardless of protocol.
Updated gNMI Southbound Plugin
- SSL Certificates for developers (custom SONiC build mode)
- OpenConfig validated YANG models
- Model-driven assisting classes for request creation
- Improved gNMI answer translation into Java objects
You can now use lighty.io for both SONiC configuration and telemetry. For a commercial lighty.io solution, contact us.