A method for applying or overriding preferred locality criteria in processing network function (NF) discovery requests, the method comprising:
- at an NF repository function (NRF) including at least one processor:
- maintaining an NF profiles database including NF profiles of producer NFs registered to provide service to other NFs;
- receiving, from an NF, an NFDiscover request including a preferred-locality attribute that has no meaning to the NRF in a network of the NRF because the preferred-locality attribute specifies a locality in a network other than the network of the NRF;
- accessing the NF profiles database to identify NF profiles of producer NFs capable of providing a service indicated by query parameters in the NFDiscover request;
- generating an NFDiscover response including the NF profiles identified as capable of providing the service indicated by the query parameters in the NFDiscover request, wherein the NF profiles includes a first NF profile of a first producer NF and having a first priority attribute value and a second NF profile of a second producer NF and having a second priority attribute value, the second priority attribute value being higher than the first priority attribute value;
- prioritizing the NF profiles in the NFDiscover response in a manner that overrides the preferred-locality attribute in the NFDiscover request, wherein prioritizing the NF profiles in the NFDiscover response in a manner that over-rides preferred-locality attribute includes changing at least one of the priority attribute values of the first and second NF profiles so that the second priority attribute value is lower than the first priority attribute value because the second producer NF is closer than the first producer NF to a locality indicated by a preferred-locality attribute selected by the NRF to override the NF profile in the NFDiscover request;
- and
- transmitting the NFDiscover response to the NF that transmitted the NFDiscover request.