How it Works
This section describes how this feature works.
At the startup, PCF registers its profile with the NRF endpoint of the highest priority. After the registration is complete, it periodically sends a heartbeat to the NRF along with its profile.
When PCF requires a service of another NF, it checks for the profile of that service in the cache. If PCF detects the NFProfile (profile), then it uses the information to consume the service. If the NFProfile is not found in the cache, PCF uses the configured NRF endpoints to discover the NF to which the service belongs. The information that is fetched by the discovery service is stored in the cache and reused until the validity period is met. If PCF does not find the NRF endpoint for discovery or receives an invalid response, it falls back on the local configuration looking for the required service.
After discovering the service from the NRF endpoint, PCF subscribes to the NRF for changes that happen in the NF profile. In response, a notification URI is called back for the event notification.
PCF updates the cache when NRF notifies it about the changes such as registration, deregistration, and modifications that happen in the NFPofile.
PCF periodically polls the NFProfile to determine the updated NF parameters. If it detects a modified parameter, PCF updates the configuration that is running. If PCF is registered to an NRF, then it sends a PATCH request to that NRF containing the details of the modified parameter in the payload. For example, [{"op":"replace","path":"/capacity","value":33}]
.
If PCF determines that it is not registered (or deregistered) to an NRF, then it does not start the NRF Update Request.
The endpoint selection of the NF and NRF endpoints for registration and discovery is based on the probabilistic load-balancing algorithm (IETF RFC 2782) that uses priority and capacity parameters. In addition, for the discovery service, the locality of the NF is used in the algorithm as:
-
The first set of NFs is from the preferred locality which are sorted based on the locality for priority or capacity in the profile and endpoint.
-
The second set of NFs is from the geo-server locality which are sorted among the locality for priority or capacity in the profile and endpoint.
-
The third set of NFs is from the discovered NFs. These NFs are not part of the first and second set.
-
The fourth set contains the locally configured NFs.
Note | Before PCF is shut down, it unregisters its profile and unsubscribes to the events that it has subscribed to. |