惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

博客园 - 三生石上(FineUI控件)
N
Netflix TechBlog - Medium
F
Full Disclosure
I
InfoQ
Jina AI
Jina AI
GbyAI
GbyAI
P
Proofpoint News Feed
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
V
V2EX
腾讯CDC
博客园 - 司徒正美
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
Last Week in AI
Last Week in AI
宝玉的分享
宝玉的分享
人人都是产品经理
人人都是产品经理
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
Apple Machine Learning Research
Apple Machine Learning Research
F
Fortinet All Blogs
B
Blog
A
About on SuperTechFans
博客园 - Franky
酷 壳 – CoolShell
酷 壳 – CoolShell
Engineering at Meta
Engineering at Meta
C
Check Point Blog
J
Java Code Geeks
L
LangChain Blog
WordPress大学
WordPress大学
Stack Overflow Blog
Stack Overflow Blog
Martin Fowler
Martin Fowler
爱范儿
爱范儿
Recorded Future
Recorded Future
小众软件
小众软件
Microsoft Security Blog
Microsoft Security Blog
Blog — PlanetScale
Blog — PlanetScale
The Register - Security
The Register - Security
IT之家
IT之家
博客园 - 聂微东
量子位
G
Google Developers Blog
Vercel News
Vercel News
B
Blog RSS Feed
阮一峰的网络日志
阮一峰的网络日志
D
Docker
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
Google DeepMind News
Google DeepMind News
MyScale Blog
MyScale Blog
罗磊的独立博客
Y
Y Combinator Blog
The GitHub Blog
The GitHub Blog
H
Hackread – Cybersecurity News, Data Breaches, AI and More

kmcd.dev

Exploring Protocol Buffers Interactively Introducing ProtoDocs Ghost in the Shell: The Manga Behind the Anime The Hidden Cost of google.protobuf.Value Why Networking Built Its Own Data Modeling Language Zero-Friction Demos with WASM Let's Learn About BGP ConnectRPC: Where is it now? Building APIs with Contracts The Case for Greppable Code Unknown Fields in Protobuf IRC Log: Reactionary Faking protobuf data in Go Y'all are Sleeping on Mise-en-Place IRC Log: Standup 2 HTTP/2 From Scratch: Part 4 IRC Log: rm -rf /var/opt/gitlab/postgresql/data HTTP/2 From Scratch: Part 3 Building a Live BGP Map HTTP/2 From Scratch: Part 2 IRC Log: The Cloud Scale Incident Visualizing the Internet (2026) Shell Log: Namaste HTTP/2 From Scratch: Part 1 IRC Log: Standup HTTP/1.1 From Scratch WHOIS is dead, long live RDAP Months Considered Harmful Encryption vs. Compression On Creating My Own Cover Art Traceroute Tool from Scratch in Go My Favorite Interview Question From JSON to Protobuf Breaking gRPC Morse Code Can You Hack a Phone with Your Voice? Visualizing the Internet (2025) HTTP QUERY and Go I made a daily word game Protovalidate: Can Input Validation Be This Easy? Behold! The Barcode Scanner Mixing CEL and Protobuf for Fun FauxRPC and Protovalidate The Call of the Monolithic Codebase FauxRPC + Test Containers Self-Documenting Connect Services gRPC Over HTTP/3: Followup JSON to Protobuf Conversion gRPC: The Ugly Parts Working with Protobuf in 2024 Introducing FauxRPC HTTP/1.0 From Scratch Y'all are sleeping on HTTP/3 HTTP/0.9 From Scratch What version of HTTP are you using? Texans in Denmark gRPC Over HTTP/3 gRPC: The Good Parts Leaving Texas for Greener Pastures gRPC: The Bad Parts Unit Testing ConnectRPC Servers Daily Prompts Adding chart.js to Hugo Why I'm Rebranding Benchmarking gRPC (golang) Blog Update gRPC From Scratch: Part 3 - Protobuf Encoding Tracking the Wins Visualizing the Internet (2024) Dropping Unknown Fields in ConnectRPC RESTless: Web APIs After REST Introducing unknownconnect-go Making gRPC more approachable with ConnectRPC Inspecting Protobuf Messages Introducing protoc-gen-connect-openapi gRPC From Scratch: Part 2 - Server gRPC From Scratch: Part 1 - Client The Rollercoaster of Productivity in Side Projects Lessons from a Decades-Long Project How I learned to code Economists with (virtual) Guns Visualizing the Internet (2023) softlayer-python: language bindings/CLI for a cloud company SwFTP: SFTP/FTP Server For Openstack Swift Video: Morning Copenhagen Commute Goodbye Evepraisal Visualizing the spectrum of the sun (Part 2) Visualizing the Internet (2022) Evepraisal: A price estimation tool for Eve Online Visualizing the spectrum of the sun
Why you should use gNMI over SNMP in 2026
2023-11-04 · via kmcd.dev

Network engineers deal with a unique set of headaches when managing infrastructure. SNMP is over 30 years old, and most networks still depend on it today. We finally have a strong modern alternative and it is time to move on.

SNMP has been the standard for decades, but its flaws are hard to ignore now. It is clunky, inefficient, and simply does not scale in modern environments.

gNMI (gRPC Network Management Interface) solves these problems. It is cleaner, faster, and gives administrators much better control over what data they pull and how they receive it.

The protocol relies on three main operations:

  • Get: Pull data from a device.
  • Set: Change a configuration.
  • Subscribe: Get automated updates whenever data changes.

Why gNMI beats SNMP

The benefits come down to a few key architectural shifts.

  • Model-driven design: gNMI uses YANG to define data. This makes writing automation scripts much easier because you actually know what the data structure looks like without hunting through MIBs.
  • Truly bidirectional: You can use gNMI for both telemetry and configuration. This lets you handle everything from provisioning to troubleshooting with one tool.
  • Efficiency and scale: gNMI uses a streaming approach. It can handle high traffic volumes across massive networks without killing device performance.
  • Modern security: It is built on HTTP/2 and uses TLS to encrypt traffic by default. You get a secure management plane right out of the box.

Here is a quick look at how they stack up:

FeatureSNMPgNMI
TransportUDP (mostly)HTTP/2 (TCP)
Data FormatASN.1 (MIBs)Protocol Buffers (modeled with YANG/OpenConfig)
Speed30s to 5min intervalsNear real-time streaming
SecurityShared secrets (v2) / Complex USM (v3)Certificate-based Mutual TLS

Subscriptions: Stop Polling, Start Streaming

The “streaming” aspect is a massive upgrade. Because gNMI uses gRPC, it can hold a persistent connection where the device pushes updates to the client. SNMP has no suitable way to do this[1] . Instead, SNMP forces you into a repetitive request and response loop.

Look at a typical SNMP setup:

D2 Diagram

The client has to ask for the same data over and over, often getting the exact same answer. I am also sparing you the typical SNMP mess where you have to manually map index numbers to interface names. If an interface is “too fast,” you have to mess with ifHCInOctets values. With SNMP, you have to poll frequently to get resolution on the data.

Now look at a gNMI subscription:

D2 Diagram

You set the subscription once and the device sends updates only when the value changes. If nothing changes, the device stays quiet. This massive reduction in “chatter” lowers the load on your hardware and your network.

Architecture: How it actually works

Moving to gNMI means rethinking where your data goes. SNMP usually feeds into a monolithic Network Management System (NMS). gNMI typically flows into a Time Series Database (TSDB) like Prometheus or InfluxDB via a telemetry collector that translates the stream into metrics Prometheus can scrape.

The data itself is sent as binary using Protocol Buffers (Protobuf). This makes it incredibly efficient over the wire, but it does mean you cannot just read it in plain text with Wireshark unless you have the right dissectors configured.

A major architectural shift here is Dial-Out telemetry. With traditional Dial-In, your collector connects to every single device. With Dial-Out, the devices are configured to actively push data to a central destination. This simplifies firewall rules and bootstrapping, but it also shifts connection management and scaling complexity onto the devices themselves, especially in very large deployments.

What about NETCONF?

Since we are talking about YANG models, you might wonder why we are not just using NETCONF. Both have their place in modern networks.

NETCONF uses XML and is heavily focused on transactional configuration. It is fantastic when you need to apply a complex, multi-device configuration change and ensure it either fully succeeds or rolls back. However, XML is heavy. For high-speed telemetry and streaming state data, gNMI with its binary Protobuf format is far superior.

The Gotchas

I will admit gNMI is not a perfect solution. Advocacy is useless if we ignore the hurdles.

First, there is a CPU tax. gRPC and TLS encryption require more overhead on the network device than a simple UDP-based SNMP poll. Older hardware might actually struggle with this load.

Second, navigating OpenConfig models can be intimidating at first. While YANG is infinitely better than hunting through ancient MIBs, you still have to understand the “YANG tree” structure to know exactly what paths to subscribe to. The learning curve is definitely steeper.

Better Tooling and Open Standards

Despite the learning curve, the ecosystem is catching up fast. Tools like gNMIc provide a much better user experience than old school commands like snmpget. Plus, gNMI is an open standard. It is not locked to one vendor. Even when using vendor specific data models, they are almost always described in YANG, which makes documentation and automation much more predictable.

gNMI is the logical choice for most modern networks. I even suspect it is a great fit for smaller setups like homelabs, though I will save that for a later post. There is plenty more to dive into, including different subscription types like STREAM or ONCE, but those deserve their own deep dives. Thanks for reading.

Footnotes

  1. SNMP’s push mechanisms (traps/informs) are unreliable and not suited for structured telemetry.