A method for locality and serving scope set based network function (NF) profile prioritization and message routing, the method comprising:
- at an NF including at least one processor:
- receiving a service based interface (SBI) request including a preferred locality attribute value or a servingScope attribute value;
- identifying an NF profile of a producer NF with an NF profile level locality attribute value that does not match the preferred locality attribute value in the SBI request or a servingScope attribute value that does not match the servingScope attribute value in the SBI request, wherein the NF profile includes a localitySet and a servingScopeSet, the localitySet is an NF profile attribute that is separate from the NF profile level locality attribute value, the servingScopeSet is an NF profile attribute separate from the NF profile level servingScope attribute value, the localitySet includes a plurality of locality attribute values and corresponding priority values, and the servingScopeSet includes a plurality of servingScope attribute values and corresponding priority values;
- when the SBI request includes a preferred locality attribute value that does not match the NF profile level locality attribute value and that matches one of the locality attribute values in the localitySet, setting an NF profile level priority of the NF profile based on the priority value specified for the matching locality attribute value in the localitySet;
- and
- when the SBI request includes a servingScope attribute value that does not match the NF profile level servingScope attribute value and that matches one of the servingScope attribute values in the servingScopeSet, setting the NF profile level priority of the NF profile based on the priority of the matching servingScope attribute value in the servingScopeSet.