{"id":37846711,"url":"https://github.com/alexdyukov/benchmark-http-grpc","last_synced_at":"2026-01-16T16:03:58.422Z","repository":{"id":253845645,"uuid":"844164129","full_name":"alexdyukov/benchmark-http-grpc","owner":"alexdyukov","description":"Performance benchmarking of http1 vs http2 vs http3 vs grpc","archived":false,"fork":false,"pushed_at":"2025-11-30T10:19:37.000Z","size":29,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-12-02T15:21:01.909Z","etag":null,"topics":["benchmark","golang","grpc","http","http2","http3"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-2-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/alexdyukov.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2024-08-18T15:21:06.000Z","updated_at":"2025-11-30T10:19:28.000Z","dependencies_parsed_at":"2024-08-19T23:54:43.836Z","dependency_job_id":"7cc5de2b-57d1-40e7-a8e7-2cc4e22921ab","html_url":"https://github.com/alexdyukov/benchmark-http-grpc","commit_stats":null,"previous_names":["alexdyukov/benchmark-http-grpc"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/alexdyukov/benchmark-http-grpc","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alexdyukov%2Fbenchmark-http-grpc","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alexdyukov%2Fbenchmark-http-grpc/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alexdyukov%2Fbenchmark-http-grpc/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alexdyukov%2Fbenchmark-http-grpc/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/alexdyukov","download_url":"https://codeload.github.com/alexdyukov/benchmark-http-grpc/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alexdyukov%2Fbenchmark-http-grpc/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28479467,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-16T11:59:17.896Z","status":"ssl_error","status_checked_at":"2026-01-16T11:55:55.838Z","response_time":107,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":["benchmark","golang","grpc","http","http2","http3"],"created_at":"2026-01-16T16:03:57.762Z","updated_at":"2026-01-16T16:03:58.414Z","avatar_url":"https://github.com/alexdyukov.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# benchmark-http-grpc\nPerformance benchmarking of various version of http with json encoding decoding versus grpc\n\n## How to\n```\n# regenerate proto contracts\nprotoc --go_out=. --go_opt=paths=source_relative --go-grpc_out=. --go-grpc_opt=paths=source_relative grpcapi/*.proto\n# ensure you have up to date dependencies\ngo get -u ./...\n# generate self signed cert\nopenssl req -x509 -newkey rsa:4096 -sha256 -days 365 -nodes -keyout example.key -out example.crt -subj \"/CN=localhost\" -addext \"subjectAltName = DNS:localhost\"\n# run benchmarks\ngo test -bench=. -benchmem -benchtime=100000x\n```\n\n## Results\n```\n$ go test -bench=. -benchmem -benchtime=100000x\nwarning: GOPATH set to GOROOT (/home/user/go) has no effect\ngoos: linux\ngoarch: amd64\npkg: github.com/alexdyukov/benchmark-http-grpc\ncpu: AMD Ryzen 7 8845H w/ Radeon 780M Graphics\nBenchmarkGRPCRAWConnReuse-16              100000              9591 ns/op            9759 B/op        192 allocs/op\nBenchmarkGRPCRAWNoConnReuse-16            100000            108120 ns/op          183461 B/op        930 allocs/op\nBenchmarkGRPCTLSConnReuse-16              100000              8938 ns/op            9853 B/op        195 allocs/op\nBenchmarkGRPCTLSNoConnReuse-16            100000            928456 ns/op          361984 B/op       2136 allocs/op\nBenchmarkHTTP1RAWConnReuse-16             100000              6054 ns/op            6445 B/op         76 allocs/op\nBenchmarkHTTP1RAWNoConnReuse-16           100000             22216 ns/op           19043 B/op        143 allocs/op\nBenchmarkHTTP1TLSConnReuse-16             100000              6313 ns/op            6543 B/op         80 allocs/op\nBenchmarkHTTP1TLSNoConnReuse-16           100000            895523 ns/op          200309 B/op       1285 allocs/op\nBenchmarkHTTP2RAWConnReuse-16             100000             10702 ns/op           12860 B/op         89 allocs/op\nBenchmarkHTTP2TLSConnReuse-16             100000             10903 ns/op           13867 B/op         96 allocs/op\nBenchmarkHTTP2TLSNoConnReuse-16           100000            933833 ns/op          215772 B/op       1455 allocs/op\nBenchmarkHTTP3TLSConnReuse-16             100000             22874 ns/op           22280 B/op        210 allocs/op\nPASS\nok      github.com/alexdyukov/benchmark-http-grpc       297.645s\n```\n\n## What repo missing\nThere is no benchmarks for\n1. http2 (x/net/http2) insecure (h2) without connection reuse (disabled keepalives)\n2. quic (quic-go/http3) insecure with and without connection reuse\n3. quic (quic-go/http3) tls without connection reuse (disabled keepalives)\n\ncause of hardcoded transports and/or internal connection pools and/or lack of keepalive option support","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Falexdyukov%2Fbenchmark-http-grpc","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Falexdyukov%2Fbenchmark-http-grpc","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Falexdyukov%2Fbenchmark-http-grpc/lists"}