Name: megaboom
Owner: Deis
Description: A Distributed HTTP Load Generator, based on rakyll/boom and Kubernetes
Forked from: arschles/megaboom
Created: 2016-08-04 16:24:22.0
Updated: 2016-09-23 08:34:43.0
Pushed: 2016-08-04 17:16:58.0
Homepage: https://github.com/rakyll/boom
Size: 18
Language: Go
GitHub Committers
User | Most Recent Commit | # Commits |
---|
Other Committers
User | Most Recent Commit | # Commits |
---|
Megaboom is a Distributed HTTP Load Generator, based on Kubernetes. It is an HTTP server meant to be run inside your Kubernetes cluster, behind a Service, and it runs Jobs that invocate the boom CLI to generate load.
This project is still in alpha, and is missing a few major features:
boom
command output, or use your own monitoring/metrics system to see status of your application under loadmegaboom
job in the default
namespace. You must delete that job before you make the next HTTP request to megaboom. Do the deletion with kubectl delete job megaboom
quay.io/arschles/megaboom:devel
This server must run inside a Kubernetes pod. It's recommended that you run this server in a pod managed by a replication controller, and then run a service in front of the replication controller. Kubernetes manifests for doing all of that are not in this repository.
The easiest way to achieve all of this functionality is to run megaboom with Deis Workflow.
Assuming you have a Workflow cluster running, and the deis
CLI tool installed and configured to communicate with that cluster, run these commands to install megaboom:
create --no-remote megaboom
pull quay.io/arschles/megaboom:devel -a megaboom
After you have megaboom installed, simply make an HTTP POST
request to it to start a job. The command below shows how to do this, but it assumes you have the following environment variables set up:
DEIS_ROUTER_IP
- the IP address of the deis-router
service. You can get this by executing the kubectl get svc deis-router --namespace=deis
commandENDPOINT
- the endpoint for megaboom to make requests against. This is the IP address or DNS name that you'd like to test under load.TEST_NUM_PODS
- the total number of pods to run in the Kubernetes jobTEST_NUM_CONCURRENT_PER_POD
- the number of concurrent requests to run in a single pod. The global maximum number of requests in flight at once will be NUM_PODS
* NUM_CONCURRENT_PER_POD
TEST_NUM_REQS_PER_POD
- the number of total requests to run in a single pod. The total number of requests to run globally will be NUM_PODS
* NUM_REQUESTS_PER_POD
After you've set up all your environment variables, execute the following command:
-XPOST -d '{"num_pods": ${TEST_NUM_PODS}, "num_concurrent_per_pod": ${TEST_NUM_CONCURRENT_PER_POD}, "num_reqs_per_pod": ${TEST_NUM_REQS_PER_POD}, "http_method": "GET", "endpoint": "${ENDPOINT}", "namespace": "default", "image": "quay.io/arschles/megaboom:devel"}' http://megaboom.${DEIS_ROUTER_IP}.xip.io
Alternatively, there is a build target in the Makefile
in this repository called make-live
. This target conveniently can execute the above curl
command given environment variables similar to the ones above. This target assumes the HTTP server under test is also running in the same Deis Workflow cluster.
Below are the environment variables to use:
DEIS_ROUTER_IP
- the IP address of the deis-router
service. You can get this by executing the kubectl get svc deis-router --namespace=deis
commandAPP_NAME
- the name of the Deis Workflow app to testTEST_NUM_PODS
- the total number of pods to run in the Kubernetes jobTEST_NUM_CONCURRENT_PER_POD
- the number of concurrent requests to run in a single pod. The global maximum number of requests in flight at once will be NUM_PODS
* NUM_CONCURRENT_PER_POD
TEST_NUM_REQS_PER_POD
- the number of total requests to run in a single pod. The total number of requests to run globally will be NUM_PODS
* NUM_REQUESTS_PER_POD
After you've configured all of these environment variables, simply execute the below command to start the test:
test-live