DR implementation: Event Hubs
Tier: T0 for incident ingestion, T1 and T2 for the other namespaces. Event Hubs takes high-volume streams from the customer environments and from internal producers.
Current configuration (prd)
| Namespace | SKU | Zones | Notes |
|---|---|---|---|
evhns-rome | Standard, capacity 4, auto-inflate | Zone-redundant | Main ingestion namespace |
evhns-hrlsm | Standard | Zone-redundant | |
evhns-athas | Standard | Zone-redundant | |
evhns-albff | Standard | Zone-redundant | Alya BFF |
Consumers keep their position as checkpoints in a storage account. The checkpoint store is part of the recovery path. See Storage.
Failure scenarios
| Scenario | Behaviour | Recovery | RTO and RPO |
|---|---|---|---|
| Zone loss | No data loss. Clients reconnect | Automatic | Seconds to minutes. RPO 0 |
| Consumer down | Events stay in the hub for the retention window | Recover the consumer. It resumes from its last checkpoint | Consumer RTO. RPO 0 within retention |
| Consumer down for longer than the retention | Events are lost from the hub | Ask the producers to resend, if they can | Data loss outside retention |
| Bad consumer writes bad data downstream | Corrupt downstream state | Fix the consumer. Reset the checkpoint to an earlier time inside retention and reprocess. Downstream handlers must be idempotent | Minutes to hours |
| Checkpoint store lost | Consumers restart from their configured start position, which is the earliest or latest event | Restore the checkpoint store, or start from an agreed time and rely on idempotency | Minutes |
| Hub or namespace deleted | Ingestion stops. Events in the hub are lost | Recreate from Terraform. Producers reconnect | Under an hour. Events in the hub are lost |
| Throughput limit reached | Producers are throttled | Auto-inflate raises capacity on evhns-rome. Raise the maximum if needed | Minutes |
Recovery procedures
Reprocess from a point in time
Owner: Owning service team
Stop the consumer. Set its checkpoints to the chosen start time, inside the retention window. Restart it and watch for duplicates and the downstream throttling.
Recreate a namespace or hub
Owner: CPE
Re-run the Terraform, including the consumer groups and the authorization rules or role assignments. Producers that use the namespace FQDN reconnect without any change.
Rules
- T0 namespaces MUST be zone-redundant and MUST have a
CanNotDeletelock. - Retention on T0 hubs MUST be longer than the T0 RTO, so that a consumer outage during a recovery loses nothing.
- The checkpoint stores of T0 consumers MUST be on ZRS storage.
- Consumers MUST be idempotent, so that checkpoint resets are safe.