0

Normally a request gets routed to one of the replicas. However, if each instance need to take some action when a webhook request comes in, how can I route the request to all replicas?

Obviously only one instance can reply, so I am skeptical if this is possible.

Alternatively, is there a way for when one of the instances receives the request, to communicate it to the others?

1

This is something you'd have to build. Kubernetes doesn't natively offer this as a pattern.

There are a few approached you can take, but a common on is to use a queue that has this functionality. I'd suggest starting with Nats because it's a CNCF project that is easy to run natively in Kubernetes. When one of your replicas receives the request, it can post a message to the queue that can deliver the message to every subscriber.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.