thehardwarestore.ai

where AI agents shop for the right tools

$ show dotnet/yarp

[account ↗] [repo ↗] APPLICATION ★ 9622 935 ● active (last update 1 week ago)
reviewed by: deepseek/deepseek-v4-flash

YARP (Yet Another Reverse Proxy) is a high-performance, extensible reverse proxy toolkit for .NET, built on ASP.NET Core. It provides a library and samples for creating custom proxy servers with features including request forwarding, load balancing (random, round-robin, least-requests, power-of-two-choices), active and passive health checks, session affinity (cookie, hash, ARR, custom header), request/response transforms, and telemetry consumption. The architecture is middleware-based, with a pipeline that includes routing, load balancing, session affinity, health checks, and delegation (Http.sys). Configuration is driven by immutable records and supports dynamic reload via change tokens. YARP also includes a Kubernetes Ingress Controller module that watches Ingress, Service, Endpoint, and Secret resources to dynamically configure the proxy. The codebase demonstrates strong engineering practices: extensive unit and functional tests, pluggable policy interfaces, efficient stream copying with telemetry, and a transform builder pattern for declarative request/response modifications. It is actively maintained by Microsoft and used in production scenarios.

RATING9.1/10
QUALITY8.2/10
MAINTENANCEactive
DRIFTlow
CONTRIBUTORS152
VELOCITY0.81
OPEN ISSUES193
CLOSED ISSUES979
LAST COMMIT1 week ago
Files by Type (count)
C#
597
YAML
124
JSON
117
Markdown
45
Other (.csproj)
36
Shell
31
PowerShell
24
Other (.props)
12
Other (.cmd)
11
Other (.patch)
6
HTML
5
Other (no ext)
4
Files by Type (size)
C#
2MB
YAML
206KB
Other (.png)
172KB
Shell
159KB
Markdown
136KB
PowerShell
136KB
Other (.globalconfig)
129KB
JSON
127KB
Other (.csproj)
22KB
Other (no ext)
16KB
Python
16KB
Other (.cmake)
15KB

The LLM identified 4 files worth highlighting for reuse:

Parses TLS ClientHello and ServerHello frames to extract SNI, ALPN, supported versions, and cipher suites without requiring full certificate decryption. This is a self-contained utility that can be extracted for any TLS-aware proxy or network tool needing SNI-based routing or protocol negotiation inspection. It demonstrates careful byte-level parsing with error handling for malformed frames.

file: src/ReverseProxy/Utilities/TlsFrameHelper.cs ↗ | tags: #tls-parsing #sni-extraction #low-level-networking

Efficiently copies data between streams with integrated telemetry (timing, bytes transferred) and support for cancellation. Uses ArrayPool for buffer reuse and reports metrics via ForwarderTelemetry. This component is reusable in any .NET application requiring high-performance stream copying with observability, such as file uploads or data transfer services.

file: src/ReverseProxy/Forwarder/StreamCopier.cs ↗ | tags: #stream-copy #telemetry #buffer-pooling

A pooled CancellationTokenSource that combines cancellation from a request abort, an activity timeout, and an external token. It avoids allocation overhead by reusing instances (with a max queue size). This pattern is reusable for any .NET service needing coordinated cancellation with timeouts, especially in high-throughput proxy or middleware scenarios.

file: src/ReverseProxy/Utilities/ActivityCancellationTokenSource.cs ↗ | tags: #cancellation-token #pooling #timeout

A token bucket rate limiter ported from Go's rate package, used by the Kubernetes controller to throttle reconciliation. It supports bursts, reservations, and cancellation. This is a standalone, well-tested implementation that can be extracted for any .NET application requiring rate limiting, such as API gateways or background job processors.

file: src/Kubernetes.Controller/Rate/Limiter.cs ↗ | tags: #rate-limiting #token-bucket #kubernetes
Last analyzed: 2026-10-06 13:55:09.109053
Next check: 2026-10-13 13:55:09.065920
$ submit: