SteeltoeOSS / Steeltoe

Steeltoe .NET Core Components: CircuitBreaker, Configuration, Connectors, Discovery, Logging, Management, and Security
https://steeltoe.io
Apache License 2.0
985 stars 160 forks source link

Service discovery endpoint - online/offline service instances #131

Open jkonicki opened 4 years ago

jkonicki commented 4 years ago

Provide Blue/Green deployments through endpoint. Use the endpoint to set registered instances to offline. For Eureka and Consul.

TimHess commented 4 years ago

This functionality is provided in Spring via the service-registry endpoint: https://github.com/spring-cloud/spring-cloud-commons/blob/master/spring-cloud-commons/src/main/java/org/springframework/cloud/client/serviceregistry/endpoint/ServiceRegistryEndpoint.java

cesinhaugusto commented 4 years ago

@TimHess I'd like to tackle this one

TimHess commented 4 years ago

Sounds good, have at it!

jkonicki commented 4 years ago

@cesinhaugusto We are happy to have the help. Let us know if there are any questions or if you have any issues getting started on this task. Thanks.

cesinhaugusto commented 4 years ago

@jkonicki Good to know that, because I'll probably need it a lot hahaha. I took some time to study Steeltoe a little bit more and get to know the project better in order to be able to make meaningful contributions.

In this specific issue, I'd like to ask you guys if the goal is to just create an Endpoint class, similar to the Spring one that @TimHess mentioned above, and add it to the EurekaBase library.

Initially, I thought that the goal was to prepare Steeltoe to completely handle Blue/Green deployments, but after further research, I understood this is responsibility of the platform, not the library. Am I correct?

TimHess commented 4 years ago

Yeah, this is basically "make blue/green relatively easy or at least straightforward" but not like a 360 degree solution, so some form of platform or external tooling support would be expected.

I didn't get extremely far in exploratory work here, but I was expecting the bulk of the work to be done in Management in the form of a service-registry actuator... Ideally there would be little to no work required in either of the Discovery client libraries, but I'm not positive that's the case. IServiceRegistry has the methods needed, but it looks like it's only used by Consul at the moment

cesinhaugusto commented 4 years ago

I see. This is a little more complex than I anticipated then. I'll learn more about Management and try to come up with a draft for this and return to get your opinion/suggestions.

TimHess commented 4 months ago

Investigation will happen in m1 release, currently unclear if implementation will happen at the same time