-
Notifications
You must be signed in to change notification settings - Fork 0
How to run composer load testing as an example
git clone https://github.com/loadflux/loadflux.git
npm run install
the simple way is to put a .env
under the repo root, you can get it from LastPass shared folder, the note is composer-load-test
. Put these variables to .env
under the repo root.
Change the values of these env vars if you need, for example, you want to run against different environment or change OAuth client ID etc.
Change COMPOSER_USERS
in .env
file. This variable is to control how many users you'd like to simulate. It is suggested to set it to 20, and open multiple command lines to run the below command:
DEBUG=loadflux:* ts-node examples/main.ts
NOTE: I run 100 users (set COMPOSER_USERS to 100) in my laptop, so you can have a try, just in case you can hear the sound from the fan.
In the ./tools
folder, there are a Dockerfile
and a deployment.yaml
for K8s deployment.
You can control how many replicas are running. The environment variables can be put in deployment.yaml
in line or create a configMap. You decide it.
We have a Fargate cluster in AWS sandbox account. I built a docker image in dockerhub: chaoyangnz/loadflux-stuff-composer
. Devops can help run it in Fargate given you provide the image and environment variables.
Metrics and visualisation can be seen in the dashboard: https://data.loadflux.io/orgs/26b5fecda97dcd91/dashboards/04d9260254b70000
You have to login first. The user name and password can be found int LastPass shared folder, the secure note composer-load-test
.