{"id":23113071,"url":"https://github.com/daninet/go-vs-node-benchmark","last_synced_at":"2026-03-20T00:39:30.767Z","repository":{"id":56405841,"uuid":"282399043","full_name":"Daninet/go-vs-node-benchmark","owner":"Daninet","description":"Which REST backend is faster","archived":false,"fork":false,"pushed_at":"2022-12-22T17:48:22.000Z","size":544,"stargazers_count":0,"open_issues_count":3,"forks_count":0,"subscribers_count":0,"default_branch":"master","last_synced_at":"2025-05-29T19:19:55.556Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Batchfile","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Daninet.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2020-07-25T08:01:27.000Z","updated_at":"2020-07-25T14:29:06.000Z","dependencies_parsed_at":"2023-01-30T15:31:27.126Z","dependency_job_id":null,"html_url":"https://github.com/Daninet/go-vs-node-benchmark","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/Daninet/go-vs-node-benchmark","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Daninet%2Fgo-vs-node-benchmark","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Daninet%2Fgo-vs-node-benchmark/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Daninet%2Fgo-vs-node-benchmark/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Daninet%2Fgo-vs-node-benchmark/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Daninet","download_url":"https://codeload.github.com/Daninet/go-vs-node-benchmark/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Daninet%2Fgo-vs-node-benchmark/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28861655,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-28T22:56:21.783Z","status":"online","status_checked_at":"2026-01-29T02:00:06.714Z","response_time":59,"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":[],"created_at":"2024-12-17T02:26:56.367Z","updated_at":"2026-01-29T03:04:10.831Z","avatar_url":"https://github.com/Daninet.png","language":"Batchfile","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Go vs Node.js REST backend benchmark 2020\n\n**Go** v1.14 + **Fiber** v1.13.3 + **PostgreSQL** v12.3\n\n\\- vs -\n\n**Node.js** v14.6.0 + **Fastify** v3.1.1 + **PostgreSQL** v12.3\n\n## Results\n\n  \u003cimg src=\"images/rps.png\" alt=\"Requests per second at concurrency = 100\" width=\"60%\"\u003e\n\n  \u003cimg src=\"images/rps_node.png\" alt=\"Node.js relative performance compared to Go\" width=\"60%\"\u003e\n\n  \u003cimg src=\"images/latency_node.png\" alt=\"Node.js relative latency compared to Go\" width=\"60%\"\u003e\n\n\n\n|   |                              | Concurrency 10 | Avg. latency | Concurrency 100 | Avg. latency | Concurrency 250 | Avg. latency |\n|---|------------------------------|----------------|--------------|-----------------|--------------|-----------------|--------------|\n|   | Hardcoded JSON               | 100.9 %        | 99.0 %       | 51.4 %          | 196.0 %      | 56.3 %          | 177.6 %      |\n|   | JWT creation                 | 86.0 %         | 116.4 %      | 49.3 %          | 202.9 %      | 49.2 %          | 202.9 %      |\n|   | Validate JWT                 | 76.3 %         | 131.4 %      | 45.1 %          | 221.2 %      | 45.7 %          | 218.9 %      |\n|   | Query single row             | 29.2 %         | 342.5 %      | 25.4 %          | 394.1 %      | 24.3 %          | 411.0 %      |\n|   | Query multiple rows          | 45.4 %         | 220.1 %      | 40.6 %          | 244.4 %      | 37.7 %          | 255.7 %      |\n|   | Query and sort mutliple rows | 47.6 %         | 209.5 %      | 42.1 %          | 236.0 %      | 34.3 %          | 275.1 %      |\n\n\n## Raw measurements\n\n|   |                                        | Concurrency 10 | Avg. latency | Concurrency 100 | Avg. latency | Concurrency 250 | Avg. latency |\n|---|----------------------------------------|----------------|--------------|-----------------|--------------|-----------------|--------------|\n|   | Hardcoded JSON - Node.js               | 34 866 req/s   | 0.285 ms     | 51 544 req/s    | 1.94 ms      | 53 514 req/s    | 4.67 ms      |\n|   | Hardcoded JSON - Go                    | 34 552 req/s   | 0.288 ms     | 100 369 req/s   | 0.99 ms      | 94 970 req/s    | 2.63 ms      |\n|   | JWT creation - Node.js                 | 28 611 req/s   | 0.348 ms     | 35 900 req/s    | 2.78 ms      | 36 113 req/s    | 6.92 ms      |\n|   | JWT creation - Go                      | 33 256 req/s   | 0.299 ms     | 72 849 req/s    | 1.37 ms      | 73 355 req/s    | 3.41 ms      |\n|   | Validate JWT - Node.js                 | 23 313 req/s   | 0.427 ms     | 27 408 req/s    | 3.65 ms      | 27 637 req/s    | 9.04 ms      |\n|   | Validate JWT - Go                      | 30 570 req/s   | 0.325 ms     | 60 710 req/s    | 1.65 ms      | 60 518 req/s    | 4.13 ms      |\n|   | Query single row - Node.js             |  6 148 req/s   | 1.62  ms     |  6 260 req/s    | 15.96 ms     |  5 913 req/s    | 42.21 ms     |\n|   | Query single row - Go                  | 21 062 req/s   | 0.473 ms     | 24 651 req/s    | 4.05 ms      | 24 336 req/s    | 10.27 ms     |\n|   | Query multiple rows - Node.js          |    352 req/s   | 28.37 ms     |    319 req/s    | 308 ms       |    285 req/s    | 836 ms       |\n|   | Query multiple rows - Go               |    775 req/s   | 12.89 ms     |    785 req/s    | 126 ms       |    755 req/s    | 327 ms       |\n|   | Query and sort mutliple rows - Node.js |    324 req/s   | 30.78 ms     |    300 req/s    | 328 ms       |    241 req/s    | 960 ms       |\n|   | Query and sort multiple rows - Go      |    680 req/s   | 14.69 ms     |    713 req/s    | 139 ms       |    703 req/s    | 349 ms       |\n\n\n## Test environment\n\n- Bare metal PC with i5-3570 CPU @ 3.40GHz\n- OS: Debian 10 (buster)\n- Running Docker containers (JS and Go backend + Postgres v12)\n- Measurements over Gigabit LAN from a different PC using `bombardier`.\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdaninet%2Fgo-vs-node-benchmark","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdaninet%2Fgo-vs-node-benchmark","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdaninet%2Fgo-vs-node-benchmark/lists"}