Octet

Compare NETCONF, RESTCONF and gNMI. When would you pick each?

Show the answer

Say this first

All three carry YANG-modeled data. NETCONF uses SSH on port 830 and XML, and has the strongest transactions: candidate datastore, lock, validate and confirmed commit. RESTCONF uses HTTPS with JSON or XML and REST methods, so it is the easiest to call from any tool, but each request is its own transaction. gNMI uses gRPC over HTTP/2 with protobuf, has an atomic Set, and its Subscribe RPC is the standard for streaming telemetry. I pick NETCONF for safe config changes, RESTCONF for quick integrations, gNMI for telemetry.

Go deeper

Side by side

NETCONFRESTCONFgNMI
StandardIETF, RFC 6241IETF, RFC 8040OpenConfig specification
TransportSSH, TCP 830 (TLS optional)HTTPS, usually 443gRPC over HTTP/2 with TLS; port varies by platform, IANA lists 9339
EncodingXMLJSON or XMLProtobuf messages; values as JSON, JSON_IETF, proto, bytes or ASCII
Operationsget, get-config, edit-config, lock, commit, validateGET, POST, PUT, PATCH, DELETECapabilities, Get, Set, Subscribe
TransactionsCandidate, commit, confirmed commit, rollback-on-errorOne request = one changeOne SetRequest is applied all or nothing
StreamingNotifications (RFC 5277), YANG-Push subscriptionsEvent streams over server-sent events, rarely usedSubscribe: stream, poll, once
Typical modelsIETF, nativeIETF, nativeOpenConfig mostly
Feels likeA config databaseA web APIA telemetry and config bus

How I choose

  • Risky config changes on many devices: NETCONF with candidate and confirmed commit, where supported.
  • A quick integration, a webhook, a ServiceNow action: RESTCONF, because every language and tool can do HTTPS and JSON.
  • Monitoring at scale: gNMI Subscribe, often with OpenConfig paths across vendors.
  • Platform reality: use what the device does well. Some platforms are strongest on one interface.

Traps

  • Saying RESTCONF is "NETCONF over HTTP" with the same transaction model. It has no candidate, lock or confirmed commit.
  • Calling gNMI an IETF standard. It is defined by OpenConfig.