Skip to content

v3.3 Multiuser Load Case

Andrey Kurilov edited this page Mar 26, 2017 · 2 revisions

Introduction

The multiuser load case is a specific extension of more general Configuration Parameterization(v3.3 Configuration#Parametrization) feature. Please read it to understand the configuration patterns used below.

Let's realize the case when someone needs to perform a load using many (hundreds, thousands) destination paths (S3 buckets, Swift containers, filesystem directories, etc) using many different credentials.

Approach

Example scenario:

{
	"type" : "load",
	"config" : {
		"item" : {
			"data" : {
				"size" : "10KB"
			},
			"output" : {
				"file" : "objects.csv",
				"path" : "bucket-%d(314159265){00}[0-99]"
			}
		},
		"storage" : {
			"auth" : {
				"file" : "credentials.csv",
				"uid" : "user-%d(314159265){00}[0-99]"
			},
			"driver" : {
				"concurrency" : 10,
				"type" : "s3"
			}
		},
		"test" : {
			"step" : {
				"limit" : {
					"count" : 10000
				}
			}
		}
	}
}

Note that:

  • Missing buckets will should be created on demand.
  • The seed value "314159265" should be used to init the internal PRNG to align the bucket names with user ids (The same "XY" value for each pair of "bucket-XY" and "user-XY" supplied).

In this case, the file "credentials.csv" should be prepared manually. Example contents:

user-00,secret-00
user-01,secret-01
user-02,secret-02
...
user-99,secret-99

(in the real world it is expected that the storage users with the listed names and secret keys are already existing)

To make such example file you may use the following 2 commands:

for i in $(seq 0 9); do echo "user-0$i,secret-0$i" >> credentials.csv; done;
for i in $(seq 10 99); do echo "user-$i,secret-$i" >> credentials.csv; done
Clone this wiki locally