Answers: <p>This is something you'd have to build. Kubernetes doesn't natively offer this as a pattern.</p>
  
  <p>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 <a href="https://nats.io" rel="nofollow noreferrer">Nats</a> 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.</p>
  
Answers: CC BY-SA 4.0
Answers: 2018-10-31T02:51:16.397Z
Answers: 2018-10-31T02:51:16.397Z
Answers: marcc
Body: <p>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?</p>
  
  <p>Obviously only one instance can reply, so I am skeptical if this is possible.</p>
  
  <p>Alternatively, is there a way for when one of the instances receives the request, to communicate it to the others?</p>
  
Tags: <kubernetes>
Title: Route webhook to all replicas
UserDisplayName: Sarke
ThreadText: # Route webhook to all replicas
  
  (Asked by: username_0 on 2018-10-24)
  
  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?
  
  **Tags:** kubernetes
  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_1 on 2018-10-31. Score: 1 | Accepted answer
  
  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](https://nats.io) 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.
  
  
  ---
  
  