YARP – Microsoft toolkit to build fast reverse proxy servers
microsoft.github.io
microsoft.github.io
Want a name, here are a few: Camel, Druid, Beetle, Quetzalcoatl, Omaha. You can even use a random website name generator, or character name generator to get names that don't mean anything but are readable.
anywho
In open source I assume anyone calling something “yet another X” is acknowledging that other X type programs exist, but don’t fit the needs or scratch the itch for the creator. You can take it or leave it.
Camel is an especially bad example, as there is already an Apache project by the same name, plus the Caml dialect of ML (of which OCaml is a much more popular descendant). Not to mention the animal, the brand of cigarettes, and the prog rock band...
Personaly I find...
Camel = Bad
Camel Reverse Proxy = Better
But again it's personal taste
Libre{Foo}
Their SQL server is called SQL Server. Their MVC framework is called MVC.
Meanwhile their team messenger has changed names like 12 times.
And anything dev-y gets swallowed into the Azure brand.
YARP is a huge step up. If they'd followed their typical approach, this would be either "Reverse Proxy" or "Azure RequestFlows"
I guess it's personal taste.
It implies they know that the space is already pretty crowded. Yet, they find there was place for yet another because they bring an angle or feature that is worthy of existing.
Right now the USP of Azure AD Application Proxy is that it "just works", give or take a bit of powershell. Replicating the functionality behind their Azure edge network and proxy connector groups is costly. It would be helpful if this project dove-tailed with the Azure edge side so we could run our own proxy connectors.
I gave it a try, because I'm a .NET dev and nginx configuration always confuses me. There are a lot of things still missing from YARP:
- Configuration/API still has some rough edges
- For a lot of things (funky header stuff), you still need to write your own Middlewares
- Missing documentation for a lot of features
- No good Letsencrypt support
- Caching and cache conrol is also very limited- Writing code in a .net based language is one of the strengths.
- let’s encrypt isn’t built in but can be added by using https://github.com/natemcmaster/LettuceEncrypt
- Not sure about the caching one. Do you have more details?
LettuceEncrypt is more or less currently unmaintained. Way too risky to use, no idea how to fix that, if something breaks.
About caching, this issue sums up my issue quite well: https://github.com/dotnet/aspnetcore/issues/27387
I went with Traefik after all, I'm quite happy with that choice.
Out of curiosity, Traefik has output caching ?
YARP got me interested, because I thought I could write some complex caching rules in C#. But you can’t, so every other proxy that doesn’t cache is as good as YARP ;)
This seems to be possible with nginx and Lua, you extract a unique cache key from your request, and then nginx caching takes care of the rest. But in my case not out of the box or without the paid version.
So I hoped to fix that problem with YARP, but I would’ve needed to implement my own caching as a completely new middleware.
In the end I implemented the caching in the database.
I think that is also what the documentation describes; it was made for internal teams that were already on the DIY track anyway and the intent is to make it a .NET-nail (for when all you have is a .NET hammer).
The downsides are (to me) somewhat obvious, there is no mindshare, no automation and no decades of experience. That can also be an upside since looking for documentation or examples will not result in old-outdated stuff since it hasn't been available that long.
Yep, I've been on teams where asking for approval to run your own proxy was out of the question, but "adding an extra module to the pipeline" was practically a rubber-stamp approval.
It’s new, give it some time
While it's better than other in-house alternatives, it's not better for the entire ecosystem as a whole. The need for hyperlocal reverse proxies is a problem on its own, generally only solved this way due to organisational dysfunction or a very niche requirement.
If you're a .NET shop, it seems very useful to have a reasonably fast toolkit for deploying specialized proxies. It's still early days, but I'd expect this to become as fast as anything written in Go or on the JVM, which seems sufficient for many use cases.
It's not meant to compete speed-wise with other off-the-shell reverse proxies.
It is to me as well, but these fights are quite pervasive in our industry. It is especially problematic in the enterprise space. This is to the point as a C# dev, that I'm happy this exists, so that I have the facilities it provides, when more mature solutions are unavailable.
If I can't inspect what critical elements in my request pipeline are doing I don't want them. This even applies when we get Big-IP/F5 buying nginx and putting that inside the name-brand boxes, it's still too opaque to be useful for me.
Going further, it can be customized from .NET and shipped as part of the app which may be using nginx for some proxy features.
I've had to do it a few times now for special applications and each time the reverse proxy part was mere minutes of work compared to the application code.
(In the end, I used HttpListener in localhost-only mode and had an off-the-shelf proxy service to deal with TLS.)
/s