facebookincubator / fbender

A load-testing command line tool for generic network protocols

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

FBender

Build Status codecov Go Report Card

FBender is a load testing command line tool for generic network protocols.

As a foundation for load testing lays the Pinterest Bender library. Similar to Bender, FBender provides two different approaches to load testing. The first, Throughput, gives the tester control over the throughput (QPS), but not over the concurrency. The second, Concurrency, gives the tester control over the concurrency, but not over the throughput. You can read more about that in the Bender documentation.

FBender has been designed to be easily extendable by additional protocols. Look at the guide on how to contribute new protocols.

Examples

In the first example we will be load testing a DNS server example.com running on the default port (53). We will perform 3 consecutive tests for each specified QPS (2000, 4000, 8000) each lasting for 1 minute. The queries will be generated based on the input file queries.txt. We will ignore requests output.

fbender dns throughput fixed \
  --target example.com --duration 1m \
  --input queries.txt -v error \
  2000 4000 8000

In the next example we will be load testing a TFTP server example.com running on the default port (69). We will perform 3 consecutive tests for each specified number of concurrent connections (10, 25, 50) each lasting for 1 minute. The queries will be generated based on the input file files.txt. We will ignore requests output.

fbender tftp concurrency fixed \
  --target example.com --duration 1m \
  --input files.txt -v error \
  10 25 50

The last example will focus on finding the SLA for a DHCPv6 server example.com. We want the timeouts not to exceed 5% of all requests in the measure window of 1 minute. To get the most accurate results we will be using exponential backoff growth starting at 20 QPS with a precision of 10 QPS. The queries will be generated based on the input file macs.txt. We will ignore requests output.

fbender dhcpv6 throughput constraints \
  --target example.com --duration 1m \
  --input macs.txt -v error \
  --constraints "AVG(errors) < 5" \
  --growth ^10 20

Building FBender

go get -u github.com/facebookincubator/fbender
go build github.com/facebookincubator/fbender

Installing FBender

go get -u github.com/facebookincubator/fbender
go install github.com/facebookincubator/fbender

You may want to add the following line to your .bashrc to enable autocompletion

source <(fbender complete bash)

Docs

License

FBender is BSD licensed, as found in the LICENSE file.

About

A load-testing command line tool for generic network protocols

License:Other


Languages

Language:Go 100.0%