Berseker – load generator

Open source

What is it?

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.

Core Design

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

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

Berserker Core contains load generator implementation, and common implementations of data source, rate generator, and worker.

Berserker Runner

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.

  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

    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('{}', randomLengthString(5))
      consistencyLevel: ONE
      query: string("INSERT INTO person (id, first_name, last_name, age, email) VALUES ({}, '{}', '{}', {}, '{}');", $id, $firstName, $lastName, $age, $email)
  output: $statement

    r: 1000
  output: $r

  keyspace: my_keyspace
  async: false
    - "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));

  domain: berserker

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.

Let’s get started.

Tell us what you’re working on, we’ll answer right away.

Other success stories

See all stories→
Email sentiment analysis
User projects

Email sentiment analysis

Read post →
Churn of business customers
User projects

Churn of business customers

Read post →
FAQ chatbot with back-office
User projects

FAQ chatbot with back-office

Read post →
Search ranking for a large-scale job platform
User projects

Search ranking for a large-scale job platform

Read post →