Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Is it normal to make half of performance ? #537

Closed
1 of 8 tasks
okproject opened this issue Nov 12, 2020 · 5 comments
Closed
1 of 8 tasks

Is it normal to make half of performance ? #537

okproject opened this issue Nov 12, 2020 · 5 comments
Labels
tenet-performance Impacting performance Type: Feedback This issue is general feedback and doesn't represent actionable work.

Comments

@okproject
Copy link

okproject commented Nov 12, 2020

Some details

How many backends are in your application?

  • [x ] 1-2
  • 3-5
  • 6-10
  • 10+

How do you host your application?

  • Kubernetes
  • Azure App Service
  • Azure VMs
  • Other Cloud Provider (please include details below)
  • Other Hosting model (please include details below)
    - Local environment: macbook 2015 mid 16gb mem i7 cpu 256gb ssd

What did you think of YARP?

Hi.

Thank you very much to invest that kind of tool; thank you all team members, contrirbutors.

Problem

  • As a summary my test results performance degradation. I want to know if is there any mistake by me or nature of the product currently.

Given

  • APP A - YARP)I have e .net core 3.1 project that contains YARP and configuration.It listens port 80
  • I changed etc/host file to listen website1.com points to 127.0.0.1
  • APP B - WEBSITE1) I have website1 asp.net core 3.1 MVC app (default new website template)
  • I hosted 2 different instance of APP B on my local machie on port 5010 and 5020
  • I configured YARP instance to point APPB with load balancing config.
  • I used loadtest (npm package), tcpkali, bombardier packages for loadtest

When1

  • When i directly test APP-B single instance instance with localhost:5010

Then1

  • It handles 30.000 request per second

When2

  • When i test my APPAPP-A YARP instance instance with website2.com (i updated etc host file to point it)
  • My YARP configuration points to instance of same app running on different process
  • I used both RoundRobin and Random options to distribute load
  • I specify loadBalancingSettin in startup cs as specified in documentation

Then2

  • It handles 13000 - 15000 request per second

Question1: Is it normal to have that much degradation when i use YARP ?

Question2: Can you please share with me how to modify my computer setting as both load testing client and local server for load testing scenario. I found too many documents; nothing exact.

So if you some advice about setting macos Catalina 10.15.6 for loadtest using YARP, i would be great.

Thank you very much for the YARP again.

PS : I disabled all loggers to see performance of the apps (console logger makes performance worst, so i cleared all log providers for loadtest)

@okproject okproject added the Type: Feedback This issue is general feedback and doesn't represent actionable work. label Nov 12, 2020
@Tratcher
Copy link
Member

Tratcher commented Nov 12, 2020

Yes, adding any proxy to your flow adds significant overhead, especially when the requests are simple and only bound by the constraints of the HTTP stack. If your requests were bound by constraints in your app business logic you wouldn't see nearly as much impact.

We aim to improve YARPs throughput from ~50% to ~75%.

@sebastienros

@sebastienros
Copy link
Contributor

I confirm what @Tratcher said.
And we measure this cost on any proxy, it's not specific to yarp.

But based on the client load, this can actually improve perf in some cases, so this is very specific to what kind of benchmark is run. In your case this is totally expected.

@okproject
Copy link
Author

okproject commented Nov 13, 2020

@Tratcher @sebastienros thank you very much for the answers.

I have two more questions.

  1. Pod
    For example, when we use kubernetes
  • We create a pod that contains 2 container. One of them is web app and other one is nginx sidecar container

  • When we switch from nginx to YARP, is the scenario same ? I mean do we need to place web app and YARP containers in a pod ? Or is it wrong use for that kind of scenario ?

  1. Load Balancing
  • In kubernetes scenario we have service object that manage load balancing by yml definition.

  • Is YARP planned for replace the kubernetes service to handle load balancing or it is not in case ? I don't know the how things works behind the scenes so may be the question is wrong :) But my point is how we use YARP with kubernetes, what are important points.

Thank you

@Tratcher
Copy link
Member

We haven't started looking at kubernetes in detail yet, but yes, you should be able to use YARP anywhere that you use NGinx as a proxy. We're tracking this here: #200

@Tratcher Tratcher added the tenet-performance Impacting performance label Nov 17, 2020
@karelz
Copy link
Member

karelz commented Dec 3, 2020

Triage: Seems to be answered, closing. Kubernetes support is tracked in #200.

@karelz karelz closed this as completed Dec 3, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
tenet-performance Impacting performance Type: Feedback This issue is general feedback and doesn't represent actionable work.
Projects
None yet
Development

No branches or pull requests

4 participants