Destination selection for an offline charging system to avoid reversion
Systems, methods, and software that distribute accounting requests to a plurality of Charging Data Functions (CDFs). One embodiment comprises a distributor unit that connects to the CDFs, which register their queues with the distributor unit. When receiving an accounting request (e.g., interim or stop) for a session, the distributor unit extracts an identifier from the accounting request indicating a destination queue previously selected for the session. When the destination queue is not accepting new sessions or ongoing sessions, the distributor unit identifies a prioritized list for the session, identifies a position of the destination queue in the prioritized list, searches the prioritized list for an alternate queue having a lower priority than the destination queue, and having a status indicating that the alternate queue is accepting new sessions. The distributor unit then selects the alternate queue as an alternate destination queue for the session.
1. A system comprising:
a distributor unit configured to connect to a plurality of Charging Data Functions (CDFs) of an Offline Charging System (OFCS) through an interface, and to receive information from the CDFs for registering queues associated with the CDFs;
the distributor unit comprising a processor configured to receive an initial accounting request from a Charging Trigger Function (CTF) for a session through the interface, to generate a prioritized list of the queues for the session based on a distribution algorithm, to select a destination queue from the prioritized list for the session, and to transmit the initial accounting request to the destination queue through the interface;
the processor is configured to receive a subsequent accounting request from the CTF for the session through the interface, to extract a first identifier from a parameter of the subsequent accounting request indicating the destination queue previously selected for the session, and to determine a status of the destination queue;
when the status of the destination queue indicates that the destination queue is not accepting new sessions or ongoing sessions, the processor is configured to:
identify the prioritized list for the session;
identify a position of the destination queue in the prioritized list;
search the prioritized list for a first alternate queue having a lower priority than the destination queue, and having a status indicating that the first alternate queue is accepting new sessions;
select the first alternate queue as an alternate destination queue for the session; and
transmit the subsequent accounting request to the alternate destination queue through the interface.
2. The system of claim 1 wherein:
the subsequent accounting request comprises a Diameter Accounting Request (ACR); and
the processor is configured to extract the first identifier from a Destination-Host Attribute Value Pair (AVP) of the ACR indicating the destination queue.
3. The system of claim 1 wherein:
the processor is configured to receive an accounting answer for the subsequent accounting request from a CDF associated with the alternate destination queue through the interface, to add a second identifier for the alternate destination queue in a parameter of the accounting answer, and to transmit the accounting answer toward the CTF through the interface.
4. The system of claim 3 wherein:
the accounting answer comprises a Diameter Accounting Answer (ACA); and
the processor is configured to add the second identifier for the alternate destination queue to an Origin-Host Attribute Value Pair (AVP) of the ACA.
5. The system of claim 1 wherein:
when the processor fails to find the first alternate queue in the prioritized list having a lower priority than the destination queue, and having a status indicating that the first alternate queue is accepting new sessions, the processor is configured to search from a top of the prioritized list for a second alternate queue having a status indicating that the second alternate queue is accepting new sessions.
6. The system of claim 5 wherein:
when the processor fails to find the second alternate queue in the prioritized list having a status indicating that the second alternate queue is accepting new sessions, the processor is configured to determine that the OFCS is in an overload state.
7. The system of claim 1 wherein:
the distribution algorithm comprises a consistent hashing algorithm that generates the prioritized list of the queues based on a session identifier for the session, and names for the queues.
8. The system of claim 1 wherein:
the processor is configured to monitor the status of each of the queues; and
the status of each of the queues indicates one of the following: accepting new sessions and ongoing sessions, accepting ongoing sessions only, or not accepting new sessions or ongoing sessions.
9. The system of claim 1 wherein:
in response to the initial accounting request, the processor is configured to search the prioritized list for a candidate queue having a status indicating that the candidate queue is accepting new sessions, and to select the candidate queue as the destination queue for the session.
10. A method of distributing accounting requests for a session from a distributor unit to a plurality of Charging Data Functions (CDFs) of an Offline Charging System (OFCS), the method comprising:
receiving information in the distributor unit from the CDFs for registering queues associated with the CDFs;
receiving an initial accounting request in the distributor unit from a Charging Trigger Function (CTF) for a session;
generating, at the distributor unit, a prioritized list of the queues for the session based on a distribution algorithm;
selecting, at the distributor unit, a destination queue from the prioritized list for the session;
transmitting the initial accounting request from the distributor unit to the destination queue;
receiving a subsequent accounting request in the distributor unit from the CTF for the session;
extracting, at the distributor unit, a first identifier from a parameter of the subsequent accounting request indicating the destination queue previously selected for the session;
determining, at the distributor unit, a status of the destination queue;
when the status of the destination queue indicates that the destination queue is not accepting new sessions or ongoing sessions, the method includes:
identifying the prioritized list for the session;
identifying a position of the destination queue in the prioritized list;
searching the prioritized list for a first alternate queue having a lower priority than the destination queue, and having a status indicating that the first alternate queue is accepting new sessions;
selecting the first alternate queue as an alternate destination queue for the session; and
transmitting the subsequent accounting request from the distributor unit to the alternate destination queue.
11. The method of claim 10 wherein:
the subsequent accounting request comprises a Diameter Accounting Request (ACR); and
extracting the first identifier from the parameter of the subsequent accounting request comprises extracting the first identifier from a Destination-Host Attribute Value Pair (AVP) of the ACR indicating the destination queue.
12. The method of claim 10 further comprising:
receiving an accounting answer for the subsequent accounting request in the distributor unit from a CDF associated with the alternate destination queue;
adding, at the distributor unit, a second identifier for the alternate destination queue in a parameter of the accounting answer; and
transmitting the accounting answer from the distributor unit toward the CTF.
13. The method of claim 12 wherein:
the accounting answer comprises a Diameter Accounting Answer (ACA); and
adding the second identifier for the alternate destination queue in the parameter of the accounting answer comprises adding the second identifier for the alternate destination queue to an Origin-Host Attribute Value Pair (AVP) of the ACA.
14. The method of claim 10 wherein:
when the search fails to find the first alternate queue in the prioritized list having a lower priority than the destination queue, and having a status indicating that the first alternate queue is accepting new sessions, the method comprises:
searching from a top of the prioritized list for a second alternate queue having a status indicating that the second alternate queue is accepting new sessions.
15. The method of claim 14 wherein:
when the search fails to find the second alternate queue in the prioritized list having a status indicating that the second alternate queue is accepting new sessions, the method comprises:
determining, at the distributor unit, that the OFCS is in an overload state.
16. The method of claim 10 further comprising:
monitoring the status of each of the queues;
wherein the status of each of the queues indicates one of the following: accepting new sessions and ongoing sessions, accepting ongoing sessions only, or not accepting new sessions or ongoing sessions.
17. The method of claim 10 further comprising:
in response to the initial accounting request, the method comprises:
searching the prioritized list for a candidate queue having a status indicating that the candidate queue is accepting new sessions; and
selecting the candidate queue as the destination queue for the session.
18. A non-transitory computer readable medium embodying programmed instructions executed by a processor of a distributor unit that connects to a plurality of Charging Data Functions (CDFs) of an Offline Charging System (OFCS), wherein the instructions direct the processor to:
receive information from the CDFs for registering queues associated with the CDFs through an interface;
receive an initial accounting request from a Charging Trigger Function (CTF) for a session through the interface;
generate a prioritized list of the queues for the session based on a distribution algorithm;
select a destination queue from the prioritized list for the session;
transmit the initial accounting request to the destination queue through the interface;
receive a subsequent accounting request from the CTF for the session through the interface;
extract a first identifier from a parameter of the subsequent accounting request indicating the destination queue previously selected for the session;
determine a status of the destination queue;
when the status of the destination queue indicates that the destination queue is not accepting new sessions or ongoing sessions:
identify the prioritized list for the session;
identify a position of the destination queue in the prioritized list;
search the prioritized list for a first alternate queue having a lower priority than the destination queue, and having a status indicating that the first alternate queue is accepting new sessions;
select the first alternate queue as an alternate destination queue for the session; and
transmit the subsequent accounting request to the alternate destination queue through the interface.
19. The computer readable medium of claim 18 wherein:
when the search fails to find the first alternate queue in the prioritized list having a lower priority than the destination queue, and having a status indicating that the first alternate queue is accepting new sessions, the instructions direct the processor to:
search from a top of the prioritized list for a second alternate queue having a status indicating that the second alternate queue is accepting new sessions.
20. The computer readable medium of claim 19 wherein:
when the search fails to find the second alternate queue in the prioritized list having a status indicating that the second alternate queue is accepting new sessions, the instructions direct the processor to:
determine that the OFCS is in an overload state.