{"id":22317323,"url":"https://github.com/ib0b/stress-testing-app","last_synced_at":"2025-03-26T03:41:14.423Z","repository":{"id":59218875,"uuid":"536013796","full_name":"ib0b/stress-testing-app","owner":"ib0b","description":"Simple App for stress testing","archived":false,"fork":false,"pushed_at":"2022-09-21T09:25:00.000Z","size":61,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-01-31T04:07:26.066Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ib0b.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2022-09-13T07:42:22.000Z","updated_at":"2023-01-30T16:29:30.000Z","dependencies_parsed_at":"2023-01-18T18:02:04.823Z","dependency_job_id":null,"html_url":"https://github.com/ib0b/stress-testing-app","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ib0b%2Fstress-testing-app","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ib0b%2Fstress-testing-app/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ib0b%2Fstress-testing-app/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ib0b%2Fstress-testing-app/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ib0b","download_url":"https://codeload.github.com/ib0b/stress-testing-app/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245585807,"owners_count":20639671,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-12-03T23:09:22.283Z","updated_at":"2025-03-26T03:41:14.405Z","avatar_url":"https://github.com/ib0b.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"\n# Stress Testing App\n\n## Introduction\n\nThis is simple nodejs app for testing different instances.\nIt supports the following protocols\n\n- HTTP\n- gRPC\n\nThere are two types of test that can be perfomed.\n\n1. Use two computers, one as server and and another computer as the client, that sends request to the server.\n2. Use one computer that does both, it acts as a server and as a client.\n\n## Installation\n\nYou will need docker installed on your server computer\nYou will also need to [install k6](https://k6.io/docs/getting-started/installation/)\n\n## Running the server\n\nYou can run the server in two modes: gRPC and HTTP\nfor HTTP run the following commands\n\n```\ngit clone https://github.com/ib0b/stress-testing-app.git\ncd stress-testing-app\n\n#build the docker images for the http nodejs server and the gRPC server\nbash build.sh\n\n#bash starthttp.sh\n```\n\nfor gRPC run the following commands\n\n```\ngit clone https://github.com/ib0b/stress-testing-app.git\ncd stress-testing-app\n\n#build the docker images for the http nodejs server and the gRPC server\nbash build.sh\n\n#bash startgrpc.sh\n```\n\n## Running the testing client (k6) HTTP\n\nYou have the option of running the client on the same machine as the server, or different machines.\nYou will need to [install k6](https://k6.io/docs/getting-started/installation/) based on your OS.\nOnce installed run the following command while in the root directory of the repo.\n\nRunning localy : change LOCAL_HTTP_HOST if need be in config.js\n\n```\n#increase the limit of concurrent connections allowed by the OS(Linux)\nulimit -n 250000\n\n#runs the test locally\nk6 run http-tests/local.js --duration=60s --vus=32\n```\n\nRunning remotely: change REMOTE_HTTP_HOST in config.js to your remote host.\n\n```\nk6 run http-tests/remote.js --duration=60s --vus=32\n```\n\n## Running the testing client (k6) gRPC\n\nYou have the option of running the client on the same machine as the server, or different machines.\nYou will need to [install k6](https://k6.io/docs/getting-started/installation/) based on your OS.\nOnce installed run the following command while in the root directory of the repo.\n\nRunning localy : change LOCAL_GRPC_HOST if need be in *config.js*\n\n```\n#increase the limit of concurrent connections allowed by the OS(Linux)\nulimit -n 250000\n\n#runs the test locally\nk6 run grpc-tests/local.js --duration=60s --vus=32\n```\n\nRunning remotely: change REMOTE_HTTP_HOST in config.js to your remote host.\n\n```\nk6 run grpc-tests/remote.js --duration=60s --vus=32\n```\n\n## Tweaks\n\nYou can experiment with the number of nodes in your cluster, also you can change --vus which stand for number of virtual users.\nFor more k6 documentation see [this.](https://k6.io/docs/)\n\nChange the server response as per you service requirements in *docker.js* file\n\n## Results\n\nThe following were the results of running on a **c5.4xlarge, 16 vCPUs with 32 GB RAM** on AWS.\n### HTTP test 60 seconds 2 Million Requests Per Minute\n\u003cimg width=\"776\" alt=\"highestC5x4\" src=\"https://user-images.githubusercontent.com/18010106/190234975-9c47f163-1817-4990-bdbd-7f66b61a6c63.png\"\u003e\n\n### RPC test 80 seconds 1.5 Million Requests Per Minute\n\u003cimg width=\"692\" alt=\"rpc1m\" src=\"https://user-images.githubusercontent.com/18010106/190234830-36c08ffb-1b0f-4b2a-a33a-79a01464e9fd.png\"\u003e\nthe biggest advantage of gRPC is bandwith saving. In this example our data savings were about 20%.\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fib0b%2Fstress-testing-app","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fib0b%2Fstress-testing-app","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fib0b%2Fstress-testing-app/lists"}