{"id":23644489,"url":"https://github.com/dinel13/thesis-ac","last_synced_at":"2026-04-29T12:32:23.999Z","repository":{"id":48628629,"uuid":"420990366","full_name":"Dinel13/thesis-ac","owner":"Dinel13","description":"Compare the performance of microservice use gRPC and REST APIs for academic management system","archived":false,"fork":false,"pushed_at":"2022-07-24T05:38:36.000Z","size":243924,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"pepper","last_synced_at":"2024-12-28T12:30:05.268Z","etag":null,"topics":["datadog","ec2","golang","grpc","jmeter","k6","microservice","nodejs","redis"],"latest_commit_sha":null,"homepage":"","language":"Go","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/Dinel13.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":"2021-10-25T11:11:35.000Z","updated_at":"2024-05-22T19:50:20.000Z","dependencies_parsed_at":"2022-09-03T08:32:17.098Z","dependency_job_id":null,"html_url":"https://github.com/Dinel13/thesis-ac","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Dinel13%2Fthesis-ac","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Dinel13%2Fthesis-ac/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Dinel13%2Fthesis-ac/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Dinel13%2Fthesis-ac/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Dinel13","download_url":"https://codeload.github.com/Dinel13/thesis-ac/tar.gz/refs/heads/pepper","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":239587226,"owners_count":19663894,"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":["datadog","ec2","golang","grpc","jmeter","k6","microservice","nodejs","redis"],"created_at":"2024-12-28T12:30:32.372Z","updated_at":"2025-11-11T10:30:20.938Z","avatar_url":"https://github.com/Dinel13.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Thesis-ac\n\nMy bachelor thesis in [Hasanuddin University](https://unhas.ac.id/v2/) as an Informatics Engineer Student.\n\u003cbr\u003e\n\n## Table of contents\n\n- [General info](#general-info)\n- [Technologies](#technologies)\n- [Run service](#run-service)\n- [Run test](#run-test)\n- [Result](#result)\n  \u003cbr\u003e\n\n## General info\n\nThe main purpose of this thesis is to **Compare the performance of microservice use gRPC and REST APIs for academic management system**. So this project has 3 services:\n\n1. **KRS Service** use golang.\n2. **Auth Service** uses nodejs and also golang.\n3. **Payment Service** use golang.\n\nTo store data in the database, I use **Redis**. Then use **k6** to test the performance of each service and use **Datadog** to monitor the performance. Additionaly i also try use **Jmeter** to load test. All the services are deployed in different **EC2 AWS** as well as the test agent then use private IP to communicate.\n\u003cbr\u003e\n\n### System design\n**New design**\n![sistem design[new]](https://github.com/dinel13/thesis-ac/blob/main/design-new.jpg?raw=true)\n\u003cbr \u003e\n\n**Old design**\n![sistem design[old]](https://github.com/dinel13/thesis-ac/blob/main/design.jpg?raw=true)\n\n## Technologies\n\n- **Golang 1.17.1**\n- **Nodejs 4.17.6**\n- **Redis 5.0.7**\n- **EC2 AWS**\n- **K6**\n- **Datadog 0.36.0**\n- **Jmeter 5.4.1**\n- **Linux ubuntu 20.4**\n  \u003cbr\u003e\n\n## Run service\n\n### 1. **KRS Service**\n\n```bash\n$ IP_AUTH=localhost IP_PAYMENT=localhost IP_REDIS=localhost KRS-service/main\n```\n\n### 2. **Auth Service**\n\n#### Use nodejs\n\n```bash\n$  cd auth-service-nodejs \u0026\u0026 npm install \u0026\u0026 IP_REDIS=localhost npm start\n```\n\n#### Use golang\n\n```bash\n$ IP_REDIS=localhost auth-service-go/main\n```\n\n\u003cbr\u003e\n\n### 3. **Payment Service** use golang.\n\n```bash\n$ IP_REDIS=localhost payment-service/main\n```\n\n\u003cbr\u003e\n\n## Run test\n\nrun the cpu watch tool to watch the cpu usage.\n\n```bash\n$ cpu-watch-tool/main -p \u003cpid server\u003e -o \u003coutput file\u003e\n```\n\n### 1. **RUN proxy Service**\n\n```bash\n$ IP_KRS=localhost IP_AUTH=localhost IP_PAYMENT=localhost  proxy/main\n```\n\n### 1. Use K6\n\n#### Run DataDog agent\n\n```bash\nDOCKER_CONTENT_TRUST=1 \\\nsudo docker run -d \\\n    --name datadog \\\n    -v /var/run/docker.sock:/var/run/docker.sock:ro \\\n    -v /proc/:/host/proc/:ro \\\n    -v /sys/fs/cgroup/:/host/sys/fs/cgroup:ro \\\n    -e DD_SITE=\"datadoghq.com\" \\\n    -e DD_API_KEY=\u003cYOUR_DATADOG_API_KEY\u003e \\\n    -e DD_DOGSTATSD_NON_LOCAL_TRAFFIC=1 \\\n    -p 8125:8125/udp \\\n    datadog/agent:latest\n```\n\nDon't forget to replace _\u003cYOUR_DATADOG_API_KEY\u003e_ with your datadog api key\n\n#### Run test use K6\n\nAll test files for K6 are in **k6** directory. For example, if you want to test grpc-krs-create in 100 vurtual user in 30 second use the command below.\n\n```bash\n K6_STATSD_ENABLE_TAGS=true k6 run --vus 100 --durations 30s --out statsd --tag test_run_id=1 -e IP=172.31.30.48 k6/grpc/krs/create.js\n\n```\n\n\u003cbr\u003e\n\n### 2. Use Jmeter\n\n#### Run proxy service\n\nProxy service use to transform from rest to grpc and carry on rest to rest. So we can use jmeter to test the performance both for grpc and rest.\n\n```bash\n$ IP_KRS=127.0.0.1 IP_AUTH=127.0.0.1 IP_PAYMENT=127.0.0.1 test/main\n```\n\nor use the command below to automate laod test.\n\n```bash\n$ test-tools/main -j=/home/din/Downloads/apache-jmeter-5.4.1/bin/jmeter -m=\"test\" ./jmx/1000 ./result/1000\n```\n\n#### Run test use JMeter\n\nAll jmx test file for Jmeter are in **jmx** directory. For example, if you want to test grpc-krs-create in 100 thread second use the command below.\n\n```bash\njmeter.sh -n -t jmx/100/grpc-krs-create.jmx -l testresults.jtl\n\n```\n\n### 3. Use Locust\n\nStill developing...\n\n\u003cbr\u003e\n\n## Result\n\n### Result for test use Apache JMeter\n\n**Response Time**\n\n![response time](https://github.com/dinel13/thesis-ac/blob/main/jmeter-response-time.png?raw=true)\n\u003cbr\u003e\n\n**Throughput**\n\n![throughput](https://github.com/dinel13/thesis-ac/blob/main/jmeter-throughput.png?raw=true)\n\u003cbr\u003e\n\n**CPU Utilization**\n\n![CPU Utilization](https://github.com/dinel13/thesis-ac/blob/main/jmeter-cpu.png?raw=true)\n\n\u003cbr \u003e\n\n### Result for K6 with 100 vurtual user in 30 second\n\n**Grpc**\n\n![grpc](https://github.com/dinel13/thesis-ac/blob/main/100.png?raw=true)\n\u003cbr\u003e\n\n**Rest**\n\n![rest](https://github.com/dinel13/thesis-ac/blob/main/100r.png?raw=true)\n\u003cbr\u003e\n\n**Datadog**\n\n![datadog](https://github.com/dinel13/thesis-ac/blob/main/datadog.png?raw=true)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdinel13%2Fthesis-ac","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdinel13%2Fthesis-ac","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdinel13%2Fthesis-ac/lists"}