Zeebe - how to integrate microservice patterns like Circuit breaker and service discovery

In Zeebe - how to integrate microservice patterns like Circuit breaker and service discovery?
Normally we do using Spring Cloud. How can we implement Circuit breaker and service discovery with Zeebe?

Hi @shashi, to give you a specific answer, I’d need more details on your use case.

The Circuit Breaker pattern is usually used to prevent recurrent failures to remote HTTP resources from starving resources. This is especially a problem when doing peer-to-peer choreography of microservices (over REST), because there is a tight coupling between the microservices. This is a class of problem that Zeebe eliminates by orchestrating the microservices and using a gRPC pull model.

In a Zeebe system, the workers use gRPC to pull work from the broker. And they use gRPC to communicate their results back.

There is no inherent coupling between workers over REST with Zeebe.

Let’s say that all the workers for a task-type are down. What will happen is that workflows will start, but they will not complete. They will all flow to that point in the process and time-out. Incidents will be raised, and you can see them in Operate.

There is no back-pressure, so clients starting workflows will not be impacted, but the side-effects of the workflow will obviously not happen.

You could exhaust the broker resources this way if you had a high enough volume and say limited disk space.

But you will not run into the HTTP heap exhaustion problem.

If you have workers that make external API calls while doing their work, then you could implement a circuit breaker in the worker. Because workers specify how many concurrent jobs they can service, however, they will not be exposed to the entire load at once. That will be buffered on the broker.

So you will have to deal with task-workers disappearing, and task workers trying to communicate with remote resources that are down, but the circuit breaker pattern is for a different architectural design than the Zeebe broker - gRPC - task worker system.

For Service Discovery, it depends how you are running Zeebe, but you could use Hashicorp’s Consul.

1 Like

Thanks Josh for sharing the valuable information.
Let me explain you my requirement.
My company uses a legacy mainframe platform (monolithic) and they have decided to make it distributed.
I am going through multiple options to implemented distributed microservice solution and I came across the Zeebe which I liked a lot.
I am working on a presentation for my leadership team to present target state solution using Zeebe on k8s and I was trying to cover all angles so that I dont miss anything and make a strong case to use Zeebe for the target state solution in my presentation.

I think this information is very valuable. I will come with more questions as I get them.