x-files-rate

command module
v0.0.0-...-ce31e01 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 10, 2020 License: Unlicense Imports: 11 Imported by: 0

README

x-files-rate

An example program for the blog post The X-Files: Controlling Throughput with rate.Limiter, demonstrating various techniques for rate limiting an HTTP service via middleware.

Use

Bootstrap
go get github.com/rodaine/x-files-rate
Run

Each rate-limiting middleware can be tested with ever-increasing RPS via vegeta using a customized vegeta test harness. The target names for the middleware can be found in middleware.go. Results are printed to stdout and also stored in ./results/{{target}}.csv.

./run.sh        # defaults to no rate-limiter
./run.sh ticker # targets the "ticker" middleware 
Plot

The output CSV can be converted to SVG graphs using gnuplot. The SVG files are persisted in ./results/plots/{{target}}.svg.

./plot.sh ticker

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL