Traffic Dynamics for Realistic Testing.
NATS messages and traffic rate
The application's traffic generation rate is primarily defined in the configuration file and is typically maintained throughout the test execution duration. However, this static approach may not accurately represent real-world traffic patterns. To address this, the application incorporates a mechanism for dynamically controlling the traffic level and transitioning between changes during runtime.
This functionality is enabled through integration with NATS messaging, allowing the application to receive data from a dedicated subscription channel. Upon receiving these messages, the application constructs a transition object containing the new desired traffic rate and the specified transition time. Once the message is processed, the traffic level is adjusted accordingly, seamlessly transitioning from the previous rate to the new one.
The NATS connection and subscription details are configured in the execution configuration file, and this feature is entirely optional. It provides flexibility for dynamic traffic control based on real-time requirements or test scenarios.