Active-Passive Setup

High availability (HA) is critical in many applications, ensuring minimal downtime and continuous operation. One common approach to achieving HA is the active-passive setup, also known as a failover system. This configuration involves one active node handling all incoming requests and one or more passive nodes standing by, ready to take over if the active node fails. This post will look at the complexities of active-passive setups, providing a detailed understanding of their architecture, implementation, and considerations.

Understanding the Active-Passive Architecture

In an active-passive setup, only one node is active at any given time. This active node processes all user requests and manages the application’s functionality. The passive node(s) remain idle, mirroring the active node’s state (database replication, configuration synchronization, etc.) but not processing any requests directly. If the active node experiences a failure (hardware failure, software crash, network outage), a failover mechanism activates the passive node, seamlessly transferring operations and minimizing downtime.

Here’s a simplified Diagram illustrating the basic architecture:

graph LR
    A[Active Node] --> B(User Requests);
    A --> C[Shared Storage/Database];
    P[Passive Node] --> C;
    subgraph "Failover"
        P -.-> A;
        style P fill:#f9f,stroke:#333,stroke-width:2px
    end
    style A fill:#ccf,stroke:#333,stroke-width:2px

This diagram shows the active node (A) handling user requests and accessing a shared storage or database (C). The passive node (P) also connects to the shared storage, keeping its data synchronized. The dashed arrow indicates the failover process.

Implementing Active-Passive: Key Components

A successful active-passive setup relies on many important components:

Advanced Considerations

More Complex Active-Passive Setup

Let’s illustrate a more complex setup incorporating a load balancer:

graph LR
    subgraph "Load Balancer"
        LB[Load Balancer]
    end
    LB --> A[Active Node];
    LB --> P[Passive Node];
    A --> C[Shared Storage/Database];
    P --> C;
    subgraph "Failover"
        LB -.-> P;
    end
    style A fill:#ccf,stroke:#333,stroke-width:2px
    style P fill:#f9f,stroke:#333,stroke-width:2px

Here, a load balancer distributes traffic to the active node. In case of failure, the load balancer detects the issue and redirects traffic to the passive node.