I have a question about Netflix Eureka and Blue\Green Pattern....
Recently I wrote a blog about Micro Services and Transactions, there I tried to cover the topic of the of Blue\Green pattern but I have a question about the subject.
I try to start my Service in 'OUT_OF_SERVICE' mode with the following configuration
eureka:
instance:
initialStatus: OUT_OF_SERVICE
instanceEnabledOnit: false
Initially everything is OK, the service starts with OUT_OF_SERVICE and with the JSON interface of the Eureka I like to convert Service to 'UP' state. The problem is, I also have Health Check functionality implemented for my service (a class implementing 'HealthCheck' interface automatically detected and registered by Eureka), this HealthCheck functionality overwriting my 'OUT_OF_SERVICE' status and taking the service to UP state before I can intervene with 'Blue\Green' pattern.
HealtCheck interface of Eureka does not give me the information about the actual state of the service, so I can't check before it is 'OUT_OF_SERVICE' or not and actually I was expecting that it can go from OUT_OF_SERVICE to UP (a state transition from DOWN to UP is understandable but I was OUT_OF_SERVICE for me means I don't want to run this service).
You can find the detailed discussion here 'https://mehmetsalgar.wordpress.com/2016/11/05/micro-services-fan-out-transaction-problems-and-solutions-with-spring-bootjboss-and-netflix-eureka/#blue_green'.
So my question is how to have 'blue\green' pattern and the same time have the 'HealthCheck' functionality.
Thx for answers