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

12th
Mar 2019
Ashok Koyi
@thekalinga
Mar 12 12:46
If I add eureka-server to my classpath, I have to explcitily specify @EnableDiscoveryServer but I dont have to do any such thing when it comes to eureka-client. Why is auto configuration designed this way? Can someone explain the reasoning behind this design?
Marcos Barbero
@marcosbarbero
Mar 12 12:49
When you have the eureka dependency in the application's classpath it's most likely for it to be an eureka-client and it makes more sense to be auto-configured out of the box, in the other hand, it's not always that you want an application to be an eureka-server so it makes more sense to have an explicit configuration to do so.
Ashok Koyi
@thekalinga
Mar 12 12:55
Why would anyone want to have eureka-server in the classpath & not have eureka server enabled?
Spring boot's autoconfiguration magic exists for this reason specifically
Is it because its eureka-server is heavy weight when compared to eureka-client?
The core of my question is the rationale behind enabling Marker classes for some cases, but not others. What are the rule of thumbs used behind this decision
@spencergibb Any idea?
Marcos Barbero
@marcosbarbero
Mar 12 13:15
You're right, now there's specific starters for each of eureka's components, a while ago you could use the same starter for either a client or a server and that would make sense for one of them to be explicit configured.
Ashok Koyi
@thekalinga
Mar 12 13:22
Sure. Thats true. But thats not the aspect of the question I am trying to understand. Only clients are autoconfigured. But server requires explicit config. Question is why
Marcos Barbero
@marcosbarbero
Mar 12 13:24
Here you can find why @EnableDiscoveryClient is optional spring-cloud/spring-cloud-commons#218, not sure the server though
Ashok Koyi
@thekalinga
Mar 12 13:28
Thanks for that reference. It was slightly helpful. Its what our intuition tells us. Why not even for server. There is an issue open for spring-cloud/spring-cloud-commons#246 aswell
Marcos Barbero
@marcosbarbero
Mar 12 13:32
Maybe it was never a requirement? I mean, @EnableDiscoveryClient evolved to be optional because of community/devs feedback, maybe that was never the case for server
Ashok Koyi
@thekalinga
Mar 12 13:33
Sure.. That looks more probable. Thanks.. Will wait for confirmation from someone from the team on this so that we know for sure thats the reasoning,
But then again, why not even for server (sure eureka-client is added to every micro service & eureka-server will only be declared once in the whole micro services architecture)
Ashok Koyi
@thekalinga
Mar 12 13:49
One additional reason could be attempting to start eureka-server automatically might conflict with the endpoints the micro service would attempt to expose
eureka-server by default uses / to expose its dashboard & also /eureka endpoint for all API access
May be this might be another reason rather than not having sufficient demand from developers
Ashok Koyi
@thekalinga
Mar 12 15:01
Whats the difference between vip address vs application name vs service id in eureka server?
Spencer Gibb
@spencergibb
Mar 12 18:48
We want servers to be explicitly run. Eureka and config sesrver
Keerthikanth
@Keerthikanth87_twitter
Mar 12 20:01
Hi I am having issues in fetching out of box applications in SCDF [ Spring CLoud Data Flow ]. Is anybody there to reply my request ?
Spencer Gibb
@spencergibb
Mar 12 20:11
@Keerthikanth87_twitter from where? repo.spring.io is having issues today