spring cloud gateway integrate spring cloud sleuth is 22% slower than using spring cloud gateway alone - spring-cloud

When I use spring cloud gateway to integrate spring cloud sleuth, I find that the performance is much slower than using spring cloud gateway alone. Is there any optimization scheme?
Machine configuration:6 core, 16g
spring cloud gateway:5331.9 tps
spring cloud gateway + spring cloud sleuth:4119.47 tps
“spring cloud gateway” is about 1000-2000tps slower than “spring cloud gateway + spring cloud sleuth”, and “spring cloud gateway + spring cloud sleuth” performance is reduced by 22%

You can check the release notes https://github.com/spring-cloud/spring-cloud-release/wiki/Spring-Cloud-2020.0-Release-Notes#up-till-300-m5 and this issue https://github.com/spring-cloud/spring-cloud-sleuth/issues/1710 to see that with the latest release (2020.0.0) we've migrated to manual reactor instrumentation mode so you should see a significant improvement in performance.

Related

Is it possible to make auto-refresh properties for Spring Cloud clients in a **multi-pod** environment

Is it possible to make auto-refresh properties for Spring Cloud clients in a multi-pod environment (Google Kubernetes Engine)?
I found several work arounds:
Using Spring Cloud Bus (too heavy solution).
Running refresh inside code using RefreshEvent and #Schedule it (not recommended by Spring).
Creating a new endpoint in Config Server to perform a refresh on all Spring Cloud clients.

What kind of message queues does Spring Cloud Config create?

Spring Cloud Config uses Spring Cloud Bus uses Spring Cloud Stream to push configuration change events to clients.
My question - since I was yet to find it - is: what kind of queues does Spring Cloud Config create when it starts up? I noticed that it creates topics/queues automatically, but are they temporary, i.e. bound to the lifecycle of the server/client or durable. Do they have to be removed manually?
EDIT: I am using Spring Cloud Hoxton.SR3 with Spring Boot 2.2.5.RELEASE (or higher)
Thanks in advance!

Spring Cloud Gateway blocking requests for route descovery

I'm using Spring Cloud Gateway from spring-cloud-starter-gateway version 2.1.0.RELEASE and I need to understand why Gateway is blocking requests to perform the DiscoveryClientRouteDefinitionLocator process.
Spring Cloud Version: Greenwich.RELEASE.
I have two environments: staging and production.
In production we have a working gateway with the following latency for /actuator/health call:
I was investigatinng why those spikes occurs on a simple health call and I figure out the gateway blocks any requests sometimes (even health or real microservices call) to perform discovery routes of all my microservices.
We use Consul for discovery server and I tried to test this latency at my staging environment (with way less hardware resource on Consul). The impact of this block is clear:
After improving the Consul hardware resources we have no more spikes but the latency still is not perfect (and have minor spikes to discovery all routes) for a health call:
I need to ask: why Spring Cloud Gateway is blocking requests even having caching feature? Should not this process run in the background? What I'm doing wrong? Its really an issue with Spring Cloud Gateway?
Thank you.
As discussed here previous version of Spring Cloud Gateway was using a blocking discovery-client.
Using versions newer than 2.1.5.RELEASE will result in a more asynchronous gateway that doesn't do many blocking requests.

Orchestration of batch job into a microservices architecture - SCDF

i have a microservice which he have 5 embeded batch job that runs every night at 00:00 , i want to outsource those batches using Spring Cloud DataFlow , my questions are :
-how can i connect SCDF to the actual microservice for local deployment
-is there an alternative to get a scheduler in SCDF for
local deployment
Spring Cloud Data Flow uses Spring Cloud Skipper to deploy and launch.
This question seems similar to your query. Does spring-cloud-dataflow provide support for scheduling applications defined as tasks?

Autoscaling of Spring cloud OSS microservices

I have developed several micro services using spring cloud Netflix stack (Eureka, Zuul, Zipkin, config server etc.) Is there any open source / free solution available to spin up/down microservices instances. e.g. if CPU usage > 90% for 3 consecutive checking it will add one more instance.