Skip to content

RELP Flooder for stresstesting and benchmarking RELP throughput

License

Notifications You must be signed in to change notification settings

teragrep/rlp_09

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

22 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

RELP Flooder library rlp_09

Simple but scalable RELP flooder library

Features

  • Simple to use

  • Scales to as many threads as wanted

  • Supports user-supplied record providers to make dynamic content

Limitations

  • Minimal failure tolerance, mostly meant for testing

  • Limited usability outside specific testing situations

  • Supports only one record per RELP batch

  • No TLS support yet

How to use

// Set all settings
RelpFlooderConfig relpFlooderConfig = new RelpFlooderConfig(target, port, record, threads);

// Alternatively use setters
RelpFlooderConfig relpFlooderConfig = new RelpFlooderConfig();
relpFlooderConfig.setTarget("127.0.0.1");
relpFlooderConfig.setPort(601);
relpFlooderConfig.setThreads(4);

// Provide config and Iterator<byte[]> provider to RelpFlooder, here is example implementation
ExampleRelpFlooderIteratorFactory exampleRelpFlooderIteratorFactory = new ExampleRelpFlooderIteratorFactory();
RelpFlooder relpFlooder = new RelpFlooder(relpFlooderConfig, exampleRelpFlooderIteratorFactory);
relpFlooder.start();
relpFlooder.stop();

// Get total records and bytes sent
LOGGER.info("Sent <{}> records", relpFlooder.getTotalRecordsSent());
LOGGER.info("Sent <{}> bytes", relpFlooder.getTotalBytesSent());

// Get total records and bytes sent per thread;
LOGGER.info("Sent <{}> records per thread", relpFlooder.getRecordsSentPerThread());
LOGGER.info("Sent <{}> bytes per thread", relpFlooder.getTotalBytesSentPerThread());

Example Iterator will send only static records like as

<14>1 2024-02-29T13:58:05.605Z localhost rlp_09 - - - Example rlo_09 event

Configurations

Configuration key Setter Default value Usage

target

setTarget(String target)

127.0.0.1

Sets RELP target

port

setPort(int port)

601

Sets RELP port

threads

setThreads(int threads)

1

Flooder thread count

Contributing

You can involve yourself with our project by opening an issue or submitting a pull request.

Contribution requirements:

  1. All changes must be accompanied by a new or changed test. If you think testing is not required in your pull request, include a sufficient explanation as why you think so.

  2. Security checks must pass

  3. Pull requests must align with the principles and values of extreme programming.

  4. Pull requests must follow the principles of Object Thinking and Elegant Objects (EO).

Read more in our Contributing Guideline.

Contributor License Agreement

Contributors must sign Teragrep Contributor License Agreement before a pull request is accepted to organization’s repositories.

You need to submit the CLA only once. After submitting the CLA you can contribute to all Teragrep’s repositories.