{"id":13509960,"url":"https://github.com/valyala/httpteleport","last_synced_at":"2025-07-29T22:42:16.513Z","repository":{"id":44153746,"uuid":"68738475","full_name":"valyala/httpteleport","owner":"valyala","description":"Transfer 10Gbps http traffic over 1Gbps networks :)","archived":false,"fork":false,"pushed_at":"2017-05-05T10:09:23.000Z","size":98,"stargazers_count":459,"open_issues_count":11,"forks_count":35,"subscribers_count":21,"default_branch":"master","last_synced_at":"2025-03-31T11:03:12.103Z","etag":null,"topics":["compression","fast","http","load-balancer","network-bandwidth","proxy","reverse-proxies"],"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-09-20T17:52:36.000Z","updated_at":"2025-03-27T15:29:34.000Z","dependencies_parsed_at":"2022-09-19T18:01:38.375Z","dependency_job_id":null,"html_url":"https://github.com/valyala/httpteleport","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%2Fhttpteleport","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/valyala%2Fhttpteleport/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/valyala%2Fhttpteleport/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/valyala%2Fhttpteleport/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/valyala","download_url":"https://codeload.github.com/valyala/httpteleport/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247648977,"owners_count":20972945,"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":["compression","fast","http","load-balancer","network-bandwidth","proxy","reverse-proxies"],"created_at":"2024-08-01T02:01:18.819Z","updated_at":"2025-04-07T12:09:29.656Z","avatar_url":"https://github.com/valyala.png","language":"Go","funding_links":[],"categories":["开源类库","Go","Open source library","proxy"],"sub_categories":["网络","The Internet"],"readme":"[![Build Status](https://travis-ci.org/valyala/httpteleport.svg)](https://travis-ci.org/valyala/httpteleport)\n[![GoDoc](https://godoc.org/github.com/valyala/httpteleport?status.svg)](http://godoc.org/github.com/valyala/httpteleport)\n[![Go Report](https://goreportcard.com/badge/github.com/valyala/httpteleport)](https://goreportcard.com/report/github.com/valyala/httpteleport)\n\n# httpteleport\n\nTeleports 10Gbps http traffic over 1Gbps networks.\nBuilt on top of [fastrpc](https://github.com/valyala/fastrpc).\n\n\n# Use cases\n\n`httpteleport` may significantly reduce inter-server network bandwidth overhead\nand costs for the following cases:\n\n- RTB servers.\n- HTTP-based API servers (aka REST, JSON, JSON-RPC or HTTP-RPC services\n  and microservices).\n- Reverse proxies.\n- Load balancers.\n\n\n# How does it work?\n\nIt just sends batched http 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\nUnlike [http pipelining](https://en.wikipedia.org/wiki/HTTP_pipelining),\n`httpteleport` responses may be sent out-of-order.\nThis resolves [head of line blocking](https://en.wikipedia.org/wiki/Head-of-line_blocking) issue.\n\n\n# Links\n\n* [Docs](https://godoc.org/github.com/valyala/httpteleport)\n\n* [httptp](https://github.com/valyala/httpteleport/tree/master/cmd/httptp) -\n  standalone single-binary reverse proxy and load balancer based\n  on `httpteleport`. `httptp` source code may be used as an example\n  of `httpteleport` usage.\n\n\n# FAQ\n\n* Q: Why `httpteleport` doesn't use [HTTP/2.0](https://en.wikipedia.org/wiki/HTTP/2)?\n\n  A: Because `http/2.0` has many features, which aren't used by `httpteleport`.\n     More features complicate the code, make it more error-prone and may slow\n     it down.\n\n* Q: Why does `httpteleport` provide [fasthttp](https://github.com/valyala/fasthttp)-\n     based API instead of standard [net/http](https://golang.org/pkg/net/http/)-\n     based API?\n\n  A: Because `httpteleport` is optimized for speed. So it have to use `fasthttp`\n     for http-related stuff to be fast.\n\n* Q: Give me performance numbers.\n\n  A: `httpteleport` achieves 200K qps on a single CPU core in end-to-end test,\n     where a client sends requests to a local server and the server sends\n     responses back to the client:\n\n```\n$ GOMAXPROCS=1 go test -bench=. -benchmem\ngoos: linux\ngoarch: amd64\npkg: github.com/valyala/httpteleport\nBenchmarkEndToEndGetNoDelay1          \t  300000\t      4346 ns/op\t  60.05 MB/s\t       0 B/op\t       0 allocs/op\nBenchmarkEndToEndGetNoDelay10         \t  300000\t      4370 ns/op\t  59.71 MB/s\t       3 B/op\t       0 allocs/op\nBenchmarkEndToEndGetNoDelay100        \t  300000\t      4406 ns/op\t  59.23 MB/s\t       6 B/op\t       0 allocs/op\nBenchmarkEndToEndGetNoDelay1000       \t  300000\t      4457 ns/op\t  58.55 MB/s\t      24 B/op\t       0 allocs/op\nBenchmarkEndToEndGetNoDelay10K        \t  300000\t      5868 ns/op\t  44.48 MB/s\t     178 B/op\t       1 allocs/op\nBenchmarkEndToEndGetDelay1ms          \t  300000\t      4771 ns/op\t  54.70 MB/s\t      21 B/op\t       0 allocs/op\nBenchmarkEndToEndGetDelay2ms          \t  200000\t      7943 ns/op\t  32.86 MB/s\t      31 B/op\t       0 allocs/op\nBenchmarkEndToEndGetDelay4ms          \t  200000\t      7741 ns/op\t  33.71 MB/s\t      31 B/op\t       0 allocs/op\nBenchmarkEndToEndGetDelay8ms          \t  200000\t     10580 ns/op\t  24.67 MB/s\t      26 B/op\t       0 allocs/op\nBenchmarkEndToEndGetDelay16ms         \t  100000\t     16923 ns/op\t  15.42 MB/s\t      50 B/op\t       0 allocs/op\nBenchmarkEndToEndGetCompressNone      \t  200000\t      7899 ns/op\t  33.04 MB/s\t      31 B/op\t       0 allocs/op\nBenchmarkEndToEndGetCompressFlate     \t  100000\t     13257 ns/op\t  19.69 MB/s\t     129 B/op\t       0 allocs/op\nBenchmarkEndToEndGetCompressSnappy    \t  200000\t      8158 ns/op\t  31.99 MB/s\t      40 B/op\t       0 allocs/op\nBenchmarkEndToEndGetTLSCompressNone   \t  200000\t      8692 ns/op\t  30.02 MB/s\t      39 B/op\t       0 allocs/op\nBenchmarkEndToEndGetTLSCompressFlate  \t  100000\t     13710 ns/op\t  19.04 MB/s\t     131 B/op\t       0 allocs/op\nBenchmarkEndToEndGetTLSCompressSnappy \t  200000\t      8480 ns/op\t  30.78 MB/s\t      42 B/op\t       0 allocs/op\nBenchmarkEndToEndGetPipeline1         \t  300000\t      4673 ns/op\t  55.85 MB/s\t       0 B/op\t       0 allocs/op\nBenchmarkEndToEndGetPipeline10        \t  300000\t      4610 ns/op\t  56.61 MB/s\t       3 B/op\t       0 allocs/op\nBenchmarkEndToEndGetPipeline100       \t  300000\t      4576 ns/op\t  57.03 MB/s\t       6 B/op\t       0 allocs/op\nBenchmarkEndToEndGetPipeline1000      \t  300000\t      4886 ns/op\t  53.41 MB/s\t      26 B/op\t       0 allocs/op\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvalyala%2Fhttpteleport","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fvalyala%2Fhttpteleport","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvalyala%2Fhttpteleport/lists"}