Application fault tolerance in Yandex Cloud

By embedding fault tolerance and disaster recovery into your application architecture, you ensure seamless business operations even during technical incidents.

Fault tolerance best practices

We have compiled various best practices based on the hands-on experience of Yandex Cloud architects and our clients. We know how to navigate complex incidents and help clients overcome them. Now, we are sharing these proven insights so you can evaluate your applications' resilience and maintain uninterrupted operations even during outages.

How to apply our best practices

Identify critical user journeys and application dependencies.

Define your target RTO and RPO metrics.

Audit your architecture, data pipelines, monitoring, and access permissions.

Run failover and recovery testing.

Document your findings, remediate identified issues, and revalidate the system after applying changes.

Define your target RTO and RPO metrics

For each mission-critical application, define the following:

  • RTO: Maximum acceptable timeframe for the application to restore operations.
  • RPO: Maximum tolerable period of data loss.
  • Priority features: Which user-facing features must be restored first.
  • Failover governance: Who holds the authority to trigger a failover to the backup environment.

Target values depend on your specific business requirements. For instance, with mission-critical data, you can consider an RPO of no more than 15 minutes and an RTO of no more than 1 hour as an initial baseline rather than a universal standard.

Select an architectural pattern

Multi-zone application deployment

This is handy when you need to withstand the outage of one or more availability zones without complete application downtime. To ensure fault tolerance, you need to deploy your services in multiple availability zones. When choosing a configuration, it is essential to account for quorum algorithm requirements used in services such as managed databases and Managed Service for Kubernetes®. For traffic distribution, make sure to leverage load balancers, specifically NLB and ALB.

Application with a backup environment

This is useful when a single availability zone or regional outage could cause long business disruption. Consider deploying backup infrastructure in another region, on isolated Yandex BareMetal hardware, within your on-premise capacity, or at a third-party remote site. Define whether the backup environment will run as a hot standby or spin up on demand, and establish how traffic failover will be managed.

Hybrid application architecture

Connect cloud infrastructure, dedicated BareMetal servers, and on-premise capacity via a private channel. Distribute mission-critical workloads and backups in accordance with your data, performance, and recovery requirements. You can deploy Yandex Cloud Stackland within your local environment, on BareMetal hardware, or at a third-party remote site.

Audit key architectural components

Verification checklist

  • Production application instances are deployed across at least two availability zones, and across multiple zones for mission-critical systems, accounting for quorum requirements and specific service constraints.
  • Application instances, database nodes, load balancers, and supporting components are never hosted exclusively within a single availability zone.
  • Backup resources are provisioned in a separate zone rather than simply deployed as standalone virtual machines within the same infrastructure segment.
  • Automatic isolation of unhealthy instances from load balancer target pools and traffic failover to healthy components are fully configured.
  • Sufficient compute capacity headroom is provisioned to sustain production workloads during a single-zone outage.
  • Testing for single or multi-zone loss events has been performed, measuring actual recovery times and overall application impact.

Important: Distributing resources across availability zones protects against a range of zonal outages, but, on its own, it does not guarantee protection against a regional incident or a widespread provider service failure. You should additionally consider distributing workloads across multiple independent backup environments. For the full list of best practices, see this guide.

Audit key services

Verification checklist

  • For managed databases supporting multi-zone configurations, the cluster consists of at least two hosts deployed across different availability zones. Specific services carry distinct requirements, which are outlined below.
  • Managed Service for Apache Kafka® follows dedicated fault tolerance guidelines, requiring a cluster of three or more broker hosts with at least one located in each of the three availability zones. Topics are configured with a replication factor of 3 and a minimum of 2 in-sync replicas, while producers write data with the acks=all parameter.
  • Yandex MPP Analytics for PostgreSQL follows dedicated fault tolerance guidelines, accounting for the fact that the cluster resides within a single availability zone and must be restored from a backup in another zone during a zonal outage. Automated backups are verified, manual backups are created prior to major changes, and connection strings specify both the primary and standby master hosts.
  • Production systems with strict recovery time requirements utilize a high-availability cluster configuration.
  • Cluster configuration planning accounts for quorum algorithm requirements and specific MDB service constraints.
  • Automatic failover to a standby host has been verified in the event of a database primary host failure.
  • A manual failover workflow is documented in case automatic failover does not trigger.
  • The application connects to the current primary database host using the recommended connection routing method.
  • The application detects primary host promotion and automatically re-establishes connections to ensure rapid recovery after failover, accounting for the fact that read workloads are not automatically load-balanced across cluster hosts. Read replica routing is implemented on the application side.
  • Cluster backup recovery workflows and availability zone failover runbooks have been validated. Automated backups are not supported for Managed Service for Apache Kafka®, where protection against zonal outages is achieved through topic replication across brokers in three availability zones.

Important: For the complete list of best practices using PostgreSQL as an example, see this guide.

Prepare for outages

Verification checklist

  • A documented incident response plan is prepared for primary failure modes.
  • Response procedures for availability zone outages are defined, including the exact workflow for draining and removing the affected zone from load balancing.
  • A manual database primary host failover runbook is prepared. Managed databases cover three distinct recovery cases:
    • All cluster hosts reside in an unavailable zone, requiring restoration from a backup.
    • The master host failed over automatically, requiring replacement of the unavailable hosts.
    • The master host failed to switch over and the cluster is operating in read-only mode, requiring a support ticket followed by host replacement.
  • Clear criteria are established defining when to rely on automated recovery and when to perform manual interventions.
  • Assigned engineering owners and escalation workflows are specified for incident response.
  • Recovery runbooks are prepared for all cloud resources and services utilized by the application.
  • Access permissions have been verified to ensure assigned engineers hold the required privileges to perform all required recovery steps.

Important: Your recovery plan must be prepared in advance. Recovery playbooks should account for single or multi-zone outages alongside individual host and upstream dependency failures, ensuring that a single component outage does not cause prolonged application downtime.

Audit your architecture with a Yandex Cloud expert

Our team will help you identify critical failure modes, validate RTO and RPO alignment, eliminate single points of failure, and design the right recovery architecture.