CDF Receiver configuration
This document provides a sample configuration for a CDF Receiver and describes all the parameters you can adjust to configure throughput.
Use this configuration to deploy a CDF Receiver:
Note
If CDF Receiver is overloaded, it automatically declines new records to reliably process those already in progress. Frequent declines may indicate that you should add more CDF Receivers to improve performance. New records are also declined if it is not possible to save CDRs in the work queue.
Configure rateLimit
The rateLimit parameter configures the maximum number of ACRs received per second. The limit applies to the Rf interface. The default value is 1000.
When CDF Receiver gets more than the default value of simultaneously incoming ACRs, it answers Diameter with TOO_BUSY and does not write these ACRs to the disk.
These ACRs are lost unless SMC resends them.
TOO_BUSY means that new Diameter messages arrived before the previous ones were processed.
This happens to:
- Prevent CDF Receiver from becoming too slow to answer Diameter.
- Avoid having too many pending ACRs consuming RAM.
- Protect CDF Receiver from being out-of-memory killed.
Configure receiveBuffer
The receiveBuffer parameter configures the size (in bytes) of the socket receive buffer for Diameter Rf traffic coming from SMC. The default value equals the operating system settings.
If incoming charging requests (ACRs) arrive in bursts, setting a larger receive buffer allows the CDF Receiver to catch up if it temporarily falls behind. However, if the receive buffer is too small, ACRs may be dropped, leading to resends and reduced performance. The appropriate buffer size depends on the ACR sender configuration.
To calculate a suitable value, you need to know the size of the incoming ACR. For example, if the average packet size is 3000 bytes, and the incoming packet rate is 1000 per second, the incoming traffic amounts to 1000 * 3000 = 3000000 bytes/s. With a buffer size of 131072, this would only cover about 43 milliseconds of traffic — so adjusting the buffer accordingly is important for stable performance.
Most of the content of ACR messages is optional.
Configure sendBuffer
The sendBuffer parameter configures the size (in bytes) of the socket send buffer for Diameter Rf traffic towards SMC. The default value equals the operating system settings.
If the send buffer is too small, outgoing Accounting Answers (ACAs) may be lost, which triggers the resending of the corresponding ACRs and overall performance degradation.
For example, if the system needs to handle 1000 ACAs per second, and each ACA (including protocol overhead) occupies 300 bytes in the send buffer, the total traffic amounts to 300,000 bytes per second. With a buffer size of 131072 bytes, this would cover about 570 milliseconds of traffic.
Configure requestTimeout
CDRs are stored in a NATS stream that CDF Receiver calls a Work Queue. When CDF Receiver stores a CDR request in the Work Queue, it waits for a response for up to requestTimeout milliseconds before timing out. Reducing this timeout from the default value of 1000 milliseconds allows the CDF Receiver to return an error code in the ACA response to SMC more quickly. This helps to:
- Prevent too many pending ACRs from consuming memory.
- Protect CDF Receiver from running out of memory and being terminated.
For more information on how to configure NATS, read the Chart configuration and Recommended resource requirements documents.
Configure poolSize
Using a Work Queue pool size larger than the default 8 does not improve performance. Smaller pool sizes may slightly reduce performance, typically by no more than 10%.
Configure resource consumption
For more information on how to configure resources for CDF Receiver, read Recommended resource requirements.