Let’s get started.
Tell us what you’re working on, we’ll answer right away.
Category |
---|
Open source |
Berserker is a load generator open-source solution which is to tests the performance of a certain system and ensures whether such a system can support that kind of load. It is designed to be modular from the beginning as illustrated in the following diagram.
The rate generator controls the rate at which the load generator operates, the rate is expressed on a per-second basis, or better say, the number of impulses that will be generated within one second. Each time impulse is generated load generator fetches data from a data source and passes it to the worker. Since those are simple interfaces, it is easy to add additional modules implementing either data source, worker, and even rate generator. The following diagram represents possible modules for Load Generator of which some are already implemented.
Berserker is designed as a command-line tool, but having modular architecture makes it easy to use it as a Java library as well.
Berserker Commons holds an interface for core and configuration and it provides signature all the modules need to confront to be able to work together.
Berserker Core contains load generator implementation, and common implementations of data source, rate generator, and worker.
Berserker Runner represents a runnable jar where desired data source, rate generator, and work can be specified within the YAML configuration. The following section illustrates the YAML configuration example.
load-generator-configuration:
data-source-configuration-name: Ranger
rate-generator-configuration-name: default
worker-configuration-name: Cassandra
metrics-reporter-configuration-name: JMX
thread-count: 10
queue-capacity: 100000
data-source-configuration:
values:
id: uuid()
firstName: random(['Peter', 'Mike', 'Steven', 'Joshua', 'John', 'Brandon'])
lastName: random(['Smith', 'Johnson', 'Williams', 'Davis', 'Jackson', 'White', 'Lewis', 'Clark'])
age: random(20..45)
email: string('{}@domain.com', randomLengthString(5))
statement:
consistencyLevel: ONE
query: string("INSERT INTO person (id, first_name, last_name, age, email) VALUES ({}, '{}', '{}', {}, '{}');", $id, $firstName, $lastName, $age, $email)
output: $statement
rate-generator-configuration:
rates:
r: 1000
output: $r
worker-configuration:
connection-points: 0.0.0.0:32770
keyspace: my_keyspace
async: false
bootstrap-commands:
- "CREATE KEYSPACE IF NOT EXISTS my_keyspace WITH replication = {'class': 'SimpleStrategy', 'replication_factor': 1};"
- USE my_keyspace;
- CREATE TABLE IF NOT EXISTS person (id uuid, first_name text, last_name text, age int, email text, primary key (id));
metrics-reporter-configuration:
domain: berserker
filter:
The main part of the configuration is load-generator-configuration where concrete modules that will be used for the data source, rate generator, and worker need to be specified. After the load-generator-configuration section, there should be exactly one section for a data source, rate generator, and worker. Each section is allowed to contain module-specific configuration as configuration interpretation will be done by the module itself. For the berserker-runner to be able to find a particular module, each module jar must be in the classpath.
Tell us what you’re working on, we’ll answer right away.
Smart Slip
Ranger - contextual data generator