{"id":21654421,"url":"https://github.com/hvalfangst/gin-bun-api","last_synced_at":"2026-04-12T03:03:03.778Z","repository":{"id":205884679,"uuid":"715299447","full_name":"hvalfangst/gin-bun-api","owner":"hvalfangst","description":"API programmed in Golang with Gin framework and Bun ORM","archived":false,"fork":false,"pushed_at":"2023-11-07T22:17:52.000Z","size":21,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-20T04:44:04.195Z","etag":null,"topics":["bombardier","bun","docker","gin","golang"],"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/hvalfangst.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-11-06T21:33:51.000Z","updated_at":"2024-10-14T21:41:20.000Z","dependencies_parsed_at":"2023-11-07T04:06:37.694Z","dependency_job_id":"b4507b07-0a58-44f3-ab38-3bb33f0e3d91","html_url":"https://github.com/hvalfangst/gin-bun-api","commit_stats":null,"previous_names":["hvalfangst/imperative-golang-gin-api","hvalfangst/gin-bun-api"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/hvalfangst/gin-bun-api","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hvalfangst%2Fgin-bun-api","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hvalfangst%2Fgin-bun-api/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hvalfangst%2Fgin-bun-api/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hvalfangst%2Fgin-bun-api/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/hvalfangst","download_url":"https://codeload.github.com/hvalfangst/gin-bun-api/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hvalfangst%2Fgin-bun-api/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31702582,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-11T21:17:31.016Z","status":"online","status_checked_at":"2026-04-12T02:00:06.763Z","response_time":58,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["bombardier","bun","docker","gin","golang"],"created_at":"2024-11-25T08:27:48.950Z","updated_at":"2026-04-12T03:03:03.762Z","avatar_url":"https://github.com/hvalfangst.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Golang Gin API with Bun ORM\n\n\n\n\n## Requirements\n\n* x86-64\n* Linux/Unix\n* [Golang](https://go.dev/)\n* [Docker](https://www.docker.com/products/docker-desktop/)\n\n## Startup\n\nThe script \"up\" creates our DB container, compiles and executes our binary:\n```\n1. docker-compose -f db/cars/docker-compose.yml up -d\n2. go build -o gin_api src/main.go\n3. ./gin_api\n```\n\n## Shutdown\n\nThe script \"down\" removed our DB container:\n```\n1. docker-compose -f db/cars/docker-compose.yml down\n```\n\n## Postman Collection\n\nThe repository includes a Postman collection in the 'postman' directory.\n\n\n## Load Testing using Bombardier\nIn this project we utilize [Bombardier](https://github.com/codesenberg/bombardier) to conduct load-testing.\n\nThe subject of our tests is the `/car-details` endpoint, which is responsible for retrieving various vehicle-related data from different repositories and responding with an aggregate object.\n\n### Test 1: 10 Concurrent Connections, 1000 Requests (Baseline)\n```plaintext\nCommand: bombardier -m GET localhost:8080/car-details/1 -c 10 -n 1000\nStatistics:\n  Reqs/sec: 243.22\n  Latency: 41.86ms (Avg)\n  HTTP codes: 2xx - 1000\n  Throughput: 202.82KB/s\n  ```\n\n### Test 2: 100 Concurrent Connections, 1000 Requests\n```plaintext\nCommand: bombardier -m GET localhost:8080/car-details/1 -c 100 -n 1000\nStatistics:\n  Reqs/sec: 1917.87 (↑689.74% from Test 1)\n  Latency: 47.26ms (↑12.92% from Test 1)\n  HTTP codes: 2xx - 1000\n  Throughput: 1.60MB/s (↑687.62% from Test 1)\n```\n\n### Test 3: 1000 Concurrent Connections, 2000 Requests\n```plaintext\nCommand: bombardier -m GET localhost:8080/car-details/1 -c 1000 -n 2000\nStatistics:\n  Reqs/sec: 1244.00 (↑411.63% from Test 1)\n  Latency: 742.03ms (↑1676.64% from Test 1)\n  HTTP codes: 2xx - 2000\n  Throughput: 1.02MB/s (↑404.95% from Test 1)\n```\n\n## Test Result Analysis\n\n### Baseline (C10, N1000)\nThe baseline test (Test 1), which serves as our reference point, simulates a moderate load with 10 concurrent connections and 1000 requests. In this scenario:\n\n* The application achieved a request rate of 243.22 requests per second.\n* The average latency was measured at 41.86ms.\n* All 1000 requests resulted in successful HTTP 2xx responses.\n\n\n### Test 2 (C100, N1000)\nIn Test 2, where 100 concurrent connections and 1000 requests were applied:\n\n* The request rate increased significantly by 689.74% compared to the baseline (Test 1).\n* Latency increased slightly by 12.92% compared to the baseline.\n* Throughput exhibited an enormous increase of 687.62% compared to that of the baseline.\n\n\n### Test 3 (C1000, N2000)\nIn Test 3, with 1000 concurrent connections and 2000 requests:\n\n* The request rate maintained a relatively high level, increasing by 411.63% compared to the baseline.\n* The average latency saw a substantial increase of 1676.64% compared to the baseline.\n* Throughput showed a considerable increase of 404.95% compared to the baseline.\n* This test also successfully processed all 2000 requests with HTTP 2xx responses.\n\n## Conclusion\nThese findings suggest that this application performs better at moderate to high concurrent loads, where C=100 seems to be the sweet spot in terms of throughput.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhvalfangst%2Fgin-bun-api","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhvalfangst%2Fgin-bun-api","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhvalfangst%2Fgin-bun-api/lists"}