Microsoft YARP

This page summarizes the projects mentioned and recommended in the original post on news.ycombinator.com

Our great sponsors
  • WorkOS - The modern identity platform for B2B SaaS
  • InfluxDB - Power Real-Time Data Analytics at Scale
  • SaaSHub - Software Alternatives and Reviews
  • YARP

    A toolkit for developing high-performance HTTP reverse proxy applications.

  • One thing I'd like to add as a potential differentiator as well is that YARP runs very well on Windows and because it's build on ASP.NET Core, can run inside of IIS and directly on HTTP.sys as well (which means we can take advantage of cool features like http.sys request delegation where possible https://github.com/microsoft/reverse-proxy/commit/b9c13dbde9...). This means you get platform portability AND deep platform integration for free.

  • envoy

    Cloud-native high-performance edge/middle/service proxy

  • mdasen has already pointed out that "2x" seems to overstate the difference by quite a bit. YARP also has a spikier max latency, which I'd expect for a GC'ed language.

    I don't see a way to choose the benchmarking platform in the PowerBI dashboard, so I assume all these numbers were collected on Windows. In that case, it doesn't surprise me that YARP is faster: Envoy uses libevent for cross-platform I/O, but libevent is far from ideal on Windows. As I understand it, the libevent backend that uses I/O completion ports is relatively slow _and_ it exposes a BSD-style socket API, which forces Envoy to manage buffers rather than delegating that to IOCP. Kestrel, YARP's underlying webserver, uses libuv instead. libuv is more actively developed (because of Node.js) and takes the opposite approach, exposing an IOCP-like API even on POSIX systems. This Envoy issue[0] is really informative if you're interested in the details. Basically, YARP's I/O model is much closer to Windows' native model, so it wouldn't surprise me if it's competitive with Envoy's performance.

    More broadly, the .NET team that builds the Kestrel webserver and contributes to YARP and gRPC is full of performance heavyweights. I wouldn't want to compete head-to-head with James Newton-King, David Fowler, and the other folks on that team, and I'd start by assuming that the benchmarks for their projects are thoughtfully designed. Everyone makes mistakes, but start by assuming that they're brilliant engineers leading a talented team - because they are.

    I say all this as someone who doesn't particularly love Windows as a development environment, .NET as a language, or Microsoft as a company (quit after just 6 months). Credit where credit's due.

    [0]: https://github.com/envoyproxy/envoy/issues/4952#issuecomment...

  • WorkOS

    The modern identity platform for B2B SaaS. The APIs are flexible and easy-to-use, supporting authentication, user identity, and complex enterprise features like SSO and SCIM provisioning.

    WorkOS logo
  • .NET Runtime

    .NET is a cross-platform runtime for cloud, mobile, desktop, and IoT apps.

  • C++ REST SDK

    The C++ REST SDK is a Microsoft project for cloud-based client-server communication in native code using a modern asynchronous C++ API design. This project aims to help C++ developers connect to and interact with services.

  • I never thought I'd laud microsoft on open source software but this has certainly made my life easier... I mean come on, MIT licensed and everything...

    https://github.com/microsoft/cpprestsdk

  • ProxyKit

    Discontinued A toolkit to create code-first HTTP reverse proxies on ASP.NET Core

  • Worth noting that YARP (or as someone has eloquently described it as PRAY) here was another Microsoft project which basically killed a previous open source project which did the same thing:

    https://github.com/proxykit/ProxyKit

  • zerosharp

    Demo of the potential of C# for systems programming with the .NET native ahead-of-time compilation technology.

  • It already is a systems language and has been since the outset. Managed code is the preference, but you can certainly run unmanaged code with direct memory access if you want to.

    https://github.com/MichalStrehovsky/zerosharp

NOTE: The number of mentions on this list indicates mentions on common posts plus user suggested alternatives. Hence, a higher number means a more popular project.

Suggest a related project

Related posts