Code Monkey home page Code Monkey logo

openshift-routers-load-test's Introduction

Openshift routers load testing

Two clusters needed, a target cluster that will be tested and one that will be used to generate the load

Create the routes

TLS routes will be used as they're the ones that generate more load in the servers. In the target cluster:

git clone https://github.com/rporres/http-ci-tests.git
cd http-ci-tests/content/quickstarts/nginx
for i in $(seq 0 24); do
  oc process -p IDENTIFIER=$i -f server-tls-edge.yaml | oc create -f -
  oc process -p IDENTIFIER=$i -f server-tls-reencrypt.yaml | oc create -f -
done

and create a routes.txt file:

oc get routes -o json | jq -r '.items[] | .spec["host"]' > routes.txt

Create the load testing cluster aws secret

It will hold the information to upload result files to S3

ACCESS_KEY_ID=xxxx
SECRET_ACCESS_KEY=xxxx
oc create secret generic aws-s3 \
    --from-literal=access_key_id=$ACCESS_KEY_ID
    --from-literal=secret_access_key=$SECRET_ACCESS_KEY

Create the load testing target configmaps

They will be used by mb to determine how to send requests to the target cluster

git clone https://github.com/rporres/mb-k8s.git
cd mb-k8s
./utils/build-request-json.sh -f targets.txt -k 1 -c 50 -d 0 -t > request-file-1ka-50c.json
oc create configmap --from-file=request-file-1ka-50c.json request-file-1ka-50c

./utils/build-request-json.sh -f targets.txt -k 10 -c 50 -d 0 -t > request-file-10ka-50c.json
oc create configmap --from-file=request-file-10ka-50c.json request-file-10ka-50c

./utils/build-request-json.sh -f targets.txt -k 100 -c 50 -d 0 -t > request-file-100ka-50c.json
oc create configmap --from-file=request-file-100ka-50c.json request-file-100ka-50c

We don't use more than 50 clients per load server to avoid congestion that could affect in any way to the results, but the experience shows it is a conservative setting for servers like m5.xlarge

Run the tests

git clone https://github.com/rporres/mb-k8s.git
cd mb-k8s
helm install <test-name> helm/mb-k8s -f <values.yaml>

where values.yaml is one of the files inside mb-k8s-values-files

Prepare the result files

The result of the tests is uploaded into s3BucketName. They have to be downloaded and for those tests that run into multiple servers, sorted into one file, e.g. the results of a test distributed in four servers

for i in $(ls 100ka-200c-mb-k8s-*.xz); do
  xz -dc $i
done | sort -t, -k1n,1n | xz > 100ka-200c.xz

Create the plots comparing the different runs

In order to create data files for gnuplot from the result files, a utility script is provided create-gnuplot-values-file.py. It will create data files counting request rate, median latencies and error rates. Example gnuplot files can be found in gnuplot directory

openshift-routers-load-test's People

Contributors

rporres avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.