|
| 1 | + |
| 2 | +## Overview |
| 3 | + |
| 4 | +When benchmarking a Pub/Sub Systems, we specifically require two distinct roles ( publishers and subscribers ) as benchmark participants - this repo contains code to mimic the subscriber workload on Redis Pub/Sub. |
| 5 | + |
| 6 | +Several aspects can dictate the overall system performance, like the: |
| 7 | +- Payload size (controlled on publisher) |
| 8 | +- Number of Pub/Sub channels (controlled on publisher) |
| 9 | +- Total message traffic per channel (controlled on publisher) |
| 10 | +- Number of subscribers per channel (controlled on subscriber) |
| 11 | +- Subscriber distribution per shard and channel (controlled on subscriber) |
| 12 | + |
| 13 | +## Installation |
| 14 | + |
| 15 | +The easiest way to get and install the Subscriber Go program is to use |
| 16 | +`go get` and then `go install`: |
| 17 | +```bash |
| 18 | +# Fetch this repo |
| 19 | +go get github.com/filipecosta90/pubsub-sub-bench |
| 20 | +cd $GOPATH/src/github.com/filipecosta90/pubsub-sub-bench |
| 21 | +go get ./... |
| 22 | +go build . |
| 23 | +``` |
| 24 | + |
| 25 | +## Usage of pubsub-sub-bench |
| 26 | + |
| 27 | +``` |
| 28 | +Usage of pubsub-sub-bench: |
| 29 | + -channel-maximum int |
| 30 | + channel ID maximum value ( each channel has a dedicated thread ). (default 100) |
| 31 | + -channel-minimum int |
| 32 | + channel ID minimum value ( each channel has a dedicated thread ). (default 1) |
| 33 | + -client-output-buffer-limit-pubsub string |
| 34 | + Specify client output buffer limits for clients subscribed to at least one pubsub channel or pattern. If the value specified is different that the one present on the DB, this setting will apply. |
| 35 | + -client-update-tick int |
| 36 | + client update tick. (default 1) |
| 37 | + -host string |
| 38 | + redis host. (default "127.0.0.1") |
| 39 | + -json-out-file string |
| 40 | + Name of json output file, if not set, will not print to json. |
| 41 | + -messages int |
| 42 | + Number of total messages per subscriber per channel. |
| 43 | + -oss-cluster-api-distribute-subscribers |
| 44 | + read cluster slots and distribute subscribers among them. |
| 45 | + -port string |
| 46 | + redis port. (default "6379") |
| 47 | + -print-messages |
| 48 | + print messages. |
| 49 | + -subscriber-prefix string |
| 50 | + prefix for subscribing to channel, used in conjunction with key-minimum and key-maximum. (default "channel-") |
| 51 | + -subscribers-per-channel int |
| 52 | + number of subscribers per channel. (default 1) |
| 53 | + -subscribers-placement-per-channel string |
| 54 | + (dense,sparse) dense - Place all subscribers to channel in a specific shard. sparse- spread the subscribers across as many shards possible, in a round-robin manner. (default "dense") |
| 55 | + -test-time int |
| 56 | + Number of seconds to run the test, after receiving the first message. |
| 57 | +``` |
0 commit comments