github.com/argoproj/argo-events@v1.9.1/docs/eventsources/ha.md (about) 1 # EventSource High Availability 2 3 EventSource controller creates a k8s deployment (replica number defaults to 1) 4 for each EventSource object to watch the events. HA can be achieved by setting 5 `spec.replicas` to a number greater than 1. 6 7 Some types of the event sources do not allow multiple live clients with same 8 attributes (i.e. multiple clients with same `clientID` connecting to a NATS 9 server), or multiple event source PODs will generate duplicated events to 10 downstream, so the HA strategies are different for different event sources. 11 12 **Please DO NOT manually scale up the replicas, that might cause unexpected 13 behaviors!** 14 15 ## Active-Active 16 17 `Active-Active` strategy is applied to the following EventSource types. 18 19 - AWS SNS 20 - AWS SQS 21 - Bitbucket 22 - Bitbucket Server 23 - GitHub 24 - GitLab 25 - NetApp Storage GRID 26 - Slack 27 - Stripe 28 - Webhook 29 30 When `spec.replicas` is set to N (N > 1), all the N Pods serve traffic. 31 32 ## Active-Passive 33 34 If following EventSource types have `spec.replicas > 1`, `Active-Passive` 35 strategy is used, which means only one Pod serves traffic and the rest ones 36 stand by. One of standby Pods will be automatically elected to be active if the 37 old one is gone. 38 39 - AMQP 40 - Azure Events Hub 41 - Calendar 42 - Emitter 43 - GCP PubSub 44 - Generic 45 - File 46 - HDFS 47 - Kafka 48 - Minio 49 - MQTT 50 - NATS 51 - NSQ 52 - Pulsar 53 - Redis 54 - Resource 55 56 ## Kubernetes Leader Election 57 58 By default, Argo Events will use NATS for the HA leader election except when 59 using a Kafka Eventbus, in which case a kubernetes leader election will be used. 60 If using a different EventBus you can opt-in to a Kubernetes native leader 61 election by specifying the following annotation. 62 ```yaml 63 annotations: 64 events.argoproj.io/leader-election: k8s 65 ``` 66 67 To use Kubernetes leader election the following RBAC rules need to be associated 68 with the EventSource ServiceAccount. 69 ```yaml 70 apiVersion: rbac.authorization.k8s.io/v1 71 kind: Role 72 metadata: 73 name: argo-events-leaderelection-role 74 rules: 75 - apiGroups: ["coordination.k8s.io"] 76 resources: ["leases"] 77 verbs: ["get", "create", "update"] 78 ``` 79 80 ## More 81 82 Click [here](../dr_ha_recommendations.md) to learn more information about Argo 83 Events DR/HA recommendations.