Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

RFC: distributed vegeta #3

Open
MalloZup opened this issue Dec 22, 2018 · 3 comments
Open

RFC: distributed vegeta #3

MalloZup opened this issue Dec 22, 2018 · 3 comments
Milestone

Comments

@MalloZup
Copy link
Owner

MalloZup commented Dec 22, 2018

RFC Design of distributed vegeta:

Desc

Distributed vegeta operator. ( Load-testing tool) see https://github.com/tsenart/vegeta

Goal

A user can schedule vegeta attacks(load-testing) to web-service, in a k8s cluster.

Highlevel

features 01:

CRD API:
Viakubectl the user will schedule vegeta attacks: see https://github.com/MalloZup/vegeta-operator/blob/master/config/samples/vegeta_v1beta1_vegeta.yaml

Example:

  • When doing the command:
    attack: echo "GET http://localhost/" | vegeta attack -duration=5s
    this will schedule a K8s JOB.

  • numAttack, with this the user can specify the number of same type load tests. This will then scheduled 2 times along the cluster.

The operator/controller will execute the run in the nodes on the cluster and managing also the report/files with the storage.

Unknowns and need research.

storage of results/report

  1. We need to store reports/logs of attacks.
    E.g once the cmd is done we might save maybe in a distributed databases the report, or consider some lightweight solution like the k8s logs https://kubernetes.io/docs/concepts/cluster-administration/logging/
@MalloZup MalloZup added this to the 0.1 milestone Dec 22, 2018
@szuecs
Copy link

szuecs commented Dec 22, 2018

Just some random thoughts to be used as input (feel free to disagree):

The controller part to run vegeta is easy, but first you should think about how to get the results back. Maybe vegeta should have a different output to make this simple or you can try to get results from Kubernetes logs. Do you even need to return the results, if people have a monitoring in place (think Prometheus + grafana dashboard)?

Outputs supported by vegeta:

encode command:
  -output string
    	Output file (default "stdout")
  -to string
    	Output encoding [csv, gob, json] (default "json")

Maybe the execution engine that could wrap the vegeta could pick up the csv and post it to different data sinks (S3, gist, ...). Why CSV? It's easy to use with R or spreadsheets to do analytics or reports.

CRD could have the args typed or just a list of string that you concat. I would not "over engineer" the solution with a file, or you could just use a configmap, and mount it to all vegeta. The question is then what does the controller do? Why not having a result output by vegeta that is easy to concat?

More important questions:
How this should be used?
Do you configure and run one loadtest by creating one CRD?
Can you run multiple loadtests at the same time?

@MalloZup
Copy link
Owner Author

MalloZup commented Dec 22, 2018

@szuecs thx for feedback! 💘 💘

For the report question yop you are right. I still don't have thought about that.

For the other questions,

  • how it should be used:

I was thinking that an user could create a CRD , and then schedule it one time via kubectl.

This would be a 1 JOB object load testing, that will go to the cluster. The cluster will figure out where to execute it.

An User could specify also kind of count so we could have the same test 3 times.
If the CRD/vegeta cmmand change, then we will have 2 diff attacks, which could run by default 1time, but also we could have count time.

This would be a load-test.

  • For the CRD i wanted to have a simple and generic CRD, this i need to find out a good approach.

  • Can you run multiple loadtests at the same time?

Yes, load-tests can be distributed in the cluster.
..

All this answers are also fragmental and i need to investigate and learn also trying out things, so this can change.

thx for feedback anyways 🎅 🎅

@MalloZup MalloZup pinned this issue Dec 22, 2018
@MalloZup
Copy link
Owner Author

MalloZup commented Dec 23, 2018

i think k8s logging is also nice. I need to research a bit
https://kubernetes.io/docs/concepts/cluster-administration/logging/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants