Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
..
Failed to load latest commit information.
.bundle
scripts
spec
vendor/cache bump the version of json to fix an error with ruby-2.3.0 May 13, 2016
.gitignore Add shell script to get cookie jars for sticky sessions Dec 9, 2013
.rspec
Gemfile remove `ruby` directives from Gemfile Dec 17, 2015
Gemfile.lock bump the version of json to fix an error with ruby-2.3.0 May 13, 2016
README.md
config.ru add stress capability to dora Dec 6, 2013
curl.rb
dora.rb
get_instance_cookie_jars.sh
instances.rb
log_utils.rb
logging_service.rb Adding tests around logging service for dora app to help testing Jan 31, 2014
stress add stress capability to dora Dec 6, 2013
stress_testers.rb

README.md

Dora the Explorer

Endpoints

  1. GET / Hello Dora
  2. GET /id The id of the instance
  3. POST /session Sets up the cookies for a sticky session
  4. POST /stress_testers?cpu=1&io=1 Starts the stress tester with 1 cpu and 1 io process
  5. GET /stress_testers Gets all the stress testers processes
  6. DELETE /stress_testers Kill all the stress testers processes
  7. GET /find/:filename Finds a file in your instance
  8. GET /sigterm Displays all possible sigterms
  9. GET /delay/:seconds Waits for n seconds
  10. GET /sigterm/:signal Sends the specfied signal
  11. GET /logspew/:bytes Spews out n bytes to the logs
  12. GET /loglines/:linecount Writes n lines to stdout, each line contains a timestamp with nanoseconds
  13. GET /echo/:destination/:output Echos out the output to the destination
  14. GET /env/:name Prints out the env variable
  15. GET /largetext/:kbytes Returns a dummy response of size :kbytes. For testing large payloads.

Sticky Sessions

There is a helper script in this directory: get_instance_cookie_jars.sh

  • specify number of expected instances with -e #
  • specify maximum number of tries with -m #

The script will create cookie jars in the current directory, using the filename pattern cookie_jar_<instance_id>.cjar

To direct a curl request to a particular instance, specify -b <cookie_jar_file> on the curl command line.

Or, to set up a sticky session manually:

  1. Get your sticky session by running:
curl -d '' dora.yourdomain.com/session -c instance_1
  1. Run with a different filename for each instance, and repeat the curl command until you get a new ID
curl -d '' dora.yourdomain.com/session -c instance_2
  1. Then you can target whatever instance you want for example:
curl dora.yourdomain.com/stress_testers -b instance_2