spring-cloud / spring-cloud-sleuth

Distributed tracing for spring cloud
https://spring.io/projects/spring-cloud-sleuth
Apache License 2.0
1.78k stars 782 forks source link

Resonable sleuth overhead #1262

Closed tony-clarke-amdocs closed 5 years ago

tony-clarke-amdocs commented 5 years ago

Understandably enabling sleuth on a spring boot application will add some additional overhead. The question, is what is reasonable overhead. Enabling sleuth (2.1.1) on Spring Cloud Gateway 2.1.1 seems to slow down request processing times by around 20 to 40%. Is this in the expected range? Note, this is much better than Spring Cloud Gateway 2.0.x where the performance was 500% slower (this was a known issue in reactive).

@spencergibb

codefromthecrypt commented 5 years ago

I wonder if there's a way to get to the same page with this. For example, if you can make a sample app, and perhaps use a tool like wrk to show the before/after? Not sure if this one helps or not https://github.com/openzipkin/sleuth-webmvc-example

tony-clarke-amdocs commented 5 years ago

Thanks, probably can do that. Will get back to you.

spring-projects-issues commented 5 years ago

If you would like us to look at this issue, please provide the requested information. If the information is not provided within the next 7 days this issue will be closed.

tony-clarke-amdocs commented 5 years ago

I will provide repo which shows performance issue. Just hang on a few days :)

marcingrzejszczak commented 5 years ago

@tony-clarke-amdocs any progress on this?

tony-clarke-amdocs commented 5 years ago

@marcingrzejszczak It's on my todo list. I have not forgotten about it. I plan to do it in coming weeks.

marcingrzejszczak commented 5 years ago

Ok so I'll close it until then. If you have anything to show us, we'll reopen it.

rgarciapariente commented 5 years ago

We have an example that may be useful. We have used Spring Cloud Gateway to check the impact of Sleuth. In our tests the average time with Sleuth is 77% worse than without. The repository with the test performed is: https://github.com/rgarciapariente/test-perf-sleuth We simply compared a Spring Cloud Gateway against a test micro. In one case, Spring Cloud Gateway includes Sleuth and another does not. I hope this can be helpful.

marcingrzejszczak commented 5 years ago

That's a duplicate of https://github.com/spring-cloud/spring-cloud-sleuth/issues/1397