This tutorial covers configuring Vault Enterprise performance replication between primary and secondary clusters for high-throughput, low-latency synchronization.
In this tutorial, you’ll configure Vault Enterprise performance replication between two clusters—a primary and a secondary. Performance replication streams all changes on the primary (auth methods, secrets engines, data, audit logs, etc.) to the secondary, ensuring high-throughput, low-latency synchronization.
ec2-user@ip-10-1-102-170:~$ vault login hvs.KYjTNrIdZaOPkriOuD5tfClASuccess! You are now authenticated. Future Vault clients will automatically use this token.
Enable the primary replication role:
Enabling the primary replication role will briefly make Vault unavailable. Expect a short service interruption.
Copy
Ask AI
ec2-user@ip-10-1-102-170:~$ vault write -f sys/replication/performance/primary/enableWARNING! The following warnings were returned from Vault:* This cluster is being enabled as a primary for replication. Vault will be unavailable for a brief period and will resume service shortly.
2. Enable Performance Replication on the Secondary
Authenticate to the secondary cluster:
Copy
Ask AI
ec2-user@ip-10-1-102-156:~$ vault login hvs.AVecCoMzQSmLYTQ9ufdpRAZSuccess! You are now authenticated.
Initialize the secondary with the wrapped token:
Copy
Ask AI
ec2-user@ip-10-1-102-156:~$ vault write sys/replication/performance/secondary/enable \ token=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...WARNING! The following warnings were returned from Vault:* Vault has successfully found secondary information; it may take a while to perform setup tasks. Vault will be unavailable until these tasks and the initial sync complete.
5. Replicating Auth Methods, Secrets Engines & Data
All Vault configuration changes—enabled auth methods, secrets engines, user accounts, and KV data—on the primary automatically replicate to the secondary.Example: Enable userpass auth and create a user on the primary:
Copy
Ask AI
# On primary:ec2-user@ip-10-1-102-170:~$ vault auth enable userpassSuccess! Enabled userpass auth method at: userpass/ec2-user@ip-10-1-102-170:~$ vault write auth/userpass/users/bryan \ password="bryan" policies="default"Success! Data written to: auth/userpass/users/bryan
With performance replication enabled, your secondary cluster stays in near real-time sync with the primary, providing a robust high-throughput, low-latency replication solution for read scaling and disaster recovery readiness.