Skip to main content

OmniNRF Operations

1. Component Overview

OmniNRF is the Network Repository Function (NRF) for the Omnitouch 5G core. It provides centralised NF registration, discovery, and status-change notification services to all other NFs in the 5GC. All NF instances register with the NRF on startup and maintain liveness via periodic heartbeats. Consumers query the NRF to resolve NF endpoints before issuing SBI calls.

2. 3GPP Role and Spec References

AspectReference
NRF functional definitionTS 23.501 Section 6.2.6
Nnrf_NFManagement serviceTS 29.510 Section 5.2
Nnrf_NFDiscovery serviceTS 29.510 Section 5.3
NFProfile data modelTS 29.510 Section 6.1
NF status notificationTS 29.510 Section 5.2.2.8
Heartbeat procedureTS 29.510 Section 5.2.2.4
SearchResult data modelTS 29.510 Section 6.2

OmniNRF implements the SBI producer role for Nnrf_NFManagement and Nnrf_NFDiscovery as defined in TS 29.510.

3. SBI Endpoints

All endpoints are HTTP/1.1 with Content-Type: application/json.

Nnrf_NFManagement (TS 29.510 Section 5.2)

MethodPathDescriptionSuccess
PUT/nnrf-nfm/v1/nf-instances/{nfInstanceId}Register or re-register an NF201 Created / 200 OK
PATCH/nnrf-nfm/v1/nf-instances/{nfInstanceId}Heartbeat (empty body) or JSON Patch update204 No Content / 200 OK
DELETE/nnrf-nfm/v1/nf-instances/{nfInstanceId}Deregister NF204 No Content
GET/nnrf-nfm/v1/nf-instances/{nfInstanceId}Retrieve NF profile200 OK
GET/nnrf-nfm/v1/nf-instancesList all NF instances200 OK
POST/nnrf-nfm/v1/subscriptionsSubscribe to NF status notifications201 Created
DELETE/nnrf-nfm/v1/subscriptions/{subscriptionId}Unsubscribe204 No Content

Nnrf_NFDiscovery (TS 29.510 Section 5.3)

MethodPathDescriptionSuccess
GET/nnrf-disc/v1/nf-instancesDiscover NF instances by type and filters200 OK

Discovery Query Parameters

ParameterRequiredDescription
target-nf-typeYesNF type being searched for (e.g. UDM, SMF)
requester-nf-typeYesNF type making the request (e.g. AMF)
service-namesNoComma-separated list of service names to filter by
plmn-idNoJSON-encoded PLMN ID, e.g. {"mcc":"999","mnc":"70"}
limitNoMaximum number of results to return

4. Configuration Reference

OmniNRF is configured via Elixir application environment under the :omninrf key. In a release, these values are typically set in config/runtime.exs or via environment variables.

Example Configuration

config :omninrf,
sbi_scheme: "http",
sbi_addr: "127.0.0.10",
sbi_port: 7777,
mcc: "999",
mnc: "70",
heartbeat_timeout: 30_000,
cleanup_interval: 10_000,
plmn_list: [%{mcc: "999", mnc: "70"}]

Parameter Table

ParameterTypeDefaultDescription
sbi_schemestring"http"URI scheme for the SBI listener (http or https)
sbi_addrstring"127.0.0.10"IP address the SBI HTTP server binds to
sbi_portinteger7777TCP port the SBI HTTP server listens on
mccstring"999"Mobile Country Code for the served PLMN
mncstring"70"Mobile Network Code for the served PLMN
heartbeat_timeoutinteger (ms)30000Time after the last heartbeat before an NF instance is considered stale and removed. The NRF also uses this value to set heartBeatTimer in the NFProfile if the registering NF does not supply one
cleanup_intervalinteger (ms)10000How often the stale-registration cleanup job runs
plmn_listlist of maps[%{mcc: mcc, mnc: mnc}]List of PLMNs served by this NRF, used for PLMN filtering in discovery

5. Key Procedures

5.1 NF Registration and Heartbeat

After a stale NF is removed, the NRF sends a NF_DEREGISTERED notification to all matching subscribers.

5.2 NF Discovery

The returned validityPeriod is hardcoded to 3600 seconds (see NRF-L5 in Known Limitations).

5.3 NF Status Subscriptions

Notifications are fire-and-forget (no retry on delivery failure). Subscriptions can be filtered by subscrCond.nfType.

5.4 NF Deregistration

6. Prometheus Metrics

NRF Metrics

MetricTypeTagsDescription
omni_nrf.nf.registered.countgaugenf_typeNumber of registered NF instances by type
omni_nrf.discovery.requests.countcounter--Discovery request count
omni_nrf.registration.requests.countcounter--Registration request count
omni_nrf.nf_registrations.totalcounternf_typeTotal NF registrations
omni_nrf.nf_deregistrations.totalcounternf_typeTotal NF deregistrations
omni_nrf.discovery_requests.totalcountertarget_nf_typeTotal NF discovery requests by target type
omni_nrf.heartbeats.totalcounternf_typeTotal NF heartbeat requests
omni_nrf.active_nf_instances.countgaugenf_typeNumber of active NF instances by type

BEAM VM Metrics

MetricTypeDescription
beam.memory.totalgaugeTotal BEAM memory in bytes
beam.memory.processesgaugeMemory used by Erlang processes
beam.memory.processes_usedgaugeMemory actually used by processes
beam.memory.systemgaugeSystem memory
beam.memory.atomgaugeTotal atom memory
beam.memory.atom_usedgaugeUsed atom memory
beam.memory.binarygaugeBinary memory
beam.memory.codegaugeCode memory
beam.memory.etsgaugeETS table memory
beam.processes.countgaugeNumber of Erlang processes
beam.ports.countgaugeNumber of Erlang ports
beam.atom.countgaugeNumber of atoms
beam.vm.uptimegaugeVM uptime in seconds

7. Known Limitations

These limitations reflect the current implementation state and represent gaps against the full TS 29.510 specification.

IDAreaDescription
NRF-C2Discovery filtersDiscovery supports only target-nf-type, requester-nf-type, service-names, plmn-id, and limit. Filters for snssai, dnn, tai, guami, preferred-collocated-nf-types, and others defined in TS 29.510 Section 6.2.3.2.3.1 are not implemented
NRF-H2Notification bodyStatus change notifications are missing the full NfProfile object and subscriptionId field in the body per TS 29.510 Section 5.2.2.8
NRF-H3Subscription expirySubscriptions have no validityTime or reqPeriodicRegTimer enforcement. Subscriptions never expire
NRF-H4NFProfile validationOnly nfType is validated on registration. Fields such as nfInstanceId, nfStatus, PLMN lists, and capacity are not validated
NRF-H5Subscription PATCHThere is no PATCH /nnrf-nfm/v1/subscriptions/{subscriptionId} endpoint for updating an existing subscription
NRF-M1JSON PatchThe PATCH handler applies only flat-key operations (replace, add, remove). Nested JSON Pointer paths (e.g. /nfServices/0/serviceStatus) are not resolved correctly
NRF-M2Optimistic concurrencyETag / If-Match / If-None-Match conditional request handling is not implemented
NRF-M4Subscription GETThere is no GET /nnrf-nfm/v1/subscriptions/{subscriptionId} endpoint
NRF-L5Discovery validityPeriodvalidityPeriod in discovery responses is hardcoded to 3600 seconds rather than derived from NF profile data or NRF configuration
NRF-L6Discovery paginationNo Link header pagination or cursor-based iteration is supported for large discovery result sets

8. Troubleshooting

NF registration fails with 400 Bad Request

The request body is missing nfType. All NFProfile bodies must include at least nfType. Check the payload of the PUT request.

NF disappears from registry unexpectedly

The NF is not sending heartbeats frequently enough. The default heartbeat_timeout is 30 seconds. Ensure the registering NF sends a PATCH heartbeat at an interval shorter than this value. The NRF sets heartBeatTimer in the registration response to heartbeat_timeout / 1000 seconds as a hint.

Discovery returns an empty nfInstances list

  • Verify the NF is registered: GET /nnrf-nfm/v1/nf-instances/{id} must return a profile with nfStatus: "REGISTERED".
  • Check that target-nf-type exactly matches the nfType in the stored NFProfile (case-sensitive).
  • If plmn-id is specified, verify it is valid JSON and matches the plmnList in the NFProfile, or that the NFProfile has no plmnList (which causes it to match all PLMNs).

Status notifications are not received

  • Confirm nfStatusNotificationUri in the subscription body is reachable from the NRF host.
  • The notification delivery is fire-and-forget; check application logs for Failed to send status notification to warnings.
  • If subscrCond.nfType is set, the notification is only sent when an NF of that type changes status.

High registration churn or frequent stale cleanup log messages

Lower cleanup_interval and heartbeat_timeout if aggressive cleanup is desired, or raise heartbeat_timeout if NFs are being wrongly expired. Stale cleanup events are logged at info level with the message NRF: Expiring stale NF instance {id}.