Tag: Disaster Recovery

  • AWS Disaster Recovery Setup: Pilot Light Strategy 

    AWS Disaster Recovery Setup: Pilot Light Strategy 

    By Rimpi Mathur, Technical Architect

    In today’s fast-moving world full of unforeseen events, it becomes crucial for businesses to bounce back quickly after a failure. It is a good practice to set up a disaster recovery (DR) environment for your business to be back online in minimum time and data loss. Here we discuss how AWS can help you prepare for inevitable risks and reduce loss. 

    While setting up DR there are two main objectives: 

    • Recovery Time Objective (RTO): The maximum acceptable downtime. 
    • Recovery Point Objective (RPO): The maximum acceptable data loss. 

    There are four different strategies provided by AWS, and you can choose the one that best fits your needs. 

    1. Backup and Restore 
    1. Pilot Light 
    1. Warm Standby 
    1. Multi-site 

    We are going to set up a multi-region DR environment using Pilot Light strategy. 

    The set up includes: 

    • Virtual Private Cloud (VPC) 
    • EC2 instances 
    • Aurora Global database 
    • Elastic cache (Redis) 

    In Pilot Light strategy the Aurora global database replicates data from the live region (region 1) to a local read-only cluster in the recovery region (region 2) but the services are idle in region 2. 

    Diagram showing AWS Pilot Light strategy with active infrastructure in one region and minimal standby resources in another.

    Follow These Steps to Recovery

    1. Copy AMIs (Amazon Machine Image) from region 1 to region 2. This helps in creating new instances in region 2 with the latest information on the instance in region 1. 
    2. Confirm hourly backup snapshots of the data have been copied to region 2. 
    3. Spin up new EC2 instances using the AMIs. 
    4. Remove the secondary cluster (region 2) from the Aurora global database, doing so promotes the cluster to full read/write capability. Now, create a new Aurora global database with the newly promoted cluster (region 2) as the primary cluster and add region 1 to the new database. This creates a new secondary cluster at region 1. 
    5. Modify your application to use the newly promoted DB cluster. 
    6. Create a new redis cluster in region 2 and update the redisson.yaml file. 
    7. Verify all connections are working. 
    8. Update Route53 entries – Change A record to point to region 2 load balancer. 

    You are live in DR.

    Bounce back quickly with a disaster recovery (DR) environment for your business, and ensure minimum time and data loss. If you need assistance with next steps, don’t hesitate to contact us using the form below. Read more AWS Technical Blogs here, and learn about TekStream AWS Services here.

  • Splunk Disaster Recovery Architecture

    Splunk Disaster Recovery Architecture

    By Brent Mckinney, Senior Splunk Consultant and Jon Walthour, Technical Architect

    This blog proposes a comprehensive architecture for implementing Disaster Recovery (DR) in Splunk Enterprise running on AWS. This example includes setting up two multi-site SmartStore indexer clusters, and a single search head cluster stretched across two AWS regions. Our SmartStore objects will be s3 buckets in AWS. This 2-region solution ensures uninterrupted search and indexing capabilities in the case that one of the regions become unavailable.

    Let’s start with our indexer tier.

    Diagram showing Splunk indexer cluster replication between Region 1 and Region 2 (Disaster Recovery). Indexers in three availability zones in each region are connected via S3 buckets using cross-region replication.

    For our indexer tier, we have two unique multi-site indexer clusters each belonging to a separate region. For the implementation stage, this means building TWO individual indexer clusters separate from each other. The “sites” will be the availability zones in each region, so region 1 will have 3 sites (AZ 1, AZ 2, and AZ 3) and likewise in region 2. Each cluster will also be SmartStore enabled, having their own external S3 bucket.

    Note: Indexers with SmartStore enabled will offload Splunk buckets to S3 once they roll from hot to warm. From there, retention is managed within S3. Before enabling SmartStore, we first need to create an S3 bucket in AWS and ensure read/write capabilities from the splunk indexers. See AWS documentation for details on S3 bucket creation and permissions.

    We first need to adjust server.conf on the Cluster Manager node. Because this is a multisite cluster, buckets being migrated need to be able to identify the origin and replicate across all sites. We can accomplish this by setting the following on the Cluster Manager node:

    server.conf
    
    [clustering]
    contrain_singlesite_buckets=false 
    
    

    To enable SmartStore on our indexers, we need to update indexes.conf in the indexes app under $SPLUNK_HOME/etc/manager-apps.
    indexes.conf

    [volume:smartstore]
    storageType = remote
    path = s3://<name_of_s3_bucket>
    remote.s3.access_key = <s3_access_key>
    remote.s3.secret_key = <s3_secret_key>
    remote.s3.endpoint = http|https://<s3_host_url>
    
    [default]
    remotePath = volume:smartstore/$_index_name
    repFactor = auto
    

    The first stanza [volume:smartstore] contains the configurations to point and authenticate to the S3 bucket. The [default] stanza configs here point the remote path to this SmartStore volume and sets the replication factor to auto to enable replication of Splunk buckets.

    The above configuration additions need to happen on BOTH indexer clusters, as they are still technically separate, and unaware of each other. Before configuring the DR piece of the solution, we need to have 2 standalone multi-site indexer clusters with SmartStore enabled, in a healthy state.

    Disaster Recovery

    The DR solution comes into play by enabling AWS Cross Region Replication from the S3 in region 1 to region 2. Once data is offloaded from the Splunk indexers to the S3 bucket in region 1, AWS then replicates that data to the S3 bucket in region 2.

    In region 2, the indexers will utilize S3 for searches that require warm data retrieval during search operations, which will now contain data that has been replicated from region 1 – up to a 15 min delay per AWS SLAs. This allows data to be highly searchable in the case that the indexer cluster and/or S3 bucket in region 1 becomes unavailable.

    The idea here is that if region 1 becomes unavailable, users can query the indexers in region 2 and still see data that was indexed in region 1. Splunk SmartStore paired with AWS Cross Region Replication allows for this disaster recovery architecture.

    Search Tier

    Diagram illustrating a Splunk search head cluster setup across two regions. Each region (Region 1 and DR) includes three availability zones with interlinked search head nodes, showing cluster-level synchronization.

    For the search tier, we have a stretched search head cluster across both regions. The reason we want to have this as a single cluster, rather than broken out into 1 per region like the indexers, is to allow for easy replication of knowledge objects. This will ensure that user content created in region 1 is easily accessible in the case that users need to log into region 2.

    From a technical standpoint, Splunk does not allow for members of a single search head cluster to have different search peers, the search peers must be consistent across all members. To ensure that search heads in region 1 are only peered to indexers region 1, and likewise for region 2, we can utilize DNS names for the indexers, so that each search head points to the same name but resolves to it’s local indexers per the DNS rules in each region.

    This will satisfy the technical need for all Splunk Search Heads to have a consistent list of the same search peers across both regions, but behind the scenes only dispatching searches to the indexers in the same region as the search head.

    Architecture

    Overall, this is the high-level architecture that can be implemented to ensure HA between both Search Heads and Indexers.

    Full Splunk DR architecture diagram combining search head and indexer clusters across Region 1 and DR. Includes load balancer at the top directing traffic, DNS routing for search heads to local indexers, and S3 buckets facilitating index replication between regions.

    We hope this has provided the overview that will help you build your own disaster recovery architecture. Contact us if you need additional information. Happy Splunking!