Skip to content

Project Scalability

Renuka Srishti edited this page Mar 8, 2022 · 8 revisions

Now, we need to test the project scalability. For that we are going to perform load testing and spike testing using Apache JMeter.

Points to be covered

Load test plan

  • Hardware resource usage estimation
  • Number of users
  • Expected throughput at each microservice
  • Estimated usage of resources

Spike Testing

  • System’s capacity limits (at what load do you get significant failure rates).
  • Improvements that can demonstrate increased capacity.
  • Increase service instances from 3 per service to 5 instances per service for above two measurements for throughput and for failure rates.

Understanding load testing

  • How many requests can you process per second
  • Improve the throughput

Understand fault tolerance

  • Why system continues to run even with injected failures.
  • What is the impact on performance, compared to your previous load tests?

User experience and client-side performance

Let's begin

Access the instance in jetstream2 using given url to run the JMeter test directly:

Viyad

To get JMeter script to perform load and spike testing

https://github.com/airavata-courses/Viyad/tree/release-kubernetes-jmeter

If you want to setup cluster from scratch:

  1. minikube start --driver=none
  2. kubectl apply -f api-gateway-deployment.yaml
  3. kubectl apply -f postgres.yaml
  4. kubectl apply -f auth-deployment.yaml
  5. kubectl apply -f data-service-deploymnet.yaml
  6. kubectl apply -f persistence-service-secrets.yaml
  7. kubectl apply -f mysql-pv.yaml
  8. kubectl apply -f mysql-deployment.yaml
  9. kubectl apply -f persistence-service-deployment.yaml 10.Connect to your MySQL database by setting up a temporary pod as a mysql-client: kubectl run -it --rm --image=mysql --restart=Never mysql-client -- mysql --host mysql --password=super-secret-passwod
  10. Run the below mysql script on the instance created: CREATE DATABASE persistencedb; use persistencedb;

create table pers_test( pers_id INT NOT NULL AUTO_INCREMENT, user_id INT NOT NULL, pers_name VARCHAR(100) NOT NULL, pers_date DATETIME DEFAULT CURRENT_TIMESTAMP NOT NULL, pers_location VARCHAR(100) NOT NULL, updated_time DATETIME DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP NOT NULL, PRIMARY KEY ( pers_id ) );