sczyh30 / vertx-blueprint-microservice

Vert.x Blueprint Project - Micro-Shop microservice application

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Improve health check and fault-tolerance mechanism

a-marcel opened this issue · comments

Hi,

you're using the CircuitBreaker for the proxy services and the health check. In general it's a good idea, but the implementation is a little bit useless.

an example:

ApiGateway
ProductMicroservice
AuthMicroservice

The Microservices are independent from each other.

Case: the ProductMicroservice is not answering in the health Check for 5 times. After that, the ApiGateway CB will stop.

BUT: if one auth request is comming and pass the CB, the complete Gateway is working again.

From my point of view. Every Service should have an independed CB. otherwise the implementation makes no sence in a microservice world. One service should not shutdown the whole system.

Do you've any ideas how to implements this ?

Thanks
Marcel

Yes, I agree with you. Every service components should have an independent circuit breaker so that the failure of one service does not affect the entire system. As for implementation, I'd like to implement some wrapper functions for circuit breaker in base verticle, then call the wrap functions in each service instance. I'll try to enhance it these days (still thinking the design :-)

Regarding the health check function, that is only a trivial example. I think the service discovery component should be responsible for health check.

Any more advice about the design and implementation?

Currently, it sounds good. I'll check the implementation after it. The health check in general is good enough and everybody can adjust the check times and functionality by his own.