Kyle Brennan c3c1d0c2fe Add hey sample function
Use it to do load testing and observe scaling.

Signed-off-by: Kyle Brennan <kylos101@gmail.com>
2020-03-29 20:26:23 +01:00
..
2020-03-29 20:26:23 +01:00
2020-03-29 20:26:23 +01:00

Overview

hey is a HTTP load generator..

This is a OpenFaaS Dockerfile function, it wraps hey.

Use it to test your functions!

For example, generate load and watch them scale up and down!!!

Demo

  1. Deploy the nodeinfo function
  2. Deploy this function
  3. Send a request like through the hey function to load test the nodeinfo function
-m POST -d '{}' http://127.0.0.1:8080/function/nodeinfo.openfaas-fn

Tips

  • hey does not randomize the request payload, there's nothing saying you cannot call it a bunch with different payloads, though.
  • hey defaults Content-Type to "text/html".
  • hey requires parameters to be in a certain order. For example, if you don't use the order above, the post body may be empty.