CDF Sender configuration
This document provides a sample configuration for a CDF Sender and describes all the parameters you can adjust to configure throughput.
Use this configuration to deploy a CDF Sender:
Configure rateLimit
CDRs are stored in a NATS stream called a Work Queue. The rateLimit parameter controls how quickly CDRs are consumed from the Work Queue and distributed across the available CGFs. Configure the CDF Sender rate limit according to the desired performance level.
Configure cdr_limit_per_cgf
The cdr_limit_per_cgf parameter defines the maximum number of processes that can send CDRs to a CGF simultaneously. For each allowed process, CDF Sender opens a socket and keeps one CDR in memory.
The default value is 1000. If your system cannot support 1,000 open sockets or has limited RAM, you can reduce this value to better fit your resource constraints.
The ratio between cdr_limit_per_cgf and the rate at which CDF Sender consumes CDRs from the Work Queue is calculated as:
This means that the longer it takes to receive a response back from a CGF, the higher the cdr_limit_per_cgf value should be. A higher limit allows more outstanding requests, helping maintain throughput despite network latency.
Configure CGFs
Each CGF receives an equal share of the load. Adding more CGFs increases overall throughput, as long as CDF Sender does not reach its performance limit.
Configure responseTimeout and retries
The responseTimeout parameter defines how long, in milliseconds, CDF Sender waits for a GTP Data Response. The default value is 1000.
If there is no response to a CDR within this time, it is retried based on the retries setting. If there’s still no response, the CGF is considered unavailable and won’t be used again until it replies to a GTP Echo.
To avoid triggering a retransmission for still-in-flight responses from the CGF, pick a responseTimeout value larger than 2 * RTT(cdf → cgf) + processing-duration(cgf).
However, setting the timeout too high can cause issues with GTP Prime sequence numbers, as the protocol is limited to 65,536 sequence numbers. For example, at 1000 CDRs per second, this limit is reached in about 65 seconds. A longer timeout increases the risk of sequence numbers wrapping and being reused, which makes it impossible to reliably match responses to their original CDRs. For more information, see the GTP Prime sequence number troubleshooting section.
Configure echo
The echo parameter defines the interval, in milliseconds, between sending GTP Prime Echo requests. According to the standard, this value cannot be shorter than 60 seconds.
Setting a high value for echo increases the time CDF Sender takes to establish communication with a CGF.
If communication with a CGF is lost, CDF Sender continues to send Echo requests. When a response is received, CDF Sender considers the connection re-established. While one or more CGFs are unresponsive, CDF Sender automatically reduces its throughput to match the capacity of the remaining active CGFs, and restores it once all CGFs respond to the echo request.
Configure poolSize
One way to scale CDF Sender performance is to increase the number of Work Queue connections (poolSize).
The default pool size is 8.
Each connection starts a new pull consumer — a client that requests messages on demand from a NATS stream. Adding more connections can increase overall throughput, but it won't help if the actual bottlenecks are high RTT per CGF or a low cdr_limit_per_cgf. Each additional connection increases CPU usage.
The maximum load on CGF is maintained, even when using multiple connections.
The table below shows the relation between CDF Sender pool size, CPU usage, and NATS ingress and egress throughput. The data was collected by running CDF Sender and CDF Receiver in a Kubernetes cluster.
After 6k ingress, the four load generators were restarted with 2000 rate per generator and not changed anymore.
CDF Receiver was always using pool size 8.
Configure resource consumption
For more information on how to configure resources for CDF Sender, read Recommended resource requirements.