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

14th
Aug 2015
Josh Ghiloni
@jghiloni
Aug 14 2015 02:24
Thanks, I'll give that a shot.
Josh Ghiloni
@jghiloni
Aug 14 2015 02:41
As I'm looking, that seems perfect, except it doesn't exist in 1.0.3.RELEASE/Angel.SR3 ... any idea when Brixton will be ready for primetime? Alternatively, if I create that source file in my project, will that @Bean override the EurekaDiscoveryClient created in EurekaClientAutoConfiguration?
Spencer Gibb
@spencergibb
Aug 14 2015 02:46
You'll have to use reflection in Angel. We made that constructor change as a pull request specifically for security
Josh Ghiloni
@jghiloni
Aug 14 2015 02:47
Ah, I see. So you're saying use reflection to modify the underlying Netflix DiscoveryClient on the EurekaDiscoveryClient bean?
Spencer Gibb
@spencergibb
Aug 14 2015 02:48
Yes, we've been though this same exercise :-)
Josh Ghiloni
@jghiloni
Aug 14 2015 02:48
Should be fun :)
Josh Ghiloni
@jghiloni
Aug 14 2015 02:55
this should be a LOT of fun, since DiscoveryClientOptionalArgs doesn't have an option for filters in v147
Brixton is looking pretty good. I assume it'll be released in the next year
ccit-spence
@ccit-spence
Aug 14 2015 07:46
@spencergibb @dsyer Not sure if this is something that has been seen before. When I bring a new Spring MVC UI service online and access it from Zuul it often returns a 500 on the first try. After a refresh it works fine and renders the UI service properly.
Dave Syer
@dsyer
Aug 14 2015 08:37
Never saw that. I guess it's probably the service discovery cache coming up?
You are using service discovery?
ccit-spence
@ccit-spence
Aug 14 2015 08:38
Yes, The 500 is coming from Ribbon. Eureka is the service discovery
it is like it needs to be forced to look then it is ok
Dave Syer
@dsyer
Aug 14 2015 08:40
More likely just needs time to cache everything
I usually work in dev mode with short heartbeats
So I don't see it
ccit-spence
@ccit-spence
Aug 14 2015 08:40
I will watch it. This service had been up for around 5min before I attempted the call
Dave Syer
@dsyer
Aug 14 2015 08:40
If you wait long enough it will work
ccit-spence
@ccit-spence
Aug 14 2015 08:43
I did end up solving the issue I was having with Amazon ECS and not getting the hostname from the host
Dave Syer
@dsyer
Aug 14 2015 08:43
Good
Something worth documenting?
ccit-spence
@ccit-spence
Aug 14 2015 08:43
the solution would work technically for any type of docker cluster
it amounts to setting the hostname within the container upon boot
export HOST=$(curl --retry 5 --connect-timeout 3 -s 169.254.169.254/latest/meta-data/local-hostname)
export LOCAL_IP=$(curl --retry 5 --connect-timeout 3 -s 169.254.169.254/latest/meta-data/local-ipv4)
exec "$@
Docker file

```FROM repo/oracle-java8

RUN bash -c 'apt-get -qq update'
RUN bash -c 'DEBIAN_FRONTEND=noninteractive apt-get install -y curl'

EXPOSE 8080

COPY *.jar target/app.jar

COPY entrypoint.sh /usr/local/bin/entrypoint.sh

RUN touch target/app.jar

RUN chmod +x /usr/local/bin/entrypoint.sh

ENTRYPOINT ["/usr/local/bin/entrypoint.sh"]

CMD java -jar target/app.jar```

Dave Syer
@dsyer
Aug 14 2015 08:46
Cool. It's AWS specific of course.
We could add a small section to the user guide on running in docker on AWS?
ccit-spence
@ccit-spence
Aug 14 2015 08:47
yes, the curl could be modified for any host without much work I would assume
if it is just regular docker you can use —net=host and that works as well
clusters require the above
ccit-spence
@ccit-spence
Aug 14 2015 10:30
@dsyer are there any specs for running spring boot on as little as 512mb ram? especially the services that only serve a few pages. Is 512 a realistic possibility? Not sure if there are any stats or just based on your experience.
Dave Syer
@dsyer
Aug 14 2015 10:32
If it's static content 128mb should be adequate
I think that's the default on most platforms isn't it?
ccit-spence
@ccit-spence
Aug 14 2015 10:32
yes, I think your right
Dave Syer
@dsyer
Aug 14 2015 10:33
All the production apps I run are on Cloud Foundry where 512mb is recommended, but only because of the way the actual java command line is computed
Eureka is very wasteful of memory though
ccit-spence
@ccit-spence
Aug 14 2015 10:33
each service would do a fair amount of discovery client feign type calls
Dave Syer
@dsyer
Aug 14 2015 10:33
Even the client can cause OOM with <512mb
Maybe with the new Eureka things are better (they changed the client)
But I haven't measured it
ccit-spence
@ccit-spence
Aug 14 2015 10:34
any timing on v2?
I actually thought about trying consul
waiting for something ga for consul before I try
is it better?
Dave Syer
@dsyer
Aug 14 2015 10:35
We are going to try and get milestones out soon
The new Eureka is probably a lot more friendly to use
I don't know about the memory, I haven't measured it
You mean "is consul" better?
Who knows?
It's different
Eureka has the advantage that we know Netflix use it in production
ccit-spence
@ccit-spence
Aug 14 2015 10:36
yes, didn’t know if any specs had been seen for consul
I do like eureka from a proven perspective
Dave Syer
@dsyer
Aug 14 2015 10:36
There's a milestone available if you want to try it
Zookeeper might be more reliable in production anecdotally
ccit-spence
@ccit-spence
Aug 14 2015 10:37
zookeeper seems complicated
Dave Syer
@dsyer
Aug 14 2015 10:37
But that doesn't come from anything scientific
ccit-spence
@ccit-spence
Aug 14 2015 10:38
I will just setup some test and see how the ram works with eureka
then try different test configs with consul and zookeeper. seems to be the best way to get a firm answer
mem and java are always hard to know exact, until you try
Dave Syer
@dsyer
Aug 14 2015 10:39
Make sure you test them under some load (even light load)
ccit-spence
@ccit-spence
Aug 14 2015 10:40
sure, I can generate plenty of load for them
Dave Syer
@dsyer
Aug 14 2015 10:40
Eureka works harder to cache things so it is probably going to show badly in a quiescent state
ccit-spence
@ccit-spence
Aug 14 2015 10:41
when you say caching things you mean the cache the client keeps
my understanding is each client also keeps a cache in case eureka is unreachable. Is that correct?
Dave Syer
@dsyer
Aug 14 2015 14:27
Yes