Vault Deployment Architecture · Topic 3 of 3

Disaster Recovery and Performance Replication

Vault Associate 003: Enterprise performance replication for scale versus DR replication for fault tolerance, and how tokens and leases differ.

  • 4 min
  • Includes a diagram
In a nutshell
  • Replication needs Vault Enterprise or the HCP Vault Dedicated Standard tier, where HashiCorp manages cross-region DR.
  • Performance replication scales reads and lowers latency, and its secondaries serve clients.
  • DR replication protects against losing a whole cluster, and its secondary serves nothing until promoted.

What it is

Replication copies data from one Vault cluster to others. It needs a Vault Enterprise license or an HCP Vault Dedicated Standard tier cluster. You only need the concept for the exam, not the setup steps.

There are two types, and they solve different problems. Performance replication is about scaling. Disaster recovery (DR) replication is about fault tolerance.

Primary clustersystem of recordasynchronousSecondary cluster 1Primary clustersystem of recordasynchronousSecondary cluster 2

How it works

Primary and secondary

A primary cluster is the system of record. It replicates data asynchronously to one or more secondary clusters. The storage backend must support transactional updates, and integrated storage and Consul do.

Performance replication

Performance secondaries serve client requests locally. That reduces latency and lets Vault scale with the number of secondaries.

Configuration, policies and supporting secrets such as KV values and transit keys are shared. Each secondary keeps its own tokens and leases, which are not copied from the primary. A request that changes shared state is forwarded to the primary without the client noticing.

If the link to the primary is lost, reads of replicated data still work but may be stale, and writes to replicated data fail until it returns. Transit encryption and decryption keep working, because the keys are already replicated.

Disaster recovery replication

A DR secondary is a warm standby for a whole cluster. It does not serve client requests until it is promoted to primary.

DR replication mirrors configuration, backends, and also the tokens and leases. After promotion, applications can keep working because their tokens and leases already exist on the new primary.

Primary failsOperator promotesDR secondaryNew primaryexisting tokens still valid

Side by side

A primary replicates asynchronously to a DR secondary, which mirrors tokens and leases and takes no client requests until promoted, and to a performance secondary, which serves nearby clients, keeps its own tokens and leases and forwards shared writes.

CapabilityDisaster recoveryPerformance replication
Mirrors configuration and backendsYesYes
Mirrors tokens and leasesYesNo, each secondary tracks its own
Secondary handles client requestsNo, not until promotedYes
Main purposeFault toleranceScaling and lower latency
Mirrors local mountsYesNo, local mounts on the primary are not visible to secondaries
Serves clients while disconnected from the primaryNoPartly, as described above

A local mount, created with the -local flag, stays on the cluster where it was created and its DR secondaries. On a performance secondary it is not visible to the primary, and the reverse is also true.

Choosing between them

Start from the requirement in the question. If it says scale, latency, or serving users near a remote site, the answer is performance replication. If it says survive the loss of a data center, failover, or keep existing tokens working, the answer is DR replication.

Replication is not the same as HA

High availability is inside one cluster: an active node and standbys that share storage. Replication links separate clusters, each with its own storage. A related Enterprise feature, performance standbys, lets standby nodes in one cluster answer read requests locally.

How the exam asks about this

  • "An organization needs users in several regions to read secrets with low latency." Performance replication.
  • "The primary data center is lost. Applications must continue with their existing tokens and leases." Disaster recovery replication.
  • "A client sends a request to a DR secondary before any promotion." The DR secondary does not handle it, because only a promoted cluster serves clients.

What to remember for the exam

  • Replication needs Vault Enterprise or the HCP Vault Dedicated Standard tier, where HashiCorp manages cross-region DR.
  • Performance replication scales reads and lowers latency, and its secondaries serve clients.
  • DR replication protects against losing a whole cluster, and its secondary serves nothing until promoted.
  • DR mirrors tokens and leases. Performance secondaries keep their own.
  • Performance secondaries forward requests that change shared state to the primary.
  • Remember "scaling versus fault tolerance" as the one-line distinction.
Watch out

Do not pick DR replication to reduce read latency. A DR secondary does not answer client requests, so it adds no read capacity.

Common mistakes

Mixing up which type copies tokens. Only DR replication mirrors tokens and leases. After a performance secondary is promoted, applications must authenticate again and obtain new leases.

Treating replication as Community Edition functionality. Replication needs Vault Enterprise or an HCP Vault Dedicated Standard tier cluster. A Community Edition cluster cannot be a replication primary or secondary.

Calling a performance standby a performance secondary. A performance standby is a node inside one cluster that serves reads. A performance secondary is a whole separate cluster.

Check yourself

  • Which replication type lets a secondary cluster answer client requests?

    Performance replication. A DR secondary only serves clients after it is promoted.

  • Why can applications keep their tokens after a DR failover?

    DR replication mirrors tokens and leases to the secondary, so they already exist on the promoted cluster.

  • A company wants faster reads in a distant region. Which type, and why?

    Performance replication, because the local secondary serves reads and each secondary scales capacity with its own tokens and leases.

Topic 3 of 3 in Vault Deployment Architecture

Test yourself on Vault Deployment Architecture

The full HashiCorp Vault Associate 003 question bank has 600 questions, with timed practice exams and an explanation for every answer.

This study guide is independent and is not affiliated with, endorsed by, or sponsored by HashiCorp. Vendor names, certification names and exam codes are trademarks of their respective owners and are used for identification only.