{"id":13509959,"url":"https://github.com/valyala/fastrpc","last_synced_at":"2025-03-22T02:31:11.208Z","repository":{"id":57484190,"uuid":"76039360","full_name":"valyala/fastrpc","owner":"valyala","description":"Building blocks for fast rpc systems","archived":false,"fork":false,"pushed_at":"2017-10-01T15:24:06.000Z","size":40,"stargazers_count":84,"open_issues_count":3,"forks_count":11,"subscribers_count":6,"default_branch":"master","last_synced_at":"2025-03-18T07:01:37.446Z","etag":null,"topics":["fast","rpc"],"latest_commit_sha":null,"homepage":null,"language":"Go","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/valyala.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":"2016-12-09T13:50:37.000Z","updated_at":"2025-02-16T12:55:05.000Z","dependencies_parsed_at":"2022-08-26T14:20:18.960Z","dependency_job_id":null,"html_url":"https://github.com/valyala/fastrpc","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/valyala%2Ffastrpc","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/valyala%2Ffastrpc/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/valyala%2Ffastrpc/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/valyala%2Ffastrpc/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/valyala","download_url":"https://codeload.github.com/valyala/fastrpc/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244897944,"owners_count":20528319,"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":["fast","rpc"],"created_at":"2024-08-01T02:01:18.801Z","updated_at":"2025-03-22T02:31:10.946Z","avatar_url":"https://github.com/valyala.png","language":"Go","funding_links":[],"categories":["Go","others"],"sub_categories":[],"readme":"[![Build Status](https://travis-ci.org/valyala/fastrpc.svg)](https://travis-ci.org/valyala/fastrpc)\n[![GoDoc](https://godoc.org/github.com/valyala/fastrpc?status.svg)](http://godoc.org/github.com/valyala/fastrpc)\n[![Go Report](https://goreportcard.com/badge/github.com/valyala/fastrpc)](https://goreportcard.com/report/github.com/valyala/fastrpc)\n\n\n# fastrpc\n\nBuilding blocks for fast rpc systems.\n\n\n# Features\n\n- Optimized for speed.\n- Zero memory allocations in hot paths.\n- Compression saves network bandwidth.\n\n# How does it work?\n\nIt just sends batched rpc requests and responses over a single compressed\nconnection. This solves the following issues:\n\n- High network bandwidth usage.\n- High network packets rate.\n- A lot of open TCP connections.\n\n\n# Benchmark results\n\n```\nGOMAXPROCS=1 go test -bench=. -benchmem\ngoos: linux\ngoarch: amd64\npkg: github.com/valyala/fastrpc\nBenchmarkCoarseTimeNow             \t500000000\t         3.91 ns/op\t       0 B/op\t       0 allocs/op\nBenchmarkTimeNow                   \t30000000\t        47.1 ns/op\t       0 B/op\t       0 allocs/op\nBenchmarkEndToEndNoDelay1          \t  500000\t      3442 ns/op\t  75.81 MB/s\t       0 B/op\t       0 allocs/op\nBenchmarkEndToEndNoDelay10         \t  500000\t      3440 ns/op\t  75.85 MB/s\t       2 B/op\t       0 allocs/op\nBenchmarkEndToEndNoDelay100        \t  500000\t      3448 ns/op\t  75.69 MB/s\t       2 B/op\t       0 allocs/op\nBenchmarkEndToEndNoDelay1000       \t  500000\t      3440 ns/op\t  75.86 MB/s\t       8 B/op\t       0 allocs/op\nBenchmarkEndToEndNoDelay10K        \t  300000\t      3960 ns/op\t  65.90 MB/s\t      79 B/op\t       0 allocs/op\nBenchmarkEndToEndDelay1ms          \t  500000\t      3395 ns/op\t  76.87 MB/s\t       6 B/op\t       0 allocs/op\nBenchmarkEndToEndDelay2ms          \t  500000\t      3519 ns/op\t  74.16 MB/s\t       6 B/op\t       0 allocs/op\nBenchmarkEndToEndDelay4ms          \t  300000\t      4562 ns/op\t  57.20 MB/s\t      10 B/op\t       0 allocs/op\nBenchmarkEndToEndDelay8ms          \t  200000\t      8909 ns/op\t  29.30 MB/s\t      15 B/op\t       0 allocs/op\nBenchmarkEndToEndDelay16ms         \t  100000\t     16647 ns/op\t  15.68 MB/s\t      31 B/op\t       0 allocs/op\nBenchmarkEndToEndCompressNone      \t  500000\t      3376 ns/op\t  77.29 MB/s\t       6 B/op\t       0 allocs/op\nBenchmarkEndToEndCompressFlate     \t  200000\t      8154 ns/op\t  32.01 MB/s\t      49 B/op\t       0 allocs/op\nBenchmarkEndToEndCompressSnappy    \t  500000\t      3665 ns/op\t  71.20 MB/s\t      10 B/op\t       0 allocs/op\nBenchmarkEndToEndTLSCompressNone   \t  300000\t      3892 ns/op\t  67.06 MB/s\t      15 B/op\t       0 allocs/op\nBenchmarkEndToEndTLSCompressFlate  \t  200000\t      8474 ns/op\t  30.80 MB/s\t      51 B/op\t       0 allocs/op\nBenchmarkEndToEndTLSCompressSnappy \t  300000\t      3851 ns/op\t  67.77 MB/s\t      18 B/op\t       0 allocs/op\nBenchmarkEndToEndPipeline1         \t  500000\t      3249 ns/op\t  80.31 MB/s\t       0 B/op\t       0 allocs/op\nBenchmarkEndToEndPipeline10        \t  500000\t      3232 ns/op\t  80.75 MB/s\t       2 B/op\t       0 allocs/op\nBenchmarkEndToEndPipeline100       \t  500000\t      3237 ns/op\t  80.62 MB/s\t       2 B/op\t       0 allocs/op\nBenchmarkEndToEndPipeline1000      \t  500000\t      3215 ns/op\t  81.17 MB/s\t       8 B/op\t       0 allocs/op\nBenchmarkSendNowait                \t 3000000\t       451 ns/op\t       0 B/op\t       0 allocs/op\n\nGOMAXPROCS=4 go test -bench=. -benchmem\ngoos: linux\ngoarch: amd64\npkg: github.com/valyala/fastrpc\nBenchmarkCoarseTimeNow-4               \t1000000000\t         2.37 ns/op\t       0 B/op\t       0 allocs/op\nBenchmarkTimeNow-4                     \t100000000\t        17.7 ns/op\t       0 B/op\t       0 allocs/op\nBenchmarkEndToEndNoDelay1-4            \t 1000000\t      1726 ns/op\t 151.14 MB/s\t       1 B/op\t       0 allocs/op\nBenchmarkEndToEndNoDelay10-4           \t 1000000\t      1757 ns/op\t 148.47 MB/s\t       1 B/op\t       0 allocs/op\nBenchmarkEndToEndNoDelay100-4          \t 1000000\t      1768 ns/op\t 147.59 MB/s\t       2 B/op\t       0 allocs/op\nBenchmarkEndToEndNoDelay1000-4         \t 1000000\t      1610 ns/op\t 162.09 MB/s\t      11 B/op\t       0 allocs/op\nBenchmarkEndToEndNoDelay10K-4          \t 1000000\t      1825 ns/op\t 142.94 MB/s\t      41 B/op\t       0 allocs/op\nBenchmarkEndToEndDelay1ms-4            \t 1000000\t      1656 ns/op\t 157.57 MB/s\t       8 B/op\t       0 allocs/op\nBenchmarkEndToEndDelay2ms-4            \t 1000000\t      1715 ns/op\t 152.10 MB/s\t       8 B/op\t       0 allocs/op\nBenchmarkEndToEndDelay4ms-4            \t 1000000\t      1635 ns/op\t 159.62 MB/s\t       7 B/op\t       0 allocs/op\nBenchmarkEndToEndDelay8ms-4            \t  500000\t      2322 ns/op\t 112.36 MB/s\t      15 B/op\t       0 allocs/op\nBenchmarkEndToEndDelay16ms-4           \t  300000\t      4944 ns/op\t  52.78 MB/s\t      27 B/op\t       0 allocs/op\nBenchmarkEndToEndCompressNone-4        \t 1000000\t      1688 ns/op\t 154.58 MB/s\t       8 B/op\t       0 allocs/op\nBenchmarkEndToEndCompressFlate-4       \t  500000\t      3129 ns/op\t  83.40 MB/s\t      29 B/op\t       0 allocs/op\nBenchmarkEndToEndCompressSnappy-4      \t 1000000\t      1720 ns/op\t 151.68 MB/s\t       9 B/op\t       0 allocs/op\nBenchmarkEndToEndTLSCompressNone-4     \t 1000000\t      1780 ns/op\t 146.58 MB/s\t       9 B/op\t       0 allocs/op\nBenchmarkEndToEndTLSCompressFlate-4    \t  500000\t      3133 ns/op\t  83.29 MB/s\t      29 B/op\t       0 allocs/op\nBenchmarkEndToEndTLSCompressSnappy-4   \t 1000000\t      1758 ns/op\t 148.45 MB/s\t      10 B/op\t       0 allocs/op\nBenchmarkEndToEndPipeline1-4           \t 1000000\t      1638 ns/op\t 159.27 MB/s\t       1 B/op\t       0 allocs/op\nBenchmarkEndToEndPipeline10-4          \t 1000000\t      1646 ns/op\t 158.56 MB/s\t       1 B/op\t       0 allocs/op\nBenchmarkEndToEndPipeline100-4         \t 1000000\t      1623 ns/op\t 160.78 MB/s\t       2 B/op\t       0 allocs/op\nBenchmarkEndToEndPipeline1000-4        \t 1000000\t      1386 ns/op\t 188.20 MB/s\t      10 B/op\t       0 allocs/op\nBenchmarkSendNowait-4                  \t 5000000\t       327 ns/op\t       1 B/op\t       0 allocs/op\n```\n\n# Users\n\n- [httpteleport](https://github.com/valyala/httpteleport)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvalyala%2Ffastrpc","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fvalyala%2Ffastrpc","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvalyala%2Ffastrpc/lists"}