-
A side project I created to learn and improve my skills in:
- k6
- Load Tests & Stress Tests
- Load Balancer
- Concurrency & Parallelism
- A.C.I.D and Transactions CRUD operations
- Performance Benchmarks using diferent technologies and databases
-
Technologies:
- API using MongoDB
- API using PostgreSQL
- API using Serverless Framework and DynamoDB
- API using Load Balancer
- API using RPC
- API using GraphQL
- API using REST
- API using Redis
learning-load-stress-test-rest-postgres-api-video-compressed.mp4
learning-load-stress-tests-graphql-redis-api-video.mp4
- Install k6: https://k6.io/docs/get-started/installation/
- Install Bun: https://bun.sh/docs/installation
- Install NodeJS >= v20: https://nodejs.org/en/download/package-manager
- Install Docker & Docker Compose: https://docs.docker.com/engine/install/
- Have an AWS Account: https://aws.amazon.com/free/
- Enter the API folder you wanna test and follow README.md instructions
- K6 Reports:
- To see k6 tests reports, up a server in the root of this project
- And go for example: http://localhost:3000/k6-tests/reports/rest-postgres-api-load-test-signup.html
- POST /signup:
- Tests are made using fake data, to not repeat the same signup
- POST /checkout:
- Check to increase ou add more stock units as you want in database while you are testing.
- Finish REST Postgres API Tests
- Finish GraphQL Redis API Tests
- Finish JSON-RPC MongoDB API Tests
- Finish Serverless API Tests
- Finish NGINX Load Balancer API Tests
-
- Enter folder ./k6-tests
- Testing GraphQL Redis API:
k6 run graphql-redis-api-load-test-signup.js
- Testing REST Postgres API:
k6 run rest-postgres-api-load-test-signup.js
- Testing JSON-RPC MongoDB API:
k6 run json-rpc-mongodb-api-load-test-signup.js
-
- Enter folder ./k6-tests
- Testing GraphQL Redis API:
k6 run graphql-redis-api-load-test-checkout.js
- Testing REST Postgres API:
k6 run rest-postgres-api-load-test-checkout.js
- Testing JSON-RPC MongoDB API:
k6 run json-rpc-mongodb-api-load-test-checkout.js
-
- Enter folder ./k6-tests
- Testing GraphQL Redis API:
k6 run graphql-redis-api-stress-test-signup.js
- Testing REST Postgres API:
k6 run rest-postgres-api-stress-test-signup.js
- Testing JSON-RPC MongoDB API:
k6 run json-rpc-mongodb-api-stress-test-signup.js
-
- Enter folder ./k6-tests
- Testing GraphQL Redis API:
k6 run graphql-redis-api-stress-test-checkout.js
- Testing REST Postgres API:
k6 run rest-postgres-api-stress-test-checkout.js
- Testing JSON-RPC MongoDB API:
k6 run json-rpc-mongodb-api-stress-test-checkout.js
Copyright (c) March 2024-present, Alex Galhardo