DavidAJohn / FotoStorioMicroservices

.NET application built using a microservice architecture with Docker containers. Includes a Blazor WebAssembly e-commerce store with Stripe Elements payment integration.
23 stars 4 forks source link

Migrate gateways from Ocelot to YARP? #21

Open DavidAJohn opened 5 months ago

DavidAJohn commented 5 months ago

It's no secret that Ocelot is no longer being actively developed and Tom Pallister himself has suggested people use alternatives like YARP, although he has said he will update Ocelot with each new version of .NET.

FotoStorio has several gateway projects that currently use Ocelot for routing requests to different services on the back end. They all function without any problems, but YARP is probably a better long-term option given that it is actively maintained by Microsoft and used internally by them.

I'll try creating a gateway using YARP instead of Ocelot to see how the amount of work involved stacks up against the benefits moving forward. I would imagine there may be speed and memory usage benefits to using YARP, as well as the obvious future-proofing.

DavidAJohn commented 3 months ago

I've converted the Marketing Gateway to Yarp instead of Ocelot in this commit: 1a9f9a504aa89c20d6e79597408afa4ffd3aceb7

It is quicker and it uses less memory, but it wasn't quite as precise as I would have liked in the catch-all paths.

I'll look at the Admin Gateway next to see if that can be converted too.