dotnet / dotnet/yarp

YARP has a higher cpu usage than Nginx

Open
#2,427 28 comments 1 reaction 1 assignee Claimed by @MihaZupan View on GitHub
needs-author-action Type: Bug
Dominant language
C#
Stars
9.6k
Forks
933
Avg merge
12d 18h
Merged PRs (30d)
2

Description

Sorry, I don't know if it is a bug.

### Describe the bug
I deployed 3 nginx at HongKong, and deployed 3 YARP at HangZhou.
> Client -> Nginx -> Yarp -> Service

Nginx forwards some services, and YARP forward one of them.

Nginx CPU
![image](https://github.com/microsoft/reverse-proxy/assets/7299249/3734bcdb-34e1-4cc3-a7a5-f2ff90187080)

YARP CPU
![image](https://github.com/microsoft/reverse-proxy/assets/7299249/28c7cfc4-50cf-4dea-a9b4-e8a5097761f6)

YARP other metrics
![image](https://github.com/microsoft/reverse-proxy/assets/7299249/49fed8a1-8399-45b1-b0b5-8c8f8ada9e5c)

Htop (Cat.Service.dll is based on YARP)
![image](https://github.com/microsoft/reverse-proxy/assets/7299249/137ca12a-b898-4bc9-9f0d-51477dfa0c7b)

I tried to analyze the CPU on vs
Top function
![image](https://github.com/microsoft/reverse-proxy/assets/7299249/4d78c2f8-2902-4b4b-a5a4-afe8e890657c)

Module View
![image](https://github.com/microsoft/reverse-proxy/assets/7299249/15d8ee80-004a-49f6-b935-56cc9c0a9755)

### To Reproduce
No exception.

### Further technical details

- Include the version of the packages you are using
2.1.0
- The platform (Linux/macOS/Windows)
Linux

They're all 4c8g, YARP on ubuntu 22.04, nginx on centos.
YARP 2.1.0 runs on .NET 8.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.