These are chat archives for spring-cloud/spring-cloud

11th
Apr 2017
Kent Johnson
@kentoj
Apr 11 2017 02:26
Is implicit is the optimal OAuth2 flow for connecting a mobile JS app to my Spring Cloud set of microservices?
Kent Johnson
@kentoj
Apr 11 2017 02:40
@ersagun That sounds like an interesting question. What are you using the multiple input and output channels for?
Is it something a message queue could help with or is there some logic involved?
Kent Johnson
@kentoj
Apr 11 2017 02:46
On OAuth2, it seems as though password flow is the best since I don't intend to use an external OAuth provider at this point as I am using the Spring Cloud Security as my in-house OAuth2 provider.
Sushant Borse
@sushant91265_twitter
Apr 11 2017 05:22
how to get the registered instances dynamically in the hystrix-turbine configuration ?
Ersagun
@ersagun
Apr 11 2017 06:11
Hi @kentoj thanks for your answer. In my case I have multiple input and output channels because I have different operations to do in function of the events type. In a group we decided doing this in a that way, using multip input output
Because this make us avoid having a big automate which check type and call method in function of type of message. To be honest we are open for all suggestions. Unfortunately I can't use dataflow because my microservices listen from multiple, send to multiple sometimes..
soorajjoshi
@soorajjoshi
Apr 11 2017 10:08

Hi

We are using Camden.SR3 with Spring-Boot 1.4.4 Release and are currently performing load testing to benchmark router(Zuul) performance using JMeter.

When I set thread count to less than 10, on a general basis , I don't encounter any error. But , as soon as I increase the same (say 15/20/30) , on most occasions , after executing it continuously for 30-60 mins., errors start appearing and keep on increasing gradually :

error message="Number of retries on next server exceeded max 1 retries, while making a call for: <Server name>:<port number>@<Server name>"
message="Hystrix command error: - FailureType: COMMAND_EXCEPTION"

Error Details as below :-
componentName="router" routerCall="API" message="exception detail in onExecutionError:com.netflix.client.ClientException: Number of retries on next server exceeded max 1 retries, while making a call for: <server name>:<port number>@<server name>com.netflix.loadbalancer.reactive.LoadBalancerCommand$4.call(LoadBalancerCommand.java:350)
com.netflix.loadbalancer.reactive.LoadBalancerCommand$4.call(LoadBalancerCommand.java:345)
rx.internal.operators.OperatorOnErrorResumeNextViaFunction$4.onError(OperatorOnErrorResumeNextViaFunction.java:140)
rx.internal.operators.OperatorRetryWithPredicate$SourceSubscriber$1$1.onError(OperatorRetryWithPredicate.java:107)
rx.observers.SerializedObserver.onError(SerializedObserver.java:153)
rx.observers.SerializedSubscriber.onError(SerializedSubscriber.java:78)
rx.internal.operators.OnSubscribeConcatMap$ConcatMapSubscriber.innerError(OnSubscribeConcatMap.java:192)
rx.internal.operators.OnSubscribeConcatMap$ConcatMapInnerSubscriber.onError(OnSubscribeConcatMap.java:340)
rx.observers.Subscribers$5.onError(Subscribers.java:230)
rx.internal.operators.OnSubscribeDoOnEach$DoOnEachSubscriber.onError(OnSubscribeDoOnEach.java:87)
rx.internal.operators.OnSubscribeThrow.call(OnSubscribeThrow.java:44)
rx.internal.operators.OnSubscribeThrow.call(OnSubscribeThrow.java:28)
rx.Observable.unsafeSubscribe(Observable.java:10211)
rx.internal.operators.OnSubscribeDoOnEach.call(OnSubscribeDoOnEach.java:41)
rx.internal.operators.OnSubscribeDoOnEach.call(OnSubscribeDoOnEach.java:30)
rx.Observable.unsafeSubscribe(Observable.java:10211)
rx.internal.util.ScalarSynchronousObservable$3.call(ScalarSynchronousObservable.java:235)
rx.internal.util.ScalarSynchronousObservable$3.call(ScalarSynchronousObservable.java:228)
rx.Observable.unsafeSubscribe(Observable.java:10211)
rx.internal.operators.OnSubscribeConcatMap$ConcatMapSubscriber.drain(OnSubscribeConcatMap.java:286)
rx.internal.operators.OnSubscribeConcatMap$ConcatMapSubscriber.onNext(OnSubscribeConcatMap.java:144)
com.netflix.loadbalancer.reactive.LoadBalancerCommand$1.call(LoadBalancerCommand.java:185)
com.netflix.loadbalancer.reactive.LoadBalancerCommand$1.call(LoadBalancerCommand.java:180)

where server name is discovery instance and port-no is dynamically generated.

Could you please check and let us know as to what could be the precise reason for this issue ? Also , any approach(es) to fix/reduce the same via configuration etc . specific to Camden -SR3 .

I've read somewhere that the following might not be in effect even after specifying in the corresponding yml's as anything related to ribbon.* doesn't work here-in :-
1..ribbon.MaxAutoRetries
2.ribbon.MaxAutoRetriesNextServer

Daniel Lavoie
@daniellavoie
Apr 11 2017 11:06
@soorajjoshi
The error Number of retries on next server exceeded max 1 retries is a message from Ribbon explaining that the Backend service returned an error. It means it's unavailable. Checkout your backend logs. This is a standard behavior of Ribbon within Zuul.
Daniel Lavoie
@daniellavoie
Apr 11 2017 11:17
@soorajjoshi You'll also find that in general manner, testing a reverse proxy is somehow an elaborate task since you rely on the scalability of the backend services which are usualy more sensible to DoS testing.
soorajjoshi
@soorajjoshi
Apr 11 2017 11:24
@daniellavoie Thanks for the reply. The Backend service is available. We have triggered 150000 + request (Simple request hitting controller method and just returning hardcode message), out of which only only 2% of request got this error. Is there any way to fix this issue by changing configuration?
Daniel Lavoie
@daniellavoie
Apr 11 2017 11:37
@soorajjoshi If I'm not mistaken, 500 errors could result in your backend being temporary blacklisted by the load balancer.
Hence resulting in the Number of retries on next server exceeded max 1 retries. Can you find the initial error ? Because this one is a side effect of the blacklisting.