Slack Bot Multi-Region Failover & High-Availability Prompt
Design an active/standby or active/active Slack bot across regions — event de-duplication, single-writer coordination, Socket Mode failover, and clean cutover.
- Target user
- SREs running business-critical Slack bots that must survive a regional outage
- Difficulty
- Advanced
- Tools
- Claude, ChatGPT, Cursor
The prompt
You are a resilience-focused SRE who runs Slack bots that page on-call and trigger deploys, and must keep them up through a full regional failure. I will provide: - The bot's responsibilities (alerts, ChatOps commands, approvals, deploys) - Current topology (Socket Mode or HTTP Events, regions, datastore) - RTO/RPO targets and the blast radius of a duplicate action - Coordination primitives available (Redis, DynamoDB, etcd, Consul) Your job: 1. **Choose a model** — active/standby (one region processes, other warm) vs active/active (both process, dedup downstream). Give the trade-offs against the RTO/RPO and the duplicate-action risk. 2. **Idempotency** — dedup every inbound event on `event_id` (and `client_msg_id` for messages, `trigger_id` for interactivity) via a shared store with TTL; show the check-and-set that guarantees exactly-once side effects even under Slack's 3x retry. 3. **Single-writer coordination** — a distributed lease (e.g. Redis SETNX with TTL, or DynamoDB conditional write) so only one region holds the "active" role for side-effecting actions; define lease renewal, expiry, and takeover. 4. **Socket Mode failover** — how multiple Socket Mode connections behave (Slack load-balances across them), how to run a standby that connects only on promotion, and the HTTP-endpoint equivalent (health-checked regional URLs behind a failover DNS / global LB). 5. **State & continuity** — replicate the datastore cross-region, handle in-flight modals/approvals during cutover, and reconcile actions that were mid-flight when the primary died. 6. **Failover testing** — a game-day plan: kill the primary region, assert no duplicate posts/deploys, measure actual RTO, and verify auto-failback. Output: (a) model recommendation with rationale, (b) idempotency design with the CAS snippet, (c) lease/lock protocol with timings, (d) Socket Mode + HTTP failover topology, (e) state-replication and in-flight reconciliation plan, (f) game-day runbook and success metrics. Correctness beats availability for side-effecting actions: prefer a brief gap over a duplicate deploy or a double page.
Run this prompt with AI
Test it, get an AI-improved version, or compare models — live in the Prompt Workspace. No copy-paste.
Related prompts
-
Slack Outage Resilience & Graceful Degradation Prompt
Design fallback paths for when Slack itself is degraded or down — so alerts, approvals, and incident comms don't silently fail when your primary ChatOps surface is unavailable.
-
Slack Socket Mode Reconnect & Event Ordering Prompt
Design resilient Socket Mode reconnection, in-flight ack handling, and event-ordering guarantees so an ops bot survives WebSocket churn without dropping or duplicating events.
-
Slack Bolt Middleware Pipeline Design Prompt
Architect a clean, testable middleware chain for a Bolt app — auth context, tenant resolution, rate limiting, error boundaries, and structured logging — so handlers stay thin and reusable.
-
Slack Socket Mode vs HTTP Architecture Prompt
Decide between Socket Mode and HTTP request URLs for a Slack app, then design the chosen architecture for reliability, scaling, and clean local development.
More Slack prompts & error guides
Browse every Slack prompt and troubleshooting guide in one place.
Reading prompts? Get all 500 in one free PDF
500 battle-tested, copy-paste AI prompts engineered by a senior systems engineer — every one with fill-in placeholders and safety/back-out notes. Drop your email and it's yours.
- 500 prompts: Linux · Kubernetes · Terraform · OpenStack · GitLab · Docker · Monitoring · Incident Response
- Instant PDF download — yours free, forever
- Plus one practical AI-workflow email a week (no spam)
Single opt-in · unsubscribe anytime · no spam.