{"id":50168057,"url":"https://github.com/leberkas-org/turbohttp","last_synced_at":"2026-05-31T23:00:50.854Z","repository":{"id":360068663,"uuid":"1248536952","full_name":"Leberkas-org/TurboHTTP","owner":"Leberkas-org","description":"High-performance HTTP client and server for .NET built on Akka.Streams - HTTP/1.0, 1.1, 2, 3 (QUIC) with full RFC compliance.","archived":false,"fork":false,"pushed_at":"2026-05-24T20:22:22.000Z","size":19751,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-05-24T22:18:32.465Z","etag":null,"topics":["akka-net","akka-streams","csharp","dotnet","high-performance","http","http-client","http-server","http2","http3","nuget","quic","reactive-streams"],"latest_commit_sha":null,"homepage":"https://turbohttp.leberkas.org/","language":"C#","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/Leberkas-org.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","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":"2026-05-24T19:15:32.000Z","updated_at":"2026-05-24T20:22:19.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/Leberkas-org/TurboHTTP","commit_stats":null,"previous_names":["leberkas-org/turbohttp"],"tags_count":13,"template":false,"template_full_name":null,"purl":"pkg:github/Leberkas-org/TurboHTTP","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Leberkas-org%2FTurboHTTP","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Leberkas-org%2FTurboHTTP/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Leberkas-org%2FTurboHTTP/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Leberkas-org%2FTurboHTTP/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Leberkas-org","download_url":"https://codeload.github.com/Leberkas-org/TurboHTTP/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Leberkas-org%2FTurboHTTP/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33752286,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-05-31T02:00:06.040Z","response_time":95,"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":["akka-net","akka-streams","csharp","dotnet","high-performance","http","http-client","http-server","http2","http3","nuget","quic","reactive-streams"],"created_at":"2026-05-24T22:01:08.599Z","updated_at":"2026-05-31T23:00:50.818Z","avatar_url":"https://github.com/Leberkas-org.png","language":"C#","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cdiv align=\"center\"\u003e\n  \u003cimg src=\"docs/logo/logo.svg\" alt=\"TurboHTTP\" width=\"200\" /\u003e\n  \u003cp\u003e\u003cstrong\u003eHigh-performance HTTP client and server for .NET — built on Akka.Streams with full protocol support from HTTP/1.0 through HTTP/3 (QUIC).\u003c/strong\u003e\u003c/p\u003e\n\n  [![CI](https://img.shields.io/github/actions/workflow/status/Leberkas-org/TurboHTTP/ci.yml?label=CI)](https://github.com/Leberkas-org/TurboHTTP/actions/workflows/ci.yml)\n  [![Release](https://img.shields.io/github/actions/workflow/status/Leberkas-org/TurboHTTP/release.yml?label=Release)](https://github.com/Leberkas-org/TurboHTTP/actions/workflows/release.yml)\n  [![NuGet](https://img.shields.io/nuget/v/TurboHTTP.svg)](https://www.nuget.org/packages/TurboHTTP)\n  [![License: MIT](https://img.shields.io/badge/License-MIT-blue.svg)](LICENSE)\n\u003c/div\u003e\n\n---\n\n## Why TurboHTTP?\n\nTurboHTTP is a reactive, backpressure-aware HTTP stack built on [Akka.Streams](https://getakka.net/). Actors manage connection lifecycle while data flows through `System.Threading.Channels` — zero bytes ever touch an actor mailbox. Both the client and the server share the same protocol layer, transport, and stream pipeline, giving you a symmetric architecture from HTTP/1.0 through HTTP/3. The result: high throughput, low allocations, and a pipeline that never dies on transient errors.\n\n---\n\n## Features\n\n### Protocol\n\n- **HTTP/1.0 and HTTP/1.1** — chunked transfer, keep-alive, pipelining, h2c upgrade detection\n- **HTTP/2** — binary framing, stream multiplexing, HPACK compression, per-stream flow control\n- **HTTP/3 (QUIC)** — UDP transport, QPACK compression, 0-RTT connection establishment\n- **Dynamic protocol negotiation** — ALPN and HTTP/2 preface detection for automatic version selection\n\n### Client\n\n- **Immortal pipeline** — transport failures, protocol violations, and corrupt data are absorbed gracefully; the stream only completes when you dispose the client\n- **Automatic retries** — idempotent methods retried on transient failures with `Retry-After` support\n- **Connection pooling** — per-host pools with configurable limits, idle eviction, and exponential backoff reconnect\n- **Redirect following** — 301/302/303/307/308 with correct method rewriting, body preservation, loop detection, and HTTPS downgrade protection\n- **Cookie management** — automatic storage and injection with domain/path matching, `Secure`, `HttpOnly`, `SameSite` support; pluggable via `ICookieJar`\n- **HTTP caching** — LRU cache with `Vary`, conditional requests (`ETag`, `Last-Modified`), freshness evaluation, and 304 merging; pluggable via `ICacheStore`\n- **Content encoding** — automatic gzip, deflate, and Brotli decompression; optional request compression\n- **100-Continue** — `Expect: 100-continue` handling for large request bodies\n- **Alt-Svc** — alternative service discovery and connection migration\n\n### Server\n\n- **Standalone HTTP server** — no Kestrel dependency, built entirely on Akka.Streams\n- **ASP.NET-style middleware pipeline** — composable `TurboRequestDelegate` middleware with `Use`, `Map`, and `Run`\n- **Entity gateway** — route HTTP requests to Akka.NET actors with ask/tell semantics, response mapping, and timeout support\n- **Routing and model binding** — attribute-based and fluent route registration with JSON body binding, query string binding, and parameter validation\n- **TLS/HTTPS** — SNI-based certificate selection, client certificate modes (require/allow/deny), renegotiation, and `ITlsHandshakeFeature`\n- **Connection management** — `MaxConcurrentConnections` per listener, connection logging with wire-level hex dumps\n- **Per-protocol server options** — separate `Http1ServerOptions`, `Http2ServerOptions`, `Http3ServerOptions` with RFC-aligned defaults\n\n### Performance\n\n- **Zero-allocation hot paths** — `MemoryPool\u003cbyte\u003e`, `Span\u003cT\u003e`, `ReadOnlyMemory\u003cbyte\u003e`, and `System.Threading.Channels` throughout\n- **HTTP/2 multiplexing** — multiple concurrent requests over a single TCP connection with per-stream flow control\n- **Backpressure** — Akka.Streams backpressure propagates end-to-end from network to caller\n- **Channel-based API** — bypass `SendAsync` and write/read directly to `System.Threading.Channels` for pipelined I/O\n\n### Extensibility\n\n- **Handler pipeline** — custom request/response transforms via `TurboHandler` subclasses or inline delegates\n- **Pluggable storage** — bring your own `ICookieJar` or `ICacheStore` for custom persistence backends\n- **OpenTelemetry tracing** — built-in `TracingBidiStage` for request/response lifecycle visibility\n- **DI integration** — `IServiceCollection` support with named/typed clients and `IOptionsMonitor` for runtime config changes\n- **Comprehensive test suite** — unit, stream stage, acceptance, integration, API surface, and benchmark tests\n\n---\n\n## Getting Started\n\n```bash\ndotnet add package TurboHTTP\n```\n\nRequires **.NET 10.0** or later.\n\n### Client\n\n```csharp\nvar services = new ServiceCollection();\nservices.AddTurboHttpClient(\"GitHub\", options =\u003e\n{\n    options.BaseAddress = new Uri(\"https://api.github.com\");\n    options.DefaultRequestVersion = HttpVersion.Version20;\n})\n.WithRedirect()\n.WithCookies()\n.WithRetry(retry =\u003e retry.MaxRetries = 3);\n\nvar provider = services.BuildServiceProvider();\nvar client = provider.GetRequiredService\u003cITurboHttpClientFactory\u003e().CreateClient(\"GitHub\");\n\nvar response = await client.SendAsync(new HttpRequestMessage(HttpMethod.Get, \"/users\"));\nConsole.WriteLine(await response.Content.ReadAsStringAsync());\n```\n\n### Server\n\n```csharp\nvar services = new ServiceCollection();\nservices.AddTurboServer(server =\u003e\n{\n    server.Listen(\"https://localhost:5001\", listen =\u003e\n    {\n        listen.UseHttps();\n        listen.Protocols = HttpProtocols.Http1AndHttp2;\n    });\n});\n\nservices.AddTurboRouting(routes =\u003e\n{\n    routes.MapGet(\"/hello\", () =\u003e Results.Ok(\"Hello from TurboHTTP!\"));\n    routes.MapTurboEntity\u003cOrderActor\u003e(\"/orders/{id}\")\n        .Ask(HttpMethod.Get, msg =\u003e new GetOrder(msg.RouteValues[\"id\"]))\n        .Tell(HttpMethod.Post, msg =\u003e new CreateOrder(msg.Body));\n});\n```\n\nFor more examples — channel API, custom handlers, cookie jars, cache stores, entity gateway patterns — see the [documentation site](https://turbohttp.leberkas.org/).\n\n---\n\n## Architecture\n\n### Client\n\n```\nITurboHttpClient (SendAsync / channel API)\n    |\nFeature Pipeline    Tracing \u003e Handlers \u003e Redirect \u003e Cookie \u003e Retry \u003e\n                    Expect-Continue \u003e Cache \u003e ContentEncoding \u003e Alt-Svc\n    |\nEngine              Version router \u003e per-version client engines\n                    HTTP/1.0 | HTTP/1.1 | HTTP/2 | HTTP/3\n    |\nProtocol            Encoding/decoding, HPACK/QPACK, frame types\n    |\nTransport           TCP (ConnectionManagerActor \u003e Channel\u003cbyte\u003e \u003e ClientByteMover)\n                    QUIC (ConnectionManagerActor \u003e QUIC streams)\n```\n\n### Server\n\n```\nTransport           TcpListenerStage / QuicListenerStage\n    |\nConnection          ConnectionActor \u003e protocol negotiation (ALPN / preface detection)\n    |\nProtocol            Per-version server engines\n                    HTTP/1.0 | HTTP/1.1 | HTTP/2 | HTTP/3\n    |\nContext             TurboHttpContext (request, response, features, connection info)\n    |\nMiddleware          Pipeline stages: logging \u003e routing \u003e entity dispatch \u003e handlers\n    |\nApplication         TurboRequestDelegate / Actor entity gateway (ask/tell)\n```\n\nFor interactive architecture diagrams, see the [documentation site](https://turbohttp.leberkas.org/).\n\n---\n\n## Building from Source\n\n```bash\ndotnet restore ./src/TurboHTTP.slnx\ndotnet build --configuration Release ./src/TurboHTTP.slnx\n\n# Tests (xUnit v3 — use dotnet run, not dotnet test)\ndotnet run --project ./src/TurboHTTP.Tests/TurboHTTP.Tests.csproj\ndotnet run --project ./src/TurboHTTP.IntegrationTests.Client/TurboHTTP.IntegrationTests.Client.csproj\ndotnet run --project ./src/TurboHTTP.IntegrationTests.Server/TurboHTTP.IntegrationTests.Server.csproj\ndotnet run --project ./src/TurboHTTP.IntegrationTests.End2End/TurboHTTP.IntegrationTests.End2End.csproj\ndotnet run --project ./src/TurboHTTP.AcceptanceTests/TurboHTTP.AcceptanceTests.csproj\n\n# Benchmarks\ndotnet run --configuration Release --project ./src/TurboHTTP.Benchmarks/TurboHTTP.Benchmarks.csproj\n```\n\n---\n\n## Documentation\n\nFull documentation — including feature guides, architecture deep-dives, and API references — is available at **[turbohttp.leberkas.org](https://turbohttp.leberkas.org/)**.\n\n---\n\n## Contributing\n\nContributions are welcome. Please read [CONTRIBUTING.md](CONTRIBUTING.md) for branch naming conventions, PR requirements, and how to run tests locally.\n\n---\n\n## License\n\nTurboHTTP is licensed under the [MIT License](LICENSE).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fleberkas-org%2Fturbohttp","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fleberkas-org%2Fturbohttp","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fleberkas-org%2Fturbohttp/lists"}