Skip to content

TykTechnologies/tyk-ansible-performance-testing

Repository files navigation

Performance Testing Tyk with Ansible

Requirements

  1. Ansible.

Getting Started

  1. Clone repo and navigate to the repo directory.

  2. Run initalization script to initialize environment sh scripts/init.sh.

  3. Create 5 different servers to conduct the testing:

  • Upstream: expose port 8000 (ex. c5.2xlarge)
  • Load Generator (ex. c5.2xlarge)
  • Tyk: expose port 8080 (ex. c5.2xlarge)
  • Kong: expose port 8000 (ex. c5.2xlarge)
  • Apollo: expose port 4000 (ex. c5.2xlarge)
  1. Modify hosts.yml file to update ssh variables to your server(s). You can learn more about the hosts file here.

  2. Run sudo ansible-playbook playbook.yml -t install -t standup -t test to run performance tests. sudo is used to allow ansible to create the performance testing results files on your local machine.

  3. View output of performance tests under ./benchmarks/.

  4. Run ansible-playbook playbook.yml -t cleanup to cleanup files and turn off services on the machines.

Documentation

Please check the /docs folder for more information about the repo.

  • Tests: Explains the different REST and GraphQL tests available.
  • Analysis: Explains how to use the analyze.r script to generate comparison graphs and csv based on the tests ran.
  • AWS: Explains how to use the aws.playbook.yml to standup the resources necessary to run the tests in AWS.
  • GCP: Explains how to use the gcp.playbook.yml to standup the resources necessary to run the tests in GCP.
  • Azure: Explains how to use the azure.playbook.yml to standup the resources necessary to run the tests in Azure.
  • Variables: Explains the different variables used in this repo.