YARP vs Nginx Performance Showdown (Surprising Results!)

Author: Milan Jovanović
Published At: 2025-06-03T00:00:00
Length: 13:16

Summary

Description

Want to master Clean Architecture? Go here: https://bit.ly/3PupkOJ

Want to unlock Modular Monoliths? Go here: https://bit.ly/3SXlzSt

Get the source code here: https://www.patreon.com/milanjovanovic

YARP vs Nginx - A Quick Performance Comparison

https://www.milanjovanovic.tech/blog/yarp-vs-nginx-a-quick-performance-comparison

In this video, I benchmark YARP vs NGINX to see which reverse proxy delivers better performance — and the results might surprise you!

We’ll break down:

- How YARP and NGINX differ (layer 4 vs layer 7)

- How to set up both using Docker Compose

- A K6-powered performance benchmark comparing requests per second, latency, and tuning

- Why raw speed isn’t the only factor — and why YARP might still be worth using despite performance trade-offs

If you’re building .NET systems and wondering whether you should stick with NGINX or integrate YARP for tighter ecosystem support (like authentication, middleware, or OpenTelemetry), this deep dive is for you.

Check out my courses:

https://www.milanjovanovic.tech/courses

Read my Blog here:

https://www.milanjovanovic.tech/blog

Join my weekly .NET newsletter:

https://www.milanjovanovic.tech

Chapters

0:00 Layer 4 vs Layer 7 Proxy

1:23 Integrating YARP proxy

5:07 Integrating Nginx proxy

6:47 Running the services

7:52 Performance benchmarks

8:36 Surprising results!

10:32 Tuning Nginx configuration

11:16 Re-running the benchmarks

12:19 Performance isn't everything

Translated At: 2025-06-04T00:37:01Z

Request translate (One translation is about 5 minutes)

Version 3 (stable)

Optimized for a single speaker. Suitable for knowledge sharing or teaching videos.

Recommended Videos