Can Hystrix be used without Eureka/ Ribbon or other Netflix OSS modules - spring-cloud

We have an infrastructure with our own API gateway, service discovery and load balancing. However for resiliency purposes I need to use Hystrix.
With spring cloud netflix, can Hystrix (i.e. The circuit breaker annotation) be used without Eureka/ Ribbon or other Netflix OSS modules?
Are there any dependency to Eureka/ Ribbon / Zuul for circuit breaker dashboard (i.e. turbine and stream aggregator) ?
Can circuit breaker annotation be used in a non spring-boot application?

Spring Cloud Hystrix can be used without ribbon or eureka, just use spring-cloud-starter-hystrix. The hystrix dashboard can be used by directly going to each instances hystrix.stream one at a time. Hystrix can be used without spring boot if you use the Netflix package directly without using Spring Cloud.

Yes
No idea, run it and see if it pulls the dependencies.
Yes if it's used with spring and you declare all the necessary beans that spring boot with otherwise instantiate. Otherwise no (more in the FAQ - Can annotations be used?
I would suggest you to google a bit before posting questions like this, as it's on the edge of asking for a tool, which is not a suitable question for SO.

Related

Can one setup Spring Boot 2.6 and Spring Cloud 2021.x to use Ribbon and Hystrix with Spring WebClient and Feign?

I know that Spring Cloud at some version (3.0?) dropped direct support for some Netflix libraries like Ribbon or Hystrix. Now I'm trying to make a smooth migration of around 20 microservices running on production having some custom code extending Ribbon (and Hystrix to a lesser degree). The main goal is to upgrade from Spring Boot 2.3 to 2.6. As a consequence I need to upgrade Spring Cloud to 3.1.x, right?
My guess was to proceed with 2-step upgrade to avoid a one big-step migration:
Upgrade to Spring Boot 2.6 and Spring Cloud 3.1 while still using Ribbon and Hystrix
Make a way through a jungle of an old code and getting rid of Ribbon and Hystrix in smaller increments.
However to achieve this I'm trying to use simultanously Spring Boot 2.6, Spring Cloud with release train 2021.01 and 2 selected starters from older Spring Cloud (latest versions of these artifacts):
spring-cloud-starter-netflix-hystrix 2.2.10.RELEASE
spring-cloud-starter-netflix-ribbon 2.2.10.RELEASE
Is this possible at all? We are heavilly using Feign and Spring WebClient - client-side load-balancing must work for these. So far I found out Feign clients are not automatically integrated with Ribbon.
#spencergibb #OlgaMaciaszek - especially counting on you.
Answering my own question after receiving confirmation from Spring Cloud team by other means: this is a bad idea to try use Ribbon with Spring Cloud 2021.01 and it would require a really hard work to make it working.
So short answer is: "no".

Software vulnerabilities on transitive deps of Spring Boot - Upgrade(2.2 to 2.6.6) issues with Zuul/Gateway and Cloud Load Balancer/Ribbon

We run Zuul/Spring Boot Admin/Spring Config Server/Eureka Server all on the same server. In the process of upgrading to latest Spring Boot(to pass our Veracode scan), we had multiple roadblocks and now trying to figure out my options. Below are some options we tried
Upgraded the vulnerable transitive dependencies(of Spring Boot 2.2.13.RELEASE) without upgrading Spring Boot. Ended up with either compilation or runtime issues
Upgraded to 2.6 and made respective Cloud Config changes successfully, and had to specify Zuul with version 2.2.10.RELEASE as Maven BOM won't bring this anymore. Ended up with errors mentioned in Zuul Forwarding error, Load balancer does not have available server for client. we have yet to try out solution mentioned in this post, but, hesitant to do this
Upgraded to 2.6 and converted Zuul routes to Spring Cloud Gateway. This apparently won't work as Eureka doesn't work with Webflux and Gateway needs Webflux. Ended up with errors mentioned in Could not initialize Eureka servlet context
Hoping for potential solutions that meet the following two desires
Still run Eureka and Zuul/Gateway on same server - Just to avoid infrastructure changes at this point
Do not want to specify the URLs of services i.e instead use Eureka to get list of instances/servers. If we put complete URL for Zuul my-service.routes.path, it seem to work. Also, there are other solutions which are suggesting the same to specify comma separated instances/urls which I want to avoid.
We are very aware that Ribbon and Zuul are no longer supported. That said, are we missing any other option ?
Vulnerable deps:
xstream 1.4.15
thymeleaf-spring5-3.0.12.RELEASE.jar (This was the one we couldn't upgrade. Rest of them we could add as direct dep and bump the version)
spring-beans-5.2.12.RELEASE.jar

Spring Cloud OpenFeign vs WebClient

For Spring Boot based microservices communicating with each other via load-balanced clients (with Spring Cloud LoadBalancer) which client should be used, WebClient or OpenFeign?
From what I’ve read they both support Spring Cloud LoadBalancer. I know that WebClient also supports reactive, but that is not a feature we need.
Are both clients going to continue to be supported by Spring for the foreseeable future?
From what I can see Spring seems to be pushing WebClient. However, I still see development activity going on in the spring-cloud-openfeign github repo.
OpenFeign seems to be an easier/cleaner to use way of creating the clients, but are there any drawbacks compared to WebClient?

How to check the SLA of a webservices

We currently deployed our Spring Boot Application in GKE(Google Kubernetes Engine) and we are currently using cloud endpoint to secure our web services. We have 11 web service developed which will be consumed by external clients. Is there any way i check the SLO (times, performance) of a webservice in cloud endpoint or in stackdriver.
You might want to check:
Spring sleuth
Jaeger operator
Jaeger is a opentracing standard and can help understand the values, and sleuth is a tool to integrate with spring, there are several options, you might want also to consider opencensus
First you need to expose metrics from your applications. Spring Sleuth is a great choice if you're using Spring Boot.
Then you need to collect the metrics and visualize them. Google provides a tool for that called Stackdriver Trace. It can also do metric-based alerts. You can find a sample setup for your use case here.
There are other performance monitoring services such as Dynatrace or Datadog.
If you want a self-hosted solution, you can use Zipkin which is inspired by an internal Google system called Dapper.
Have you looked at Google cloud console UI? Its "Endpoints" tag should show all services your project is running.

Spring Cloud with Archaius

I'm having a hard time to understand how to use Netflix Archaius with Spring Boot Config.
I have a a microservice that gets the configuration from a Spring Cloud Config Server but I would like to have the configuration automatically refreshed when it is changed. As I understand this can be achieved with Archaius in the client side by pulling the info from the repository.
I have searched but cannot find a tutorial or example where this is done.