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

21st
Sep 2016
Stephan L
@stephlag
Sep 21 2016 15:09
Hi all
we had severe performance issue when under heavy load using HttpClientRibbonCommandFactory
After switching to this implementation after hitting spring-cloud/spring-cloud-netflix#918 issue
I was wondering if this implementation was now the default one based on @spencergibb comment https://github.com/spring-cloud/spring-cloud-netflix/issues/918#issuecomment-218021873
if it is, probably spring-cloud/spring-cloud-netflix#1150 must be fixed before releasing Camden
Ryan Baxter
@ryanjbaxter
Sep 21 2016 15:13
what the scenario is this with a request going through zuul?
Stephan L
@stephlag
Sep 21 2016 15:14
yes
when using HttpClientRibbonCommandFactory we are limited to 200 req/s
when using the (old) default Netflix RestClient we are over 1000 req/s
Stephan L
@stephlag
Sep 21 2016 15:16
So I guess we have an issue there ?
Ryan Baxter
@ryanjbaxter
Sep 21 2016 15:16
have u determined where the slow down is occurring
if u say so, I have not done performance testing on it ;)
I guess more details on where you think the bottleneck is would help out
Stephan L
@stephlag
Sep 21 2016 15:17
I think we hit the problem that was explained in spring-cloud/spring-cloud-netflix#1149
Ryan Baxter
@ryanjbaxter
Sep 21 2016 15:17
I just found a bug myself in the same code regarding socket timeouts
Stephan L
@stephlag
Sep 21 2016 15:18
Ryan Baxter
@ryanjbaxter
Sep 21 2016 15:19
so really you think u are hitting spring-cloud/spring-cloud-netflix#1150
Stephan L
@stephlag
Sep 21 2016 15:19
yes
Ryan Baxter
@ryanjbaxter
Sep 21 2016 15:19
i assume the slow down may be due to the lack of caching
k
Stephan L
@stephlag
Sep 21 2016 15:20
actually under heavy load after a few seconds all circuit breaker open for 15/30 secs until opening them again
we tried the same scenario with RestClient without any issue
Daniel Lavoie
@daniellavoie
Sep 21 2016 15:23
Hello guys, I've been going through Spring Cloud Task and Spring Cloud Dataflow but I am wondering if there is any project out there that offers distributed task scheduling for our microservices. I would like something like a Spring Cloud Task to be executed at a given time by a single instance of my service.
Not quite sure where to look at, any idea on this one ? Many thanks.
Ryan Baxter
@ryanjbaxter
Sep 21 2016 15:23
@stephlag well obviously PRs are welcome, but it seems like something we would want to address pretty soon
Stephan L
@stephlag
Sep 21 2016 15:24
@ryanjbaxter We are going to look if we can help
@daniellavoie For this we are using Zookeeper with the curator leader election recipe
Ryan Baxter
@ryanjbaxter
Sep 21 2016 15:25
@stephlag thanks!
Dave Syer
@dsyer
Sep 21 2016 15:25
You know that zk leader election is provided by Spring Integration right?
You can also just use the Spring Batch JobRepository to take a global lock.
Probably Spring Cloud Task can do that as well (not sure what the defaults are).
Stephan L
@stephlag
Sep 21 2016 15:27
Is it using curator to perform this lock?
Dave Syer
@dsyer
Sep 21 2016 15:27
Yes, it's curator under the covers.
Stephan L
@stephlag
Sep 21 2016 15:27
ok I thought so
Daniel Lavoie
@daniellavoie
Sep 21 2016 15:28
I'll have a look to those different options. If you are interrested in feedback I'll revert back with choice and it's justification based on my use case. Many thanks guys !
Dave Syer
@dsyer
Sep 21 2016 15:28
That would be useful.
Spring Batch has the concept of a job instance, and only one execution can be running at a time. I don't know if SC Task has a similar feature in its repository. Probably it would delegate to Spring Batch. Ping @mminella.
Daniel Lavoie
@daniellavoie
Sep 21 2016 15:36
It feels to me that Spring Cloud Task is limited to a Spring Cloud Client tracing its lifecycle. I don't see any feature regarding scheduling. A task is executed whenthe JVM is launched. I'll look for Spring Integration and Spring Batch
Dave Syer
@dsyer
Sep 21 2016 15:36
The task launcher API is quite flexible.
You could schedule it easily with Spring and cron
It doesn't have to be linked to the application context lifecycle (that just happens to be a convenient feature that works out of the box).
Daniel Lavoie
@daniellavoie
Sep 21 2016 15:37
The Remote Partitioning section of reference doc sounds interresting.
I'll dig into it
Daniel Lavoie
@daniellavoie
Sep 21 2016 15:55
Ok, so here's a hot feedback. Spring Cloud Task would do the trick but it would rely on Spring Cloud Deployer from what I understood. Didn't know about this project. Spring Integration Leader election system is perfect on paper but I am allergic to Spring Integration. Spring Batch with a JobRepository sounds like the quick and dirty solution.
Maybe it's time to find courage and face Spring Integration like a man
Stephan L
@stephlag
Sep 21 2016 17:17
Hi @spencergibb do you have any hints on tackling spring-cloud/spring-cloud-netflix#1150 ?
We will try to look into it tomorrow
Spencer Gibb
@spencergibb
Sep 21 2016 17:18
I'll have a look in an hour or two, I'm out and about
Stephan L
@stephlag
Sep 21 2016 17:18
ok thanks
Ryan Baxter
@ryanjbaxter
Sep 21 2016 17:32
@stephlag what kind of hints?
as to where the code should be?
Sep 21 2016 19:36
@spencergibb I am trying to use brixton SR6, getting below error it doesn't make much sense
20:32:09.462 * What went wrong:
20:32:09.463 Could not resolve all dependencies for configuration 'detachedConfiguration3'.
20:32:09.463 > Could not resolve org.springframework.boot:spring-boot-starter-actuator:.
20:32:09.463 Required by:
20:32:09.463 my App ja=r
20:32:09.463 > Failed to resolve imported Maven boms: Could not find org.springframework.cloud:spring-cloud-aws-dependencies:1.1.3.RELEASE.
20:32:09.466 > Could not find org.springframework.cloud:spring-cloud-netflix-hystrix-amqp:.
Sep 21 2016 19:42
seems build is broken ?
Ryan Baxter
@ryanjbaxter
Sep 21 2016 19:45
@pradeepkusingh what does the POM look like?
Sep 21 2016 19:46
This message was deleted
dependencyManagement {
imports {
// mavenBom 'org.springframework.cloud:spring-cloud-starter-parent:Angel.SR6'
mavenBom 'org.springframework.cloud:spring-cloud-dependencies:Brixton.SR5'
}
}
Sorry
dependencyManagement {
imports {
// mavenBom 'org.springframework.cloud:spring-cloud-starter-parent:Angel.SR6'
mavenBom 'org.springframework.cloud:spring-cloud-dependencies:Brixton.SR5'
}
}
RIght one
Ryan Baxter
@ryanjbaxter
Sep 21 2016 19:47
are u sure it still says SR5 ;)
I assume u mean SR6
Sep 21 2016 19:47
Delte
Ryan Baxter
@ryanjbaxter
Sep 21 2016 19:48
what dependencies do u have?
Sep 21 2016 19:49
compile("org.springframework.boot:spring-boot-starter-aop")
//compile("org.springframework.boot:spring-boot-starter-web")
// explicitly use version 3.3.0 to address an issue in 2.12.5
compile("org.mongodb:mongo-java-driver:3.3.0")
//compile("org.mongodb:mongo-java-driver:2.14.0")
compile("org.springframework.boot:spring-boot-starter-data-mongodb") {
exclude group: 'org.mongodb', module: 'mongo-java-driver'
}
compile("org.springframework.data:spring-data-mongodb") {
exclude group: 'org.mongodb', module: 'mongo-java-driver'
}

compile('org.springframework.data:spring-data-redis')
compile("org.springframework.cloud:spring-cloud-starter-parent")
compile("org.springframework.cloud:spring-cloud-starter-eureka-server")
compile("org.springframework.cloud:spring-cloud-starter-hystrix")
compile('org.springframework.cloud:spring-cloud-starter-bus-amqp')
compile('org.springframework.cloud:spring-cloud-starter-config')
compile("org.springframework.cloud:spring-cloud-config-client")
compile("org.springframework.cloud:spring-cloud-netflix-hystrix-amqp")
These are my spring dependencies..
Ryan Baxter
@ryanjbaxter
Sep 21 2016 19:50
and what version of spring boot?
Sep 21 2016 19:50
1.4.0
Ryan Baxter
@ryanjbaxter
Sep 21 2016 19:50
k let me try
Marcos Barbero
@marcosbarbero
Sep 21 2016 19:50
Just to let you both know
I’m trying to achieve same thing with boot 1.3.7 and keeps failing
Ryan Baxter
@ryanjbaxter
Sep 21 2016 19:51
I know we were doing the SR6 release this morning but we have not announced it yet
Sep 21 2016 19:52
it is available here
Marcos Barbero
@marcosbarbero
Sep 21 2016 19:52
I know it hehehe I just tried because I saw @pradeepkusingh saying about it and the site already set it as default
Ryan Baxter
@ryanjbaxter
Sep 21 2016 19:53
sure
it looks like it was finished
just saying ;)
Marcos Barbero
@marcosbarbero
Sep 21 2016 19:53
Don’t worry I’m just trying to debug this behaviour
Ryan Baxter
@ryanjbaxter
Sep 21 2016 19:58
so this is obvious but 1.1.3 doesn’t look like it made it to maven central
Sep 21 2016 19:58
:)
i will have to check with the team to see what we can do here
thanks for the heads up
Sep 21 2016 20:07
Any idea how long it will take to finish it ?
means dependency push to Maven ?
as multiple dependecies has issues
Ryan Baxter
@ryanjbaxter
Sep 21 2016 20:41
@pradeepkusingh spring-cloud-aws should be in maven central as soon as it syncs from sonotype
what other dependencies are missing?
Sep 21 2016 20:43
i saw amqp
ould not find org.springframework.cloud:spring-cloud-aws-dependencies:1.1.3.RELEASE.
Could not find org.springframework.cloud:spring-cloud-starter-eureka-server:.
Could not find org.springframework.cloud:spring-cloud-netflix-hystrix-amqp:.
Could not find org.springframework.data:spring-data-redis
based on my dependencies above error
Ryan Baxter
@ryanjbaxter
Sep 21 2016 20:45
what versions?
Sep 21 2016 20:46
Don't see version with it
Ryan Baxter
@ryanjbaxter
Sep 21 2016 20:46
ok i am wondering if the root cause was the fact that aws was missing
Sep 21 2016 20:47
may be.. I will test again once it pushed to maven .. then will know
Ryan Baxter
@ryanjbaxter
Sep 21 2016 20:47
hopefully aws should be in central in about 10 mins
Sep 21 2016 20:48
hmm then it might be same as you described above
Sep 21 2016 21:00
it went fine now
Just checked
Ryan Baxter
@ryanjbaxter
Sep 21 2016 21:00
great!
Sep 21 2016 21:01
Thanks for help Ryan.
Ryan Baxter
@ryanjbaxter
Sep 21 2016 21:01
np sorry about that
Sep 21 2016 21:01
Ryan..one quick help
Ryan Baxter
@ryanjbaxter
Sep 21 2016 21:02
sure hopefully i can ;)
Sep 21 2016 21:02
I tried to run zuul retry code with Brixton SR5 and seeing issue
This message was deleted
why Brixton release can't connect to Eureka brixton sr5 ?
This message was deleted
I saw one ticket on same line
let me open a ticket on github...lets ignore it here...
Ryan Baxter
@ryanjbaxter
Sep 21 2016 21:06
i just saw your comment, and i am not sure
i will try tonight, i need to run now
Sep 21 2016 21:07
ok, Thanks for help :)
Ryan Baxter
@ryanjbaxter
Sep 21 2016 21:07
np
thank u :)
Sep 21 2016 22:36
This message was deleted
This message was deleted
Sep 21 2016 22:54
@dsyer Can you please help me about below issue ? I am using Brixton SR6 with Spring boot 1.3.8 and getting below error
ERR Caused by: org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.springframework.cloud.config.client.ConfigServicePropertySourceLocator]: Factory method 'configServicePropertySource' threw exception; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'configClientProperties' defined in org.springframework.cloud.config.client.ConfigServiceBootstrapConfiguration: Initialization of bean failed; nested exception is javax.validation.ValidationException: Unable to find a default provider
2016-09-21T22:52:58.000+00:00 [APP] ERR at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:197)
2016-09-21T22:52:58.000+00:00 [APP] ERR at org.springframework.cloud.config.client.ConfigServiceBootstrapConfiguration.configServicePropertySource(ConfigServiceBootstrapConfiguration.java:56)
2016-09-21T22:52:58.000+00:00 [APP] ERR at org.springframework.cloud.config.client.ConfigServiceBootstrapConfiguration$EnhancerBySpringCGLIB$3d7dc193$FastClassBySpringCGLIB$2c00383b.invoke(<generated>)
2016-09-21T22:52:58.000+00:00 [APP] ERR at org.springframework.cglib.proxy.MethodProxy.invokeSuper(MethodProxy.java:228)
2016-09-21T22:52:58.000+00:00 [APP] ERR at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
2016-09-21T22:52:58.000+00:00 [APP] ERR Caused by: javax.validation.ValidationException: Unable to find a default provider