Service Discovery Request Call Flow
This section describes the service discovery request call flow.

Step |
Description |
---|---|
1 |
The SMF sends an HTTP GET request to the resource URI "nf-instances" collection resource. The input filter criteria for the discovery request exists in query parameters. |
2a |
On success, "200 OK" is returned. The response body contains a validity period, during which the SMF caches the search result, and an array of NF profile object that satisfy the search filter criteria. For example, all NF instances displaying a certain NF Service name. |
2b |
If the SMF is not allowed to discover the NF services for the requested NF type provided in the query parameters, the NRF returns "403 Forbidden" response. If the discovery request fails at the NRF due to errors in the input data in the URI query parameters, the NRF returns "400 Bad Request" status code with the "ProblemDetails" IE providing details of the error. If the discovery request fails at the NRF due to NRF internal errors, the NRF returns "500 Internal Server Error" status code with the "ProblemDetails" IE providing details of the error. |
The NF profile objects that are returned in a successful result contains generic data of each NF instance, applicable to any NF type. These objects can also contain NF-specific data, for those NF instances belonging to a specific type (for example, the attribute "udrInfo" exists in the NF profile when the type of the NF instance takes the "UDR" value). In addition, the attribute "customInfo" exists in the NF profile for NF instances with custom NF types. For NF instances, the NRF returns the "customInfo" attribute, if available, as part of the NF profiles returned in the discovery response.
The SMF service communicates with different NFs, such as UDM, AMF, PCF, and CHF, when the session is active. The NF discovery is based on set of filters, also called query parameters, which are associated with the session. The SMF service discovers the NFs, matching the filter criteria for the session, to send messages to NF.
The SMF supports the following filters:
-
Dnn
-
Tai
-
TargetNfFqdn
-
TargetPlmnList
-
TargetNfInstanceId
-
Snssais
-
Preferred locality
The discovered NFs are cached with the filter as the key. The endpoint selection for sending the message is based on probabilistic load balancing algorithm (IETF RFC 2782) using the priority and capacity parameters. The NF discovery response carries a validity time, which decides the cache validity period.
SMF sends the messages to a target based on the Location header URL in response to initial messages sent to NF.
SMF supports stickiness wherein the endpoint, service instance, and NF instance details of the selected endpoint for a message that is sent, will be provided to the application or REST-EP so that the same can be specified in subsequent message (instead of discovery filter). This operation helps in maintaining stickiness for a session to the selected NF.