Skip to content

Instantly share code, notes, and snippets.

View mariusmitrofan's full-sized avatar

Marius Mitrofan mariusmitrofan

View GitHub Profile
@mariusmitrofan
mariusmitrofan / meetup.md
Created August 1, 2019 13:09
Future meetup stuff

The answer to life, universe and everything is NOT Kubernetes

<or "How to deploy a Serverless LoadTesting tool with an ElasticSearch backend for visualizations">

Technologies used

  • Serverless - AWS Lambda
  • Chef - AWS OpsWorks
  • VPN Endpoints
  • ElasticSearch
  • AWS EKS
export EMAIL=your_email_address
cat > generate-key.json <<EOF
{
"email": "${EMAIL}",
"discount_code": "OPEN-BETA-RUNGUTAN"
}
EOF
curl \
{
"message": "Thank you for registering.
You should find the API key in your mailbox in a few seconds."
}
export API_KEY=the api key you received in your mailbox
cat > my-first-test.json <<EOF
{
"numClients": 500,
"hatchRate": 500,
"runTime": 30,
"maxThreads": 1,
"hostname": "netbears.com",
"protocol": "https",
{
"numClients": 500,
"hatchRate": 500,
"runTime": "30s",
"requestId": "OBFUSCATED_VALUE_HERE",
"maxThreads": 10,
"protocol": "https",
"hostname": "netbears.com",
"minWait": 1000,
"maxWait": 1000,
export API_KEY=the api key you received in your mailbox
export REQUEST=the value that was generated when you
created the test and offered in the response as
"requestId"
cat > results-from-my-first-test.json <<EOF
{
"requestId": "${REQUEST}"
}
EOF
{
"status": "COMPLETED",
"input": {
"requestId": "OBFUSCATED_VALUE_HERE",
"protocol": "https",
"runTime": "30s",
"hostname": "netbears.com",
"hatchRate": 500,
"numClients": 500,
"maxThreads": 1,
export API_KEY=the api key you received in your mailbox
cat > feedback.json <<EOF
{
"message": "IT WORKED. GOOD JOB. HELL YEAH. YOO-HOO. GOOD JOB GUYS."
}
EOF
curl \
-X POST \
{
"message": "Thank you for your valuable feedback!"
}
<MANDATORY PARAMETERS>
* numClients:
-> The number of users testing your application
-> Each user opens a TCP connection to your application and tests it
* hatchRate:
-> How many users will be added to the current users, per second,
until the total amount of users is fulfilled.
-> This tells the app how gradually do you want to do the load test