Building Resilient Systems in Snowflake
Instruction: Explain how you would design a system within Snowflake to ensure high availability and disaster recovery.
Updated
Official answer
Design for named failures: a failed query/connection, warehouse capacity loss, logical data corruption, and a regional outage require different responses. Define measurable recovery-time and recovery-point objectives for each critical workload.
Within a region, use appropriate workload isolation and capacity settings, plus clients that reconnect and handle uncertain outcomes. Extra warehouse clusters can improve capacity/availability options, but do not promise that every in-flight statement continues transparently after a failure. Retrying a write requires idempotency or reconciliation.
For regional recovery, configure supported replication/failover groups and destination accounts, with the necessary edition and object coverage. Include users/roles, integrations, keys, external storage and network/client routing. Measure successful refresh age; a schedule alone does not establish a bounded recovery point.
The runbook should identify the decision-maker, stop conflicting writers, assess replica freshness, promote and redirect clients, then verify data and application operations. Reconcile missed or repeated ingestion. Failback needs the same controlled synchronization and validation.
Keep a separate response for logical mistakes using eligible historical data or protected recovery artifacts. A replicated bad update may exist on both accounts, and Fail-safe is not an instant self-service restore.
Run drills covering unavailable dependencies and partial recovery, record actual RTO/RPO, and correct gaps. Monitor health with suitable low-latency signals; delayed usage views alone cannot guarantee timely incident detection.