게시 2026-12-02Published 2026-12-02AWS Core읽는 시간 12분12 min read직접 테스트: 서울 리전(소스)과 도쿄 리전(복구), 소스 서버 1대와 Multi-AZ 볼륨 2개, 복제 경로 2가지(공인 IP, VPC 피어링), AZ 전환 6회, 복구 훈련(드릴) 6회Tested first-hand: Seoul Region (source) and Tokyo Region (recovery), 1 source server with 2 Multi-AZ volumes, 2 replication paths (public IP, VPC peering), 6 AZ switches, 6 recovery drills

AWS Elastic Disaster Recovery의 EBS Multi-AZ Volumes 지원EBS Multi-AZ Volumes support in AWS Elastic Disaster Recovery

EBS Multi-AZ 볼륨으로 AZ를 옮긴 인스턴스도 AWS Elastic Disaster Recovery(DRS)가 같은 소스 서버로 계속 복제합니다. 그래서 AZ 전환 뒤에 에이전트를 다시 설치하거나 초기 동기화를 다시 기다리지 않아도 됩니다. 하지만 전환 직후에는 재스캔이 끝나고 새 복구 시점이 생길 때까지 복구 리전의 복구 시점이 전환 전에 머뭅니다. 2026년 11월 30일에 발표된 이 지원을 서울 리전을 소스로, 도쿄 리전을 복구 리전으로 구성해 직접 테스트해 보았습니다. 복제 경로는 NAT 게이트웨이와 공인 IP, VPC 피어링과 프라이빗 IP 두 가지로 구성했고 전환 뒤의 동작은 두 경로에서 같았습니다. AZ를 여섯 번 전환하는 동안 DRS는 매번 재스캔을 거쳐 2분 21초에서 4분 48초 뒤에 연속 복제로 돌아왔습니다. 대기 인스턴스로 처음 넘어가는 전환에서는 볼륨 전체를 다시 보냈고 그 직후에 시작한 복구 훈련(드릴)은 전환 전 스냅샷으로 복구됐습니다. AZ 장애와 리전 장애가 몇 분 간격으로 겹치는 경우까지 대비한다면 이 구간을 계획에 넣어야 합니다.AWS Elastic Disaster Recovery (DRS) keeps replicating an instance as the same source server after it moves to another AZ on EBS Multi-AZ volumes. So you do not reinstall the agent or wait for a new initial sync after an AZ switch. However, right after the switch the recovery point in the recovery Region stays before the switch until the rescan ends and a new recovery point exists. I tested this support, announced on November 30, 2026, with the Seoul Region as the source and the Tokyo Region as the recovery Region. I set up the replication path in two ways, through NAT gateways to a public IP and over VPC peering to a private IP, and the behavior after a switch was the same on both. Across six AZ switches DRS rescanned every time and returned to continuous replication after 2 minutes 21 seconds to 4 minutes 48 seconds. The first move to the standby instance sent the whole volumes again, and a recovery drill started right after it recovered from the snapshot taken before the switch. If you plan for an AZ failure and a Region failure a few minutes apart, this window belongs in the plan.

#AWS Elastic Disaster Recovery#Amazon EBS#Multi-AZ#Disaster Recovery#Failover#VPC Peering

AZ를 옮겨도 같은 소스 서버로 복제되는 인스턴스

EBS Multi-AZ 볼륨은 가용 영역(AZ) 장애에는 대비하지만 리전 전체의 장애에는 다른 리전으로 가는 복제가 따로 필요합니다. AWS는 2026년 11월 30일에 AWS Elastic Disaster Recovery(DRS)가 Multi-AZ 볼륨의 페일오버 뒤에도 같은 소스 서버를 계속 복제한다고 발표했습니다.

이 지원으로 AZ 전환과 리전 DR을 한 구성으로 이을 수 있습니다. AZ 장애는 EBS의 동기 복제로 넘기고 리전 장애에는 DRS가 다른 리전에 쌓아 둔 복구 시점으로 대비합니다. 인스턴스가 다른 AZ의 대기 인스턴스로 바뀌어도 소스 서버 ID와 시작 설정이 유지되므로 에이전트를 다시 설치하거나 초기 동기화를 다시 기다리지 않습니다.

서울 리전의 두 AZ에 둔 소스 인스턴스와 중지된 대기 인스턴스, 두 AZ에 동기 복제되는 Multi-AZ 루트 볼륨과 데이터 볼륨, 소스 인스턴스의 DRS 에이전트가 도쿄 리전의 복제 서버로 연속 복제하는 경로, 도쿄의 스냅샷에서 시작하는 드릴 인스턴스를 그린 구성도와 두 계층의 보호를 비교한 표, 테스트 순서
그림 1. 서울의 두 AZ와 도쿄의 복구 구성, 두 계층의 보호, 테스트 순서

하지만 두 계층이 이어지는 순간에는 공백이 있습니다. 전환 뒤에 DRS는 볼륨을 재스캔하고 재스캔이 끝나 새 스냅샷이 생길 때까지 복구 리전에서 복구할 수 있는 시점은 전환 전에 머뭅니다. 조건도 있습니다. 루트 볼륨이 Multi-AZ여야 하고 대기 인스턴스가 그 루트 볼륨으로 부팅해야 합니다.

Multi-AZ 볼륨 자체의 동작과 지연 시간은 앞선 글에서 다뤘습니다. 이 글에서는 서울 리전의 인스턴스를 도쿄 리전으로 복제하는 구성을 두 번 만들었습니다. 한 번은 복제 데이터를 NAT 게이트웨이와 공인 IP로 보냈고 한 번은 VPC 피어링과 프라이빗 IP로 보냈습니다. 구성마다 AZ를 세 번 전환하고 도쿄에서 드릴을 실행했습니다. 드릴은 복구 리전의 복구 시점으로 인스턴스를 띄워 실제로 복구되는지 확인하는 훈련입니다. 남은 것은 전환 뒤에 복구 리전의 보호가 얼마 만에 회복되는가입니다.

01

준비물과 전제

DRS 사용 설명서의 요건과 이 테스트의 구성을 나란히 정리했습니다.

항목문서의 요건이 테스트
소스 인스턴스Nitro 기반. 루트 볼륨과 에이전트 파일이 있는 볼륨(Linux는 설치 폴더, 드라이버 상태 폴더, /boot)이 Multi-AZm7i.large, Amazon Linux 2023(kernel 6.1). 루트와 데이터 볼륨 모두 gp3 Multi-AZ 10GiB
대기 AZ에이전트 파일이 있는 볼륨은 루트 볼륨과 같은 대기 AZ두 볼륨 모두 활성 2a, 대기 2b
권한소스와 대기 인스턴스 모두 AWSElasticDisasterRecoveryEc2InstancePolicy가 연결된 인스턴스 프로파일같은 프로파일을 두 인스턴스에 지정
네트워크소스에서 복구 리전의 DRS와 S3로 TCP 443, 복제 서버로 TCP 15001차는 AZ마다 NAT 게이트웨이, 복제 서버의 보안 그룹은 NAT 주소 두 개만 허용. 2차는 복제 데이터만 VPC 피어링으로 전송
에이전트설치 옵션 --multi-az-enabled-volumesAWS Replication Agent 6.47.24, 인스턴스 프로파일 자격 증명으로 설치

표 1. 문서의 요건과 테스트 구성. 인스턴스 정책에는 이번에 추가된 drs:RebindSourceServer 권한이 들어 있습니다

NAT 게이트웨이를 AZ마다 둔 이유는 대기 AZ의 인스턴스도 도쿄로 나가는 경로를 따로 갖게 하기 위해서입니다. 한 AZ의 NAT에 의존하면 그 AZ에 장애가 났을 때 대기 인스턴스의 복제도 함께 끊깁니다. 02부터 06 챕터는 공인 IP로 복제한 1차 테스트의 기록이고 복제 경로를 VPC 피어링으로 바꾼 2차 테스트는 07 챕터에 있습니다.

도쿄 리전에서 DRS를 처음 사용하는 계정이어서 CLI로 초기화했습니다. initialize-service는 역할이 없다는 오류로 실패했고 초기화 문서대로 EC2용 역할 네 개를 만들자 성공했습니다. 문서는 에이전트용 역할 두 개도 만들라고 안내하지만 인스턴스 프로파일 자격 증명으로 설치한 이 구성은 그 두 역할 없이 동작했습니다.

bash
# 역할 네 개: ReplicationServer, ConversionServer, RecoveryInstance, RecoveryInstanceWithLaunchActions
aws iam create-role --path "/service-role/" \
  --role-name AWSElasticDisasterRecoveryReplicationServerRole \
  --assume-role-policy-document '{"Version": "2012-10-17", "Statement":[{"Effect":"Allow","Principal": {"Service":"ec2.amazonaws.com"},"Action":"sts:AssumeRole"}]}'
aws iam attach-role-policy --role-name AWSElasticDisasterRecoveryReplicationServerRole \
  --policy-arn arn:aws:iam::aws:policy/service-role/AWSElasticDisasterRecoveryReplicationServerPolicy

aws drs initialize-service --region ap-northeast-1

aws drs create-replication-configuration-template --region ap-northeast-1 \
  --staging-area-subnet-id subnet-0aaaaaaaaaaaaaaaa \
  --no-associate-default-security-group \
  --replication-servers-security-groups-ids sg-0aaaaaaaaaaaaaaaa \
  --replication-server-instance-type t3.small --no-use-dedicated-replication-server \
  --default-large-staging-disk-type GP3 --ebs-encryption DEFAULT --bandwidth-throttling 0 \
  --data-plane-routing PUBLIC_IP --create-public-ip \
  --staging-area-tags Project=drs-maz-lab \
  --pit-policy '[{"ruleID":1,"units":"MINUTE","interval":10,"retentionDuration":60,"enabled":true},{"ruleID":2,"units":"HOUR","interval":1,"retentionDuration":24,"enabled":true},{"ruleID":3,"units":"DAY","interval":1,"retentionDuration":1,"enabled":true}]'

02

루트 볼륨이 Multi-AZ인 소스 인스턴스 만들기

루트 볼륨을 Multi-AZ로 만들려면 인스턴스를 시작할 때 블록 디바이스 매핑에 Multi-AZ 설정을 넣습니다. DeleteOnTermination은 false로 지정했습니다. 소스 인스턴스를 종료해도 대기 인스턴스가 사용할 볼륨이 남아야 하기 때문입니다.

bash
# bdm-source.json (데이터 볼륨 /dev/sdf도 같은 형식)
[
  {
    "DeviceName": "/dev/xvda",
    "Ebs": {
      "VolumeSize": 10, "VolumeType": "gp3", "DeleteOnTermination": false,
      "MultiAvailabilityZoneConfiguration": {
        "ConfigurationType": "multi-az-1",
        "StandbyAvailabilityZones": [{"AvailabilityZone": "ap-northeast-2b"}]
      }
    }
  }
]

aws ec2 run-instances --image-id ami-0123456789abcdef0 --instance-type m7i.large \
  --subnet-id subnet-0bbbbbbbbbbbbbbbb --security-group-ids sg-0bbbbbbbbbbbbbbbb \
  --iam-instance-profile Name=drs-maz-lab-ec2-profile \
  --metadata-options HttpTokens=required,HttpEndpoint=enabled \
  --block-device-mappings file://bdm-source.json

인스턴스는 17.8초 뒤에 실행 상태가 됐고 두 볼륨 모두 활성 AZ가 2a, 대기 AZ가 2b로 생성됐습니다.

text
+-----------------+----------------------+------------+-------+-------------------+-------------------------+
|     Active      | DeleteOnTermination  |  Device    | Size  |      Standby      |         Volume          |
+-----------------+----------------------+------------+-------+-------------------+-------------------------+
|  ap-northeast-2a|  False               |  /dev/xvda |  10   |  ap-northeast-2b  |  vol-0aaaaaaaaaaaaaaaa  |
|  ap-northeast-2a|  False               |  /dev/sdf  |  10   |  ap-northeast-2b  |  vol-0bbbbbbbbbbbbbbbb  |
+-----------------+----------------------+------------+-------+-------------------+-------------------------+

데이터 볼륨에는 XFS를 만들고 초당 20건씩 레코드를 추가하는 저널 기록 서비스를 두었습니다. 레코드마다 순번, 시각, 기록한 인스턴스의 ID와 AZ가 들어 있어서 복구본에서 어느 인스턴스가 어디까지 썼는지 확인할 수 있습니다.

03

같은 루트 볼륨으로 부팅할 대기 인스턴스 준비

DRS가 복제를 이어 가려면 대기 인스턴스에 루트 볼륨과 에이전트 파일이 있는 볼륨이 연결돼 있어야 합니다. EBS 사용 설명서에는 루트 볼륨을 넘겨받을 대기 인스턴스를 만드는 절차가 따로 없어서 직접 구성했습니다. 같은 AMI와 인스턴스 유형으로 2b에 인스턴스를 만들어 중지하고 그 인스턴스의 루트 볼륨을 떼어 삭제한 뒤 Multi-AZ 루트 볼륨을 루트 장치 이름으로 연결했습니다.

bash
aws ec2 stop-instances --instance-ids i-0bbbbbbbbbbbbbbbb
aws ec2 detach-volume --volume-id vol-0cccccccccccccccc --instance-id i-0bbbbbbbbbbbbbbbb   # 대기 인스턴스의 원래 루트
aws ec2 delete-volume --volume-id vol-0cccccccccccccccc

aws ec2 attach-volume --volume-id vol-0aaaaaaaaaaaaaaaa --instance-id i-0bbbbbbbbbbbbbbbb --device /dev/xvda
aws ec2 attach-volume --volume-id vol-0bbbbbbbbbbbbbbbb --instance-id i-0bbbbbbbbbbbbbbbb --device /dev/sdf

aws ec2 describe-instances --instance-ids i-0bbbbbbbbbbbbbbbb \
  --query 'Reservations[0].Instances[0].{State:State.Name,RootDeviceName:RootDeviceName,Devices:BlockDeviceMappings[].[DeviceName,Ebs.VolumeId,Ebs.Status]}'
{
    "State": "stopped",
    "RootDeviceName": "/dev/xvda",
    "Devices": [
        [ "/dev/xvda", "vol-0aaaaaaaaaaaaaaaa", "attached" ],
        [ "/dev/sdf", "vol-0bbbbbbbbbbbbbbbb", "attached" ]
    ]
}

소스 인스턴스가 실행 중인 상태에서 두 볼륨을 대기 인스턴스에 연결했고 소스의 쓰기에는 영향이 없었습니다. 대기 인스턴스는 중지 상태로 두었습니다. 인스턴스 프로파일은 볼륨을 따라 옮겨지지 않으므로 대기 인스턴스에도 같은 프로파일을 미리 지정해야 합니다.

04

에이전트 설치와 Multi-AZ 지원 확인

에이전트는 --multi-az-enabled-volumes 옵션으로 설치합니다. 이 옵션을 주면 DRS가 서버를 Multi-AZ 지원으로 등록하지 못할 때 설치가 오류로 멈추므로 요건을 빠뜨린 채 진행되는 일을 막습니다.

bash
curl -sS -o aws-replication-installer-init \
  https://aws-elastic-disaster-recovery-ap-northeast-1.s3.ap-northeast-1.amazonaws.com/latest/linux/aws-replication-installer-init
chmod +x aws-replication-installer-init
sudo ./aws-replication-installer-init --region ap-northeast-1 --no-prompt --multi-az-enabled-volumes

# 출력에서 발췌
  serviceEndpoint=https://drs.ap-northeast-1.amazonaws.com
  useInstanceProfileCreds=true
  mazEnabledVolume=True
The following is the source server ID: s-1234567890abcdef0.
The AWS Replication Agent was successfully installed.

등록 결과는 describe-source-servers의 multiAzEnabledType으로 확인합니다. 값이 null이면 Multi-AZ 지원 없이 등록된 것입니다.

bash
aws drs describe-source-servers --region ap-northeast-1 \
  --filters '{"sourceServerIDs": ["s-1234567890abcdef0"]}' \
  --query 'items[0].[multiAzEnabledType, sourceProperties.identificationHints.awsInstanceID, sourceCloudProperties.originAvailabilityZone, dataReplicationInfo.dataReplicationState, dataReplicationInfo.lagDuration]'
[
    "MULTI_AZ_ENABLED_VOLUME",
    "i-0aaaaaaaaaaaaaaaa",
    "ap-northeast-2a",
    "CONTINUOUS",
    "P0D"
]

설치는 3분 36초가 걸렸고 소스 서버가 등록된 뒤 CONTINUOUS가 되기까지 22분 28초가 걸렸습니다. 복제 서버 준비에 6분 46초, 볼륨 두 개의 전송에 5분, 첫 스냅샷 생성에 10분 42초였습니다.

05

AZ 전환 뒤 재스캔을 거쳐 돌아오는 연속 복제

AZ 전환은 세 번 했습니다. 계획한 전환은 소스 인스턴스를 정상 중지한 뒤 볼륨을 페일오버하고 대기 인스턴스를 시작합니다. 갑작스러운 전환은 인스턴스가 실행 중인 상태에서 볼륨을 페일오버하고 곧바로 대기 인스턴스를 시작했습니다.

bash
# 계획한 전환
aws ec2 stop-instances --instance-ids i-0aaaaaaaaaaaaaaaa
aws ec2 wait instance-stopped --instance-ids i-0aaaaaaaaaaaaaaaa
aws ec2 failover-volumes --instance-id i-0aaaaaaaaaaaaaaaa --source-active-availability-zone ap-northeast-2a
aws ec2 start-instances --instance-ids i-0bbbbbbbbbbbbbbbb

# 전환 뒤 확인 (DRS 사용 설명서의 명령)
aws drs describe-source-servers --region ap-northeast-1 \
  --filters '{"sourceServerIDs": ["s-1234567890abcdef0"]}' \
  --query 'items[0].[sourceProperties.identificationHints.awsInstanceID, sourceCloudProperties.originAvailabilityZone, dataReplicationInfo.dataReplicationState]'
[
    "i-0bbbbbbbbbbbbbbbb",
    "ap-northeast-2b",
    "RESCAN"
]

대기 인스턴스는 같은 루트 볼륨으로 부팅했고 에이전트가 시작되자 DRS의 소스 서버가 대기 인스턴스의 ID와 AZ로 바뀌었습니다. 소스 서버 ID는 그대로였습니다. 그 뒤 상태가 RESCAN을 거쳐 CONTINUOUS로 돌아왔습니다.

text
# 계획한 전환 1. describe-source-servers를 5초 간격으로 조회한 값에서 발췌 (UTC)
16:38:53  failover-volumes 호출
16:39:58  i-0bbbbbbbbbbbbbbbb  ap-northeast-2b  CONTINUOUS  lagDuration PT1M33S
16:40:03  i-0bbbbbbbbbbbbbbbb  ap-northeast-2b  INITIATING  lagDuration PT1M39S
16:40:14  i-0bbbbbbbbbbbbbbbb  ap-northeast-2b  RESCAN      lagDuration PT1M49S
16:41:14  i-0bbbbbbbbbbbbbbbb  ap-northeast-2b  BACKLOG     lagDuration PT2M49S
16:43:20  i-0bbbbbbbbbbbbbbbb  ap-northeast-2b  BACKLOG     lagDuration PT4M55S
16:43:41  i-0bbbbbbbbbbbbbbbb  ap-northeast-2b  CONTINUOUS  lagDuration P0D
항목계획한 전환 1 (2a에서 2b)갑작스러운 전환 (2b에서 2a)계획한 전환 2 (2a에서 2b)
저널 쓰기가 멈춘 시간57.0초25.5초56.1초
소스 서버가 새 인스턴스로 표시65초66초62초
RESCAN 시작81초81초78초
CONTINUOUS 복귀4분 48초3분 23초2분 21초
표시된 최대 지연(lagDuration)4분 55초3분 11초1분 47초
전환 뒤 NAT 게이트웨이가 내보낸 양19.30GiB0.04GiB0.02GiB
재스캔 뒤의 첫 EBS 스냅샷6분 20초3분 13초2분 19초

표 2. 공인 IP 경로(1차)의 AZ 전환 세 번. 저널 쓰기가 멈춘 시간과 내보낸 양을 뺀 값은 페일오버 호출부터의 경과 시간이고 DRS 상태는 5초 간격으로 조회했습니다. 내보낸 양은 NAT 게이트웨이의 CloudWatch 지표(BytesOutToDestination)입니다

계획한 전환에서 쓰기가 멈춘 시간에는 운영체제를 정상 종료하는 32초가 들어 있습니다. 갑작스러운 전환에서는 페일오버와 대기 인스턴스의 부팅만 걸렸고, 부팅할 때 XFS가 로그를 복구했으며 저널에 무효 레코드는 없었습니다.

페일오버 호출을 0초로 둔 두 개의 시간축. 계획한 전환에서는 저널 쓰기가 57초 멈추고 DRS 상태가 CONTINUOUS, INITIATING, RESCAN, BACKLOG를 거쳐 288초에 CONTINUOUS로 돌아오며 도쿄의 스냅샷은 중지 시점과 380초에 생긴다. 갑작스러운 전환에서는 쓰기가 25초 멈추고 DRS 상태가 203초에 CONTINUOUS로 돌아오며 스냅샷은 전환 순간과 193초에 생긴다. 두 스냅샷 사이에는 전환 뒤에 쓴 데이터의 복구 시점이 없다
그림 2. 계획한 전환 1과 갑작스러운 전환에서 본 저널 쓰기, DRS 상태, 도쿄의 스냅샷

재스캔은 세 번 모두 일어났습니다. 사용 설명서는 정상 중지 뒤의 전환이면 재스캔 없이 이어질 수 있다고 설명하지만 계획한 전환 두 번 모두 재스캔을 거쳤습니다. 다시 보낸 데이터의 양은 전환마다 달랐습니다. 대기 인스턴스로 처음 넘어간 계획한 전환 1에서는 볼륨 두 개의 전체 크기에 가까운 양을 다시 보냈고 상태에 BACKLOG가 나타났습니다. 이후 두 번은 적은 양만 보냈습니다.

상태가 INITIAL_SYNC로 바뀌지는 않았지만 첫 전환의 전송량은 초기 동기화 때 NAT 게이트웨이가 내보낸 19.31GiB와 거의 같았습니다. 재스캔 시간과 첫 전환의 전송량은 볼륨 크기에 따라 달라지므로 큰 볼륨에서는 이 표의 값보다 길어집니다.

06

전환 전 스냅샷으로 복구된 전환 직후의 드릴

리전 DR의 복구 시점은 복구 리전에 있는 스냅샷이 결정합니다. 첫 번째 드릴은 계획한 전환 1의 재스캔이 끝나 상태가 CONTINUOUS, 지연이 0으로 표시되고 21초 뒤에 시작했습니다.

bash
aws drs start-recovery --region ap-northeast-1 --is-drill \
  --source-servers sourceServerID=s-1234567890abcdef0

aws drs describe-job-log-items --region ap-northeast-1 --job-id drsjob-1234567890abcdef0 \
  --query 'items[].[logDateTime,event,eventData.rawError]' --output text
2026-12-01T16:44:02.100598+00:00	JOB_START	None
2026-12-01T16:44:03.232098+00:00	SNAPSHOT_START	None
2026-12-01T16:44:03.344758+00:00	SNAPSHOT_END	None
2026-12-01T16:48:21.903745+00:00	USING_PREVIOUS_SNAPSHOT	Could not take up to date snapshot. Launching from snapshot taken on 2026-12-01T16:38:25.095137+00:00
2026-12-01T16:48:22.456958+00:00	CONVERSION_START	None
2026-12-01T16:53:29.706261+00:00	CONVERSION_END	None
2026-12-01T16:54:04.493589+00:00	LAUNCH_START	None
2026-12-01T16:56:27.753046+00:00	LAUNCH_END	None
2026-12-01T16:56:28.973434+00:00	JOB_END	None

드릴 작업은 최신 스냅샷을 만들지 못했고 4분 18초를 기다린 뒤 소스 인스턴스를 중지하던 시점의 스냅샷으로 복구했습니다. 도쿄의 복구 인스턴스에서 저널을 읽자 2a에서 쓴 기록만 있었습니다. 드릴을 시작한 시점까지 2b에서 4분 43초 동안 쓴 기록은 복구본에 없었습니다.

text
# 첫 번째 드릴의 복구 인스턴스에서 읽은 저널 (마지막 줄은 복구 인스턴스가 부팅 뒤에 이어 쓴 기록)
records 29629, invalid 0
ap-northeast-2a i-0aaaaaaaaaaaaaaaa  seq 0..29463  16:12:06.951 .. 16:38:22.335 UTC
ap-northeast-1a i-0dddddddddddddddd  seq 29464..29628  16:58:05.545 .. 16:58:14.291 UTC  gap after previous run 1183.2 s

# 두 번째 드릴 (갑작스러운 전환의 재스캔이 끝나고 1분 36초 뒤에 시작)
records 57556, invalid 0
ap-northeast-2a i-0aaaaaaaaaaaaaaaa  seq 0..29469  16:12:06.951 .. 16:38:22.657 UTC
ap-northeast-2b i-0bbbbbbbbbbbbbbbb  seq 29470..52132  16:39:19.634 .. 16:59:30.922 UTC  gap after previous run 57.0 s
ap-northeast-2a i-0aaaaaaaaaaaaaaaa  seq 52133..57445  16:59:56.389 .. 17:04:41.780 UTC  gap after previous run 25.5 s
ap-northeast-1a i-0eeeeeeeeeeeeeeee  seq 57446..57555  17:13:08.724 .. 17:13:14.417 UTC  gap after previous run 506.9 s

두 번째 드릴은 갑작스러운 전환 뒤의 재스캔이 끝나고 1분 36초가 지난 다음에 시작했습니다. 이번에는 드릴 작업이 최신 스냅샷을 만들었고 복구된 저널에는 2a, 2b, 다시 2a에서 쓴 기록이 순서대로 이어져 있었습니다. 복구본의 마지막 기록은 스냅샷 시각보다 1.6초 앞이었습니다.

항목첫 번째 드릴두 번째 드릴
시작 시점계획한 전환 1 뒤, CONTINUOUS 복귀 21초 후갑작스러운 전환 뒤, CONTINUOUS 복귀 1분 36초 후
사용한 스냅샷전환 전(시작 5분 37초 전)의 스냅샷드릴이 새로 만든 스냅샷
복구된 기록전환 전 2a의 기록까지세 구간의 기록 모두
작업 시간12분 27초7분 2초
복구된 볼륨단일 AZ gp3 10GiB 두 개단일 AZ gp3 10GiB 두 개

표 3. 도쿄 리전의 드릴 두 번. 작업 시간은 작업 시작부터 종료까지이고 그 뒤 SSM으로 접속할 수 있기까지 1분 40초가량이 더 걸렸습니다

상태가 CONTINUOUS이고 지연이 0이어도 전환 뒤의 데이터가 복구 가능하다는 뜻은 아니었습니다. 전환 뒤에 쓴 데이터의 복구 시점은 재스캔 뒤의 첫 스냅샷부터 생깁니다. 첫 번째 드릴을 시작하고 71초 뒤에 그 스냅샷이 생겼지만 이미 시작한 드릴 작업은 그것을 사용하지 않았습니다. 스냅샷 시각은 복구 리전의 EBS 스냅샷 목록으로 확인했습니다.

bash
aws ec2 describe-snapshots --region ap-northeast-1 --owner-ids self \
  --filters Name=tag-key,Values=AWSElasticDisasterRecoveryManaged \
            Name=description,Values='AWS Elastic Disaster Recovery Snapshot' \
  --query 'sort_by(Snapshots,&StartTime)[].StartTime' --output text

# 볼륨 두 개의 스냅샷이 같은 시각에 한 쌍씩 생긴다 (UTC, 설명은 직접 붙인 것)
16:29:12  초기 동기화의 첫 스냅샷
16:38:24  계획한 전환 1에서 소스 인스턴스를 중지한 시점
16:45:13  계획한 전환 1 뒤의 첫 스냅샷
16:59:31  갑작스러운 전환의 순간
17:02:43  갑작스러운 전환의 재스캔이 끝날 때
17:04:43  두 번째 드릴이 만든 스냅샷
17:13:39  계획한 전환 2에서 소스 인스턴스를 중지한 시점
17:16:26  계획한 전환 2의 재스캔이 끝날 때

전환 직전의 스냅샷은 세 번 모두 있었습니다. 정상 중지할 때는 중지 명령 4초가량 뒤에, 갑작스러운 전환에서는 페일오버 호출 1.6초 뒤에 스냅샷이 생겼습니다. 그래서 공백은 전환 뒤에 새 AZ에서 쓴 데이터에만 해당합니다. EBS 스냅샷 목록에 있는 스냅샷이 모두 DRS에서 고를 수 있는 복구 시점은 아닙니다. 이 점은 2차 테스트에서 확인했고 07 챕터에 정리했습니다.

07

복제 경로를 VPC 피어링으로 바꿔도 같았던 전환 뒤의 동작

여기까지는 DRS의 기본 설정을 그대로 둔 1차 테스트입니다. 복제 데이터는 NAT 게이트웨이를 거쳐 복제 서버의 공인 IP로 나갔습니다. DRS에는 복제 데이터를 프라이빗 IP로 보내는 설정이 있고 사용 설명서는 그 연결 수단으로 VPN, Direct Connect, VPC 피어링을 듭니다. 서울과 도쿄의 VPC를 리전 간 피어링으로 잇고 같은 순서로 다시 테스트했습니다.

두 복제 경로를 나란히 그린 그림. 공인 IP 경로에서는 서울의 소스 인스턴스가 보내는 복제 데이터(TCP 1500)와 관리 트래픽(TCP 443)이 모두 NAT 게이트웨이를 지나 도쿄의 복제 서버 공인 IP와 DRS, S3 엔드포인트로 간다. VPC 피어링 경로에서는 복제 데이터가 피어링 연결로 복제 서버의 프라이빗 주소에 가고 관리 트래픽만 NAT 게이트웨이를 지난다. NAT 게이트웨이가 내보낸 양은 38.67GiB와 0.02GiB, NAT 처리 요금은 2.51달러와 0.06달러이다
그림 3. 공인 IP 경로(1차)와 VPC 피어링 경로(2차)에서 복제 데이터와 관리 트래픽이 지나는 곳

피어링으로 바뀌는 것은 복제 데이터(TCP 1500)의 경로뿐입니다. 에이전트 설치, 인증, DRS API 호출 같은 관리 트래픽(TCP 443)은 2차에서도 NAT 게이트웨이로 나갔습니다. 피어링 연결과 라우팅은 DRS가 만들어 주지 않으므로 직접 구성했습니다.

bash
# 서울에서 요청하고 도쿄에서 수락
aws ec2 create-vpc-peering-connection --region ap-northeast-2 \
  --vpc-id vpc-0aaaaaaaaaaaaaaaa --peer-vpc-id vpc-0bbbbbbbbbbbbbbbb --peer-region ap-northeast-1
aws ec2 accept-vpc-peering-connection --region ap-northeast-1 \
  --vpc-peering-connection-id pcx-0aaaaaaaaaaaaaaaa

# 서울: 두 AZ의 프라이빗 라우팅 테이블에서 도쿄의 스테이징 서브넷으로
aws ec2 create-route --region ap-northeast-2 --route-table-id rtb-0aaaaaaaaaaaaaaaa \
  --destination-cidr-block 10.221.0.0/24 --vpc-peering-connection-id pcx-0aaaaaaaaaaaaaaaa
aws ec2 create-route --region ap-northeast-2 --route-table-id rtb-0bbbbbbbbbbbbbbbb \
  --destination-cidr-block 10.221.0.0/24 --vpc-peering-connection-id pcx-0aaaaaaaaaaaaaaaa

# 도쿄: 스테이징 서브넷의 라우팅 테이블에서 서울 VPC로
aws ec2 create-route --region ap-northeast-1 --route-table-id rtb-0cccccccccccccccc \
  --destination-cidr-block 10.220.0.0/16 --vpc-peering-connection-id pcx-0aaaaaaaaaaaaaaaa

# 복제 설정 템플릿에서 달라지는 옵션 두 개 (나머지는 01 챕터와 같음)
aws drs create-replication-configuration-template --region ap-northeast-1 \
  --data-plane-routing PRIVATE_IP --no-create-public-ip \
  --staging-area-subnet-id subnet-0aaaaaaaaaaaaaaaa --replication-servers-security-groups-ids sg-0aaaaaaaaaaaaaaaa

복제 서버의 보안 그룹은 서울의 프라이빗 서브넷 두 개에서 오는 TCP 1500만 허용했습니다. 스테이징 서브넷은 프라이빗 서브넷으로 바꿨고 복제 서버는 공인 IP 없이 시작됐습니다. 복제 서버가 도쿄의 DRS, S3, EC2 엔드포인트에 접속할 때는 도쿄 VPC의 NAT 게이트웨이를 사용했습니다. 소스 인스턴스에서 보면 복제 연결의 상대가 복제 서버의 프라이빗 주소입니다.

bash
# 소스 인스턴스에서 본 복제 연결 (주소는 예시 값)
ss -Htn state established '( dport = :1500 )' | awk '{print $3, "->", $4}'
[::ffff:10.220.10.10]:42260 -> [::ffff:10.221.0.20]:1500
[::ffff:10.220.10.10]:42262 -> [::ffff:10.221.0.20]:1500
[::ffff:10.220.10.10]:49702 -> [::ffff:10.221.0.20]:1500
[::ffff:10.220.10.10]:49718 -> [::ffff:10.221.0.20]:1500
[::ffff:10.220.10.10]:49732 -> [::ffff:10.221.0.20]:1500

aws drs get-replication-configuration --region ap-northeast-1 --source-server-id s-1234567890abcdef0 \
  --query '[dataPlaneRouting,createPublicIP,stagingAreaSubnetId,replicationServerInstanceType]'
[
    "PRIVATE_IP",
    false,
    "subnet-0aaaaaaaaaaaaaaaa",
    "t3.small"
]

결과는 1차와 같은 흐름이었습니다. 소스 서버 ID는 유지됐고 세 번 모두 재스캔을 거쳤습니다. 대기 인스턴스로 처음 넘어간 전환에서는 이번에도 볼륨 전체에 가까운 양을 다시 보냈습니다.

항목계획한 전환 1 (2a에서 2b)갑작스러운 전환 (2b에서 2a)계획한 전환 2 (2a에서 2b)
저널 쓰기가 멈춘 시간56.7초25.9초56.2초
CONTINUOUS 복귀3분 28초3분 21초2분 21초
전환 뒤 소스 인스턴스가 보낸 양18.75GiB0.02GiB0.02GiB
재스캔이 끝날 때의 EBS 스냅샷2분 21초3분 12초2분 20초
전환 뒤의 데이터가 든 첫 복구 시점8분 22초6분 11초2분 20초

표 4. VPC 피어링 경로(2차)의 AZ 전환 세 번. 보낸 양은 소스 인스턴스의 CloudWatch 지표(NetworkOut)이고 복구 시점은 describe-recovery-snapshots 기준입니다. 갑작스러운 전환의 복구 시점은 드릴이 만든 스냅샷이고 10분 주기 스냅샷은 7분 42초에 생겼습니다

CONTINUOUS 복귀는 계획한 전환 1에서 1차보다 1분 20초 빨랐고 나머지 두 번은 거의 같았습니다. 한 번씩의 측정이어서 이 차이가 경로 때문이라고 말할 수는 없습니다.

2차에서는 EBS 스냅샷 목록을 DRS의 복구 시점 목록과 대조했습니다. DRS는 인스턴스가 멈추는 순간과 재스캔이 끝나는 순간에도 EBS 스냅샷을 만듭니다. 하지만 그 스냅샷이 모두 복구 시점으로 등록되지는 않았습니다.

bash
aws drs describe-recovery-snapshots --region ap-northeast-1 --source-server-id s-1234567890abcdef0

# EBS 스냅샷 목록과 대조한 결과 (UTC, 설명은 직접 붙인 것)
00:48:34  복구 시점      계획한 전환 1에서 소스 인스턴스를 중지한 시점, 드릴 1이 사용
00:51:23  등록되지 않음  계획한 전환 1의 재스캔이 끝날 때, 백로그를 보내는 중
00:57:24  복구 시점      10분 주기 스냅샷, 계획한 전환 1 뒤의 데이터가 든 첫 복구 시점
01:07:48  등록되지 않음  갑작스러운 전환의 순간
01:10:59  등록되지 않음  갑작스러운 전환의 재스캔이 끝날 때
01:13:58  복구 시점      드릴 2가 만든 스냅샷
01:15:29  복구 시점      10분 주기 스냅샷
01:22:12  등록되지 않음  계획한 전환 2에서 소스 인스턴스를 중지한 시점
01:25:00  복구 시점      계획한 전환 2의 재스캔이 끝날 때, 드릴 3이 사용

재스캔이 끝날 때의 스냅샷은 세 번 가운데 한 번만 복구 시점으로 등록됐고 나머지 두 번의 스냅샷은 한 시간 안에 삭제됐습니다. 대기 인스턴스로 처음 넘어간 전환에서는 전환 뒤의 데이터가 든 복구 시점이 주기 스냅샷에서야 생겼습니다. 표 2의 마지막 행에서 갑작스러운 전환과 계획한 전환 2의 값은 재스캔이 끝날 때의 스냅샷입니다. 그 두 스냅샷이 복구 시점으로 등록됐는지는 확인하지 못했습니다.

드릴은 전환마다 한 번씩 실행했고 결과는 1차의 관찰과 맞았습니다.

항목드릴 1드릴 2드릴 3
시작 시점계획한 전환 1 뒤, CONTINUOUS 복귀 12초 후갑작스러운 전환 뒤, 복귀 2분 40초 후계획한 전환 2 뒤, 복귀 4초 후
사용한 스냅샷전환 전의 스냅샷드릴이 새로 만든 스냅샷재스캔이 끝날 때의 스냅샷
복구된 기록전환 전 2a의 기록까지세 구간의 기록 모두네 구간의 기록 모두
작업 시간10분 37초6분 2초8분 40초

표 5. VPC 피어링 경로(2차)의 드릴 세 번. 복구된 볼륨은 1차와 같이 단일 AZ gp3 10GiB 두 개입니다

CONTINUOUS 복귀 직후에 시작한 드릴 1과 드릴 3은 최신 스냅샷을 만들지 못했고 3분 9초를 기다린 뒤 직전 스냅샷으로 복구했습니다. 드릴 1에서는 그 스냅샷이 전환 전의 것이어서 2b에서 쓴 3분 13초 분량의 기록이 빠졌습니다. 드릴 3에서는 재스캔이 끝날 때의 스냅샷이어서 새 AZ에서 쓴 기록까지 복구됐습니다. 1차의 두 번까지 합치면 복귀 직후에 시작한 드릴 세 번은 모두 최신 스냅샷을 만들지 못했습니다. 복귀하고 1분 30초 넘게 지나 시작한 드릴은 모두 최신 스냅샷을 만들었습니다.

피어링 경로에서 복제 데이터가 NAT에 의존하지 않는지도 확인했습니다. 활성 인스턴스가 있는 서브넷의 라우팅 테이블에서 NAT로 가는 기본 경로를 지우고 지켜봤습니다.

bash
# 활성 인스턴스(2b)의 서브넷 라우팅 테이블에서 NAT로 가는 기본 경로 삭제 (01:37:15 UTC)
aws ec2 delete-route --route-table-id rtb-0bbbbbbbbbbbbbbbb --destination-cidr-block 0.0.0.0/0

# describe-source-servers로 조회한 상태에서 발췌 (UTC)
01:40:23  CONTINUOUS  lagDuration P0D
01:40:55  STALLED     lagDuration PT5M17S  AGENT_NOT_SEEN
01:42:29  STALLED     lagDuration PT6M51S  AGENT_NOT_SEEN

# 이 상태에서 시작한 드릴의 복구 인스턴스에서 읽은 저널의 마지막 구간
ap-northeast-2b i-0bbbbbbbbbbbbbbbb  seq 70560..92403  01:23:05.875 .. 01:42:36.513 UTC  gap after previous run 56.2 s

# 기본 경로 복원 (01:51:44 UTC)과 그 뒤의 상태
aws ec2 create-route --route-table-id rtb-0bbbbbbbbbbbbbbbb --destination-cidr-block 0.0.0.0/0 \
  --nat-gateway-id nat-0bbbbbbbbbbbbbbbb
01:54:12  CONTINUOUS  lagDuration P0D

기본 경로를 지우고 3분 35초가량 뒤에 DRS는 소스 서버를 STALLED로 표시했고 오류는 에이전트가 보이지 않는다는 AGENT_NOT_SEEN이었습니다. 그 상태에서 시작한 드릴은 새 스냅샷을 만들었고 복구본에는 경로를 지운 지 5분 21초 뒤의 기록까지 들어 있었습니다. 관리 트래픽이 끊겨도 이미 맺어진 복제 연결로 데이터는 계속 전달됐습니다. 기본 경로를 복원하자 2분 28초 뒤에 재스캔 없이 CONTINUOUS가 됐습니다. 관리 경로가 끊긴 상태에서 AZ를 전환하거나 에이전트를 다시 시작하는 경우는 테스트하지 않았습니다.

비용에서는 NAT 게이트웨이의 처리량이 달라졌습니다. 테스트 전체에서 NAT 게이트웨이가 내보낸 양은 1차가 38.67GiB, 2차가 0.02GiB였습니다. 받은 양까지 합쳐 서울 리전의 NAT 처리 단가(GB당 0.059달러)를 곱하면 1차는 2.51달러, 2차는 0.06달러입니다. 2차에서 NAT를 지난 데이터의 대부분은 인스턴스를 처음 부팅하고 에이전트를 설치하던 3분 동안 내려받은 것입니다.

리전 간 전송 요금(서울에서 도쿄로 GB당 0.08달러)은 피어링 경로에도 부과됩니다. 공인 IP 경로에서는 여기에 NAT 처리 요금이 더해지고 그 양은 초기 동기화와 첫 AZ 전환 때 볼륨 크기만큼 늘어납니다.

08

문서와 달랐던 점과 확인하지 못한 것

문서의 설명과 다르게 관찰한 것을 정리했습니다.

  • 계획한 전환에서도 재스캔이 일어났습니다. 문서는 재스캔 없이 이어질 수 있다고 하면서 재스캔이 일어날 수도 있다고 덧붙입니다. 두 테스트의 네 번 모두 뒤쪽에 해당했습니다.
  • 대기 인스턴스로 처음 넘어간 전환에서는 볼륨 전체에 가까운 양을 다시 보냈습니다. 문서는 재스캔 시간이 볼륨의 크기와 성능에 따라 달라진다고 설명하고 새 초기 동기화는 시작하지 않는다고 적었습니다. 상태 이름은 문서대로였지만 보낸 양은 초기 동기화와 같았습니다.
  • 문서는 연속 복제로 돌아온 뒤에 드릴을 실행해 대기 인스턴스의 데이터로 복구되는지 확인하라고 안내합니다. 복귀 직후에 시작한 드릴 세 번 가운데 두 번은 전환 전의 데이터로 복구됐습니다.
  • CLI 초기화는 문서의 역할 여섯 개 가운데 네 개만으로 성공했습니다. 액세스 키로 에이전트를 설치하는 구성에서는 나머지 두 역할이 필요한지 확인하지 않았습니다.
  • 소스 서버의 lifeCycle.lastSnapshotDateTime은 두 테스트 내내 비어 있었습니다. 스냅샷 시각은 다른 명령으로 확인해야 했습니다.

대기 인스턴스가 부팅한 직후 에이전트의 로그에는 인스턴스 ID가 바뀌었다는 오류와 DescribeRecoveryInstances 권한이 없다는 오류가 한 번씩 남았습니다. 복제는 그 뒤에 정상으로 이어졌습니다.

확인하지 못한 항목도 남았습니다.

  • 수백 GiB 이상인 볼륨의 재스캔 시간과 첫 전환의 전송 시간. 이 테스트의 볼륨은 합쳐서 20GiB입니다.
  • Windows 인스턴스. 문서는 EC2Launch v1을 쓰는 인스턴스에 전환 전 준비 작업이 필요하다고 안내합니다.
  • 데이터 볼륨의 대기 AZ가 루트 볼륨과 다른 경우. 문서는 그 볼륨이 전환 뒤에 복제되지 않는다고 설명합니다.
  • 실제 AZ 장애와 리전 장애, 그리고 도쿄에서 서울로 되돌리는 페일백.
  • 관리 트래픽까지 프라이빗으로 보내 NAT를 없앤 구성. 문서는 PrivateLink로 에이전트를 설치하는 방법을 안내합니다. VPN, Direct Connect, Transit Gateway 경로도 테스트하지 않았습니다.

09

정리 방법과 비용, 적용 기준

테스트 뒤에는 소스 서버의 연결을 끊고 삭제한 다음 나머지를 지웠습니다. 복제 설정 템플릿은 작업 기록이 남아 있으면 삭제되지 않아 작업을 먼저 지웠습니다. 도쿄에 남은 변환용 볼륨과 스냅샷도 확인해 삭제했습니다. 에이전트 설치 프로그램이 DRS에 만든 소스 네트워크 기록은 1차 정리 때 놓쳤고 2차를 시작하면서 찾아 지웠습니다. 2차 뒤에는 피어링 연결과 라우팅도 지웠습니다.

bash
aws drs disconnect-source-server --region ap-northeast-1 --source-server-id s-1234567890abcdef0
aws drs delete-source-server --region ap-northeast-1 --source-server-id s-1234567890abcdef0
aws drs delete-job --region ap-northeast-1 --job-id drsjob-1234567890abcdef0        # 작업마다
aws drs delete-replication-configuration-template --region ap-northeast-1 \
  --replication-configuration-template-id rct-1234567890abcdef0
aws drs delete-source-network --region ap-northeast-1 --source-network-id sn-1234567890abcdef0   # 설치 프로그램이 만든 기록

aws ec2 terminate-instances --instance-ids i-0aaaaaaaaaaaaaaaa i-0bbbbbbbbbbbbbbbb
aws ec2 delete-volume --volume-id vol-0aaaaaaaaaaaaaaaa    # DeleteOnTermination이 false이므로 직접 삭제
aws ec2 delete-volume --volume-id vol-0bbbbbbbbbbbbbbbb

# 2차: 피어링 경로를 지운 뒤 피어링 연결 삭제
aws ec2 delete-route --region ap-northeast-2 --route-table-id rtb-0aaaaaaaaaaaaaaaa --destination-cidr-block 10.221.0.0/24   # 추가한 경로마다
aws ec2 delete-vpc-peering-connection --region ap-northeast-2 --vpc-peering-connection-id pcx-0aaaaaaaaaaaaaaaa

DRS 요금은 Multi-AZ 볼륨을 쓴다고 달라지지 않습니다. 도쿄 리전의 단가는 소스 서버당 시간당 0.028달러이고 요금 페이지는 드릴과 복구 실행이 이 요금에 포함된다고 설명합니다. 스테이징 리소스는 따로 과금됩니다.

항목이 테스트의 구성월 요금(계산값)
DRS 복제소스 서버 1대20.44 USD
복제 서버t3.small 1대 (여러 소스 서버가 함께 사용)19.86 USD
스테이징 볼륨마그네틱 10GiB 두 개1.60 USD
스냅샷변경량에 따라 달라짐계산하지 않음
서울의 Multi-AZ 볼륨gp3 10GiB 두 개, 단일 AZ의 두 배3.65 USD

표 6. 구성 요소별 월 요금. 2026년 12월 2일의 도쿄와 서울 리전 단가에 730시간을 곱한 계산값이고 NAT 게이트웨이와 리전 간 데이터 전송은 뺐습니다

AZ 장애와 리전 장애에 함께 대비해야 하는 워크로드라면 이 구성은 쓸 만합니다. AZ를 옮길 때마다 DRS를 다시 구성하지 않아도 되고 추가되는 비용은 Multi-AZ 볼륨의 차액과 대기 인스턴스 정도입니다. 적용할 때는 아래 항목을 계획에 넣습니다.

  • 루트 볼륨까지 Multi-AZ로 만들고 대기 인스턴스를 같은 루트 볼륨과 같은 인스턴스 프로파일로 미리 준비합니다. 데이터 볼륨만 Multi-AZ로 바꾼 인스턴스는 대상이 아닙니다.
  • AZ 전환 뒤 몇 분 동안은 복구 리전의 복구 시점이 전환 전이라는 점을 복구 목표에 반영합니다. 대기 인스턴스로 처음 넘어갈 때는 볼륨 전체를 다시 보내므로 볼륨이 클수록 이 구간이 길어집니다. 운영할 크기로 직접 측정합니다.
  • 대기 인스턴스를 준비한 뒤 계획한 전환을 한 번 해 두는 방법을 검토합니다. 두 테스트 모두 한 번 전환을 거친 뒤에는 적은 양만 다시 보냈습니다. 이 효과가 얼마나 유지되는지는 확인하지 않았습니다.
  • 전환 뒤에는 상태 값이 아니라 복구 시점 목록의 시각을 확인합니다. 드릴은 연속 복제로 돌아오고 1~2분이 지난 뒤에 실행해 데이터를 읽어 봅니다.
  • 복제 경로는 볼륨 크기와 변경량을 보고 정합니다. 공인 IP 경로는 구성이 간단하지만 복제 데이터 전부에 NAT 처리 요금이 부과됩니다. 1TiB 볼륨이 초기 동기화와 첫 전환에서 전체를 한 번씩 보낸다고 가정하면 NAT 처리 요금만 약 130달러입니다(계산값). VPC 피어링 경로는 이 요금이 없고 복제 서버에 공인 IP를 두지 않습니다. 대신 피어링과 라우팅을 직접 관리해야 하고 관리 트래픽이 나갈 NAT나 VPC 엔드포인트는 여전히 필요합니다.

리전 장애 대비가 필요 없거나 애플리케이션이 이미 다른 리전으로 복제하고 있다면 Multi-AZ 볼륨만으로 충분합니다. 반대로 AZ 전환 직후에도 리전 복구 시점이 초 단위로 유지돼야 한다면 이 구성으로는 맞출 수 없었습니다.

An instance that moves to another AZ, still replicated as the same source server

EBS Multi-AZ volumes cover an Availability Zone (AZ) failure, but a failure of the whole Region still needs replication to another Region. On November 30, 2026, AWS announced that AWS Elastic Disaster Recovery (DRS) keeps replicating the same source server after a failover of Multi-AZ volumes.

With this support an AZ switch and Region DR fit into one setup. An AZ failure is handled by the synchronous replication of EBS, and a Region failure by the recovery points DRS keeps in another Region. When the instance changes to the standby instance in another AZ, the source server ID and the launch settings stay, so you do not reinstall the agent or wait for a new initial sync.

A diagram of the source instance and the stopped standby instance in two AZs of the Seoul Region, the Multi-AZ root and data volumes replicated synchronously to both AZs, the path on which the DRS agent of the source instance replicates continuously to the replication server in the Tokyo Region, and the drill instance launched from a snapshot in Tokyo; a table comparing the two layers of protection; the order of the tests
Figure 1. Two AZs in Seoul and the recovery side in Tokyo, the two layers of protection, the order of the tests

However, there is a gap at the moment the two layers meet. After a switch DRS rescans the volumes, and until the rescan ends and a new snapshot exists, the point you can recover to in the recovery Region stays before the switch. There are conditions as well. The root volume must be Multi-AZ, and the standby instance must boot from that root volume.

How Multi-AZ volumes behave and what they add in latency is in the previous post. For this post I built a setup that replicates an instance in the Seoul Region to the Tokyo Region, twice. Once the replication data went through NAT gateways to a public IP, and once over VPC peering to a private IP. In each setup I switched AZs three times and ran drills in Tokyo. A drill is an exercise that launches an instance from a recovery point in the recovery Region to check that the recovery really works. What remains is how soon the protection in the recovery Region is back after a switch.

01

What you need and what is assumed

The table puts the requirements in the DRS User Guide next to the setup of this test.

ItemRequirement in the docsThis test
Source instanceNitro-based. The root volume and the volumes that hold agent files (on Linux the installation folder, the driver state folder and /boot) are Multi-AZm7i.large, Amazon Linux 2023 (kernel 6.1). Root and data volume both gp3 Multi-AZ, 10 GiB
Standby AZVolumes that hold agent files use the same standby AZ as the root volumeBoth volumes active in 2a, standby in 2b
PermissionsAn instance profile with AWSElasticDisasterRecoveryEc2InstancePolicy on both the source and the standby instanceThe same profile on both instances
NetworkFrom the source, TCP 443 to DRS and S3 in the recovery Region and TCP 1500 to the replication serversRound 1: one NAT gateway per AZ, and the security group of the replication server accepts only the two NAT addresses. Round 2: only the replication data goes over VPC peering
AgentInstaller option --multi-az-enabled-volumesAWS Replication Agent 6.47.24, installed with instance profile credentials

Table 1. Requirements in the docs and the test setup. The instance policy includes the newly added drs:RebindSourceServer permission

There is one NAT gateway per AZ so that the instance in the standby AZ has its own way out to Tokyo. With a NAT in one AZ only, a failure of that AZ would also cut the replication of the standby instance. Chapters 02 to 06 are the record of round 1, which replicated to a public IP, and round 2, with the replication path changed to VPC peering, is in chapter 07.

The account had never used DRS in the Tokyo Region, so I initialized it with the CLI. initialize-service failed with an error that roles were missing and succeeded after I created the four EC2 roles as the initialization page describes. The page also tells you to create two roles for the agent, but this setup, where the agent is installed with instance profile credentials, worked without them.

bash
# four roles: ReplicationServer, ConversionServer, RecoveryInstance, RecoveryInstanceWithLaunchActions
aws iam create-role --path "/service-role/" \
  --role-name AWSElasticDisasterRecoveryReplicationServerRole \
  --assume-role-policy-document '{"Version": "2012-10-17", "Statement":[{"Effect":"Allow","Principal": {"Service":"ec2.amazonaws.com"},"Action":"sts:AssumeRole"}]}'
aws iam attach-role-policy --role-name AWSElasticDisasterRecoveryReplicationServerRole \
  --policy-arn arn:aws:iam::aws:policy/service-role/AWSElasticDisasterRecoveryReplicationServerPolicy

aws drs initialize-service --region ap-northeast-1

aws drs create-replication-configuration-template --region ap-northeast-1 \
  --staging-area-subnet-id subnet-0aaaaaaaaaaaaaaaa \
  --no-associate-default-security-group \
  --replication-servers-security-groups-ids sg-0aaaaaaaaaaaaaaaa \
  --replication-server-instance-type t3.small --no-use-dedicated-replication-server \
  --default-large-staging-disk-type GP3 --ebs-encryption DEFAULT --bandwidth-throttling 0 \
  --data-plane-routing PUBLIC_IP --create-public-ip \
  --staging-area-tags Project=drs-maz-lab \
  --pit-policy '[{"ruleID":1,"units":"MINUTE","interval":10,"retentionDuration":60,"enabled":true},{"ruleID":2,"units":"HOUR","interval":1,"retentionDuration":24,"enabled":true},{"ruleID":3,"units":"DAY","interval":1,"retentionDuration":1,"enabled":true}]'

02

Launching a source instance whose root volume is Multi-AZ

To make the root volume Multi-AZ, put the Multi-AZ configuration in the block device mapping when you launch the instance. I set DeleteOnTermination to false, because the volume the standby instance will use has to remain when the source instance is terminated.

bash
# bdm-source.json (the data volume /dev/sdf has the same form)
[
  {
    "DeviceName": "/dev/xvda",
    "Ebs": {
      "VolumeSize": 10, "VolumeType": "gp3", "DeleteOnTermination": false,
      "MultiAvailabilityZoneConfiguration": {
        "ConfigurationType": "multi-az-1",
        "StandbyAvailabilityZones": [{"AvailabilityZone": "ap-northeast-2b"}]
      }
    }
  }
]

aws ec2 run-instances --image-id ami-0123456789abcdef0 --instance-type m7i.large \
  --subnet-id subnet-0bbbbbbbbbbbbbbbb --security-group-ids sg-0bbbbbbbbbbbbbbbb \
  --iam-instance-profile Name=drs-maz-lab-ec2-profile \
  --metadata-options HttpTokens=required,HttpEndpoint=enabled \
  --block-device-mappings file://bdm-source.json

The instance was running after 17.8 seconds, and both volumes were created with 2a as the active AZ and 2b as the standby AZ.

text
+-----------------+----------------------+------------+-------+-------------------+-------------------------+
|     Active      | DeleteOnTermination  |  Device    | Size  |      Standby      |         Volume          |
+-----------------+----------------------+------------+-------+-------------------+-------------------------+
|  ap-northeast-2a|  False               |  /dev/xvda |  10   |  ap-northeast-2b  |  vol-0aaaaaaaaaaaaaaaa  |
|  ap-northeast-2a|  False               |  /dev/sdf  |  10   |  ap-northeast-2b  |  vol-0bbbbbbbbbbbbbbbb  |
+-----------------+----------------------+------------+-------+-------------------+-------------------------+

On the data volume I created XFS and ran a journal writer service that appends 20 records per second. Each record holds a sequence number, the time, and the ID and AZ of the instance that wrote it, so a recovered copy shows which instance wrote up to where.

03

Preparing a standby instance that boots from the same root volume

For DRS to continue the replication, the root volume and the volumes that hold agent files must be attached to the standby instance. The EBS User Guide has no procedure for a standby instance that takes over a root volume, so I built one myself. I launched an instance in 2b from the same AMI and instance type, stopped it, detached and deleted its own root volume, and attached the Multi-AZ root volume under the root device name.

bash
aws ec2 stop-instances --instance-ids i-0bbbbbbbbbbbbbbbb
aws ec2 detach-volume --volume-id vol-0cccccccccccccccc --instance-id i-0bbbbbbbbbbbbbbbb   # the standby's own root
aws ec2 delete-volume --volume-id vol-0cccccccccccccccc

aws ec2 attach-volume --volume-id vol-0aaaaaaaaaaaaaaaa --instance-id i-0bbbbbbbbbbbbbbbb --device /dev/xvda
aws ec2 attach-volume --volume-id vol-0bbbbbbbbbbbbbbbb --instance-id i-0bbbbbbbbbbbbbbbb --device /dev/sdf

aws ec2 describe-instances --instance-ids i-0bbbbbbbbbbbbbbbb \
  --query 'Reservations[0].Instances[0].{State:State.Name,RootDeviceName:RootDeviceName,Devices:BlockDeviceMappings[].[DeviceName,Ebs.VolumeId,Ebs.Status]}'
{
    "State": "stopped",
    "RootDeviceName": "/dev/xvda",
    "Devices": [
        [ "/dev/xvda", "vol-0aaaaaaaaaaaaaaaa", "attached" ],
        [ "/dev/sdf", "vol-0bbbbbbbbbbbbbbbb", "attached" ]
    ]
}

I attached the two volumes to the standby instance while the source instance was running, and the writes on the source were not affected. The standby instance stayed stopped. An instance profile does not move with the volumes, so the same profile has to be set on the standby instance in advance.

04

Installing the agent and checking Multi-AZ support

Install the agent with the --multi-az-enabled-volumes option. With it the installation stops with an error when DRS cannot register the server with Multi-AZ support, which keeps you from going on with a requirement missing.

bash
curl -sS -o aws-replication-installer-init \
  https://aws-elastic-disaster-recovery-ap-northeast-1.s3.ap-northeast-1.amazonaws.com/latest/linux/aws-replication-installer-init
chmod +x aws-replication-installer-init
sudo ./aws-replication-installer-init --region ap-northeast-1 --no-prompt --multi-az-enabled-volumes

# excerpt of the output
  serviceEndpoint=https://drs.ap-northeast-1.amazonaws.com
  useInstanceProfileCreds=true
  mazEnabledVolume=True
The following is the source server ID: s-1234567890abcdef0.
The AWS Replication Agent was successfully installed.

You check the registration with multiAzEnabledType in describe-source-servers. A value of null means the server was registered without Multi-AZ support.

bash
aws drs describe-source-servers --region ap-northeast-1 \
  --filters '{"sourceServerIDs": ["s-1234567890abcdef0"]}' \
  --query 'items[0].[multiAzEnabledType, sourceProperties.identificationHints.awsInstanceID, sourceCloudProperties.originAvailabilityZone, dataReplicationInfo.dataReplicationState, dataReplicationInfo.lagDuration]'
[
    "MULTI_AZ_ENABLED_VOLUME",
    "i-0aaaaaaaaaaaaaaaa",
    "ap-northeast-2a",
    "CONTINUOUS",
    "P0D"
]

The installation took 3 minutes 36 seconds, and it took 22 minutes 28 seconds from the registration of the source server to CONTINUOUS: 6 minutes 46 seconds to prepare the replication server, 5 minutes to transfer the two volumes and 10 minutes 42 seconds to create the first snapshot.

05

After an AZ switch: a rescan, then continuous replication again

I switched AZs three times. A planned switch stops the source instance normally, fails the volumes over and starts the standby instance. For the abrupt switch I failed the volumes over while the instance was running and started the standby instance at once.

bash
# planned switch
aws ec2 stop-instances --instance-ids i-0aaaaaaaaaaaaaaaa
aws ec2 wait instance-stopped --instance-ids i-0aaaaaaaaaaaaaaaa
aws ec2 failover-volumes --instance-id i-0aaaaaaaaaaaaaaaa --source-active-availability-zone ap-northeast-2a
aws ec2 start-instances --instance-ids i-0bbbbbbbbbbbbbbbb

# check after the switch (the command from the DRS User Guide)
aws drs describe-source-servers --region ap-northeast-1 \
  --filters '{"sourceServerIDs": ["s-1234567890abcdef0"]}' \
  --query 'items[0].[sourceProperties.identificationHints.awsInstanceID, sourceCloudProperties.originAvailabilityZone, dataReplicationInfo.dataReplicationState]'
[
    "i-0bbbbbbbbbbbbbbbb",
    "ap-northeast-2b",
    "RESCAN"
]

The standby instance booted from the same root volume, and once the agent started, the DRS source server changed to the ID and the AZ of the standby instance. The source server ID stayed the same. The state then went through RESCAN and back to CONTINUOUS.

text
# planned switch 1. excerpt of describe-source-servers polled every 5 seconds (UTC)
16:38:53  failover-volumes call
16:39:58  i-0bbbbbbbbbbbbbbbb  ap-northeast-2b  CONTINUOUS  lagDuration PT1M33S
16:40:03  i-0bbbbbbbbbbbbbbbb  ap-northeast-2b  INITIATING  lagDuration PT1M39S
16:40:14  i-0bbbbbbbbbbbbbbbb  ap-northeast-2b  RESCAN      lagDuration PT1M49S
16:41:14  i-0bbbbbbbbbbbbbbbb  ap-northeast-2b  BACKLOG     lagDuration PT2M49S
16:43:20  i-0bbbbbbbbbbbbbbbb  ap-northeast-2b  BACKLOG     lagDuration PT4M55S
16:43:41  i-0bbbbbbbbbbbbbbbb  ap-northeast-2b  CONTINUOUS  lagDuration P0D
ItemPlanned switch 1 (2a to 2b)Abrupt switch (2b to 2a)Planned switch 2 (2a to 2b)
Time the journal writes stopped57.0 s25.5 s56.1 s
Source server shows the new instance65 s66 s62 s
RESCAN starts81 s81 s78 s
Back to CONTINUOUS4 min 48 s3 min 23 s2 min 21 s
Largest lag shown (lagDuration)4 min 55 s3 min 11 s1 min 47 s
Sent out by the NAT gateway after the switch19.30 GiB0.04 GiB0.02 GiB
First EBS snapshot after the rescan6 min 20 s3 min 13 s2 min 19 s

Table 2. The three AZ switches on the public IP path (round 1). Except for the time the journal writes stopped and the amount sent out, values are the time elapsed since the failover call, and the DRS state was polled every 5 seconds. The amount sent out is the CloudWatch metric of the NAT gateway (BytesOutToDestination)

In a planned switch the time without writes includes the 32 seconds of a normal shutdown of the operating system. In the abrupt switch only the failover and the boot of the standby instance took time; XFS recovered its log at boot, and the journal had no invalid record.

Two time axes with the failover call at 0 seconds. In the planned switch the journal writes stop for 57 seconds, the DRS state goes through CONTINUOUS, INITIATING, RESCAN and BACKLOG and returns to CONTINUOUS at 288 seconds, and the snapshots in Tokyo are at the stop and at 380 seconds. In the abrupt switch the writes stop for 25 seconds, the DRS state returns to CONTINUOUS at 203 seconds, and the snapshots are at the switch and at 193 seconds. Between the two snapshots there is no recovery point for the data written after the switch
Figure 2. Journal writes, DRS state and snapshots in Tokyo in planned switch 1 and in the abrupt switch

A rescan ran all three times. The User Guide says that a switch after a normal stop may continue without a rescan, but both planned switches went through a rescan. The amount of data sent again differed from switch to switch. In planned switch 1, the first move to the standby instance, DRS sent again an amount close to the full size of the two volumes, and the state showed BACKLOG. The two later switches sent only a little.

The state did not change to INITIAL_SYNC, but the amount sent in the first switch was almost the same as the 19.31 GiB the NAT gateway sent out during the initial sync. Rescan time and the amount sent in the first switch depend on the volume size, so larger volumes take longer than the values in this table.

06

A drill right after the switch, recovered from the snapshot taken before it

The recovery point of Region DR is set by the snapshots in the recovery Region. I started the first drill 21 seconds after the rescan of planned switch 1 had ended and the state showed CONTINUOUS with a lag of 0.

bash
aws drs start-recovery --region ap-northeast-1 --is-drill \
  --source-servers sourceServerID=s-1234567890abcdef0

aws drs describe-job-log-items --region ap-northeast-1 --job-id drsjob-1234567890abcdef0 \
  --query 'items[].[logDateTime,event,eventData.rawError]' --output text
2026-12-01T16:44:02.100598+00:00	JOB_START	None
2026-12-01T16:44:03.232098+00:00	SNAPSHOT_START	None
2026-12-01T16:44:03.344758+00:00	SNAPSHOT_END	None
2026-12-01T16:48:21.903745+00:00	USING_PREVIOUS_SNAPSHOT	Could not take up to date snapshot. Launching from snapshot taken on 2026-12-01T16:38:25.095137+00:00
2026-12-01T16:48:22.456958+00:00	CONVERSION_START	None
2026-12-01T16:53:29.706261+00:00	CONVERSION_END	None
2026-12-01T16:54:04.493589+00:00	LAUNCH_START	None
2026-12-01T16:56:27.753046+00:00	LAUNCH_END	None
2026-12-01T16:56:28.973434+00:00	JOB_END	None

The drill job could not take an up-to-date snapshot, waited 4 minutes 18 seconds and then recovered from the snapshot taken when the source instance was being stopped. The journal on the recovery instance in Tokyo held only the records written in 2a. The records written in 2b during the 4 minutes 43 seconds up to the start of the drill were not in the recovered copy.

text
# the journal read on the recovery instance of the first drill (the last line is what the recovery instance wrote after it booted)
records 29629, invalid 0
ap-northeast-2a i-0aaaaaaaaaaaaaaaa  seq 0..29463  16:12:06.951 .. 16:38:22.335 UTC
ap-northeast-1a i-0dddddddddddddddd  seq 29464..29628  16:58:05.545 .. 16:58:14.291 UTC  gap after previous run 1183.2 s

# the second drill (started 1 minute 36 seconds after the rescan of the abrupt switch had ended)
records 57556, invalid 0
ap-northeast-2a i-0aaaaaaaaaaaaaaaa  seq 0..29469  16:12:06.951 .. 16:38:22.657 UTC
ap-northeast-2b i-0bbbbbbbbbbbbbbbb  seq 29470..52132  16:39:19.634 .. 16:59:30.922 UTC  gap after previous run 57.0 s
ap-northeast-2a i-0aaaaaaaaaaaaaaaa  seq 52133..57445  16:59:56.389 .. 17:04:41.780 UTC  gap after previous run 25.5 s
ap-northeast-1a i-0eeeeeeeeeeeeeeee  seq 57446..57555  17:13:08.724 .. 17:13:14.417 UTC  gap after previous run 506.9 s

I started the second drill 1 minute 36 seconds after the rescan of the abrupt switch had ended. This time the drill job took an up-to-date snapshot, and the recovered journal held the records written in 2a, in 2b and in 2a again, in order. The last record in the recovered copy was 1.6 seconds before the time of the snapshot.

ItemFirst drillSecond drill
StartedAfter planned switch 1, 21 s after the return to CONTINUOUSAfter the abrupt switch, 1 min 36 s after the return to CONTINUOUS
Snapshot usedThe one from before the switch (5 min 37 s before the start)A new one taken by the drill
Records recoveredUp to the records of 2a before the switchAll three runs
Job time12 min 27 s7 min 2 s
Recovered volumesTwo single-AZ gp3 volumes of 10 GiBTwo single-AZ gp3 volumes of 10 GiB

Table 3. The two drills in the Tokyo Region. The job time runs from the start to the end of the job; it took about 1 minute 40 seconds more until the instance could be reached through SSM

A state of CONTINUOUS with a lag of 0 did not mean that the data written after the switch could be recovered. The recovery point for that data begins with the first snapshot after the rescan. That snapshot appeared 71 seconds after the first drill had started, but the drill job, already running, did not use it. I read the snapshot times from the list of EBS snapshots in the recovery Region.

bash
aws ec2 describe-snapshots --region ap-northeast-1 --owner-ids self \
  --filters Name=tag-key,Values=AWSElasticDisasterRecoveryManaged \
            Name=description,Values='AWS Elastic Disaster Recovery Snapshot' \
  --query 'sort_by(Snapshots,&StartTime)[].StartTime' --output text

# the snapshots of the two volumes come in pairs at the same time (UTC, the notes are mine)
16:29:12  first snapshot of the initial sync
16:38:24  the source instance being stopped in planned switch 1
16:45:13  first snapshot after planned switch 1
16:59:31  the moment of the abrupt switch
17:02:43  end of the rescan of the abrupt switch
17:04:43  the snapshot taken by the second drill
17:13:39  the source instance being stopped in planned switch 2
17:16:26  end of the rescan of planned switch 2

A snapshot from just before the switch existed all three times. With a normal stop it appeared about 4 seconds after the stop command, and in the abrupt switch 1.6 seconds after the failover call. So the gap concerns only the data written in the new AZ after the switch. Not every snapshot in the list of EBS snapshots is a recovery point you can choose in DRS. I checked this in round 2, and it is in chapter 07.

07

The same behavior after a switch with the replication path over VPC peering

Up to here this was round 1, run with the default settings of DRS. The replication data went through a NAT gateway to the public IP of the replication server. DRS has a setting that sends the replication data to a private IP, and the User Guide names VPN, Direct Connect and VPC peering as the connection for it. I connected the VPCs in Seoul and Tokyo with inter-Region peering and ran round 2 in the same order.

The two replication paths side by side. On the public IP path the replication data (TCP 1500) and the management traffic (TCP 443) of the source instance in Seoul both pass a NAT gateway on the way to the public IP of the replication server and to the DRS and S3 endpoints in Tokyo. On the VPC peering path the replication data goes over the peering connection to the private address of the replication server, and only the management traffic passes the NAT gateway. The NAT gateways sent out 38.67 GiB and 0.02 GiB, and the NAT processing charge is 2.51 USD and 0.06 USD
Figure 3. Where the replication data and the management traffic go on the public IP path (round 1) and on the VPC peering path (round 2)

Peering changes only the path of the replication data (TCP 1500). The management traffic (TCP 443), such as the agent installation, authentication and the DRS API calls, still left through the NAT gateways in round 2. DRS does not create the peering connection or the routes, so I set them up myself.

bash
# request in Seoul, accept in Tokyo
aws ec2 create-vpc-peering-connection --region ap-northeast-2 \
  --vpc-id vpc-0aaaaaaaaaaaaaaaa --peer-vpc-id vpc-0bbbbbbbbbbbbbbbb --peer-region ap-northeast-1
aws ec2 accept-vpc-peering-connection --region ap-northeast-1 \
  --vpc-peering-connection-id pcx-0aaaaaaaaaaaaaaaa

# Seoul: from the private route tables of both AZs to the staging subnet in Tokyo
aws ec2 create-route --region ap-northeast-2 --route-table-id rtb-0aaaaaaaaaaaaaaaa \
  --destination-cidr-block 10.221.0.0/24 --vpc-peering-connection-id pcx-0aaaaaaaaaaaaaaaa
aws ec2 create-route --region ap-northeast-2 --route-table-id rtb-0bbbbbbbbbbbbbbbb \
  --destination-cidr-block 10.221.0.0/24 --vpc-peering-connection-id pcx-0aaaaaaaaaaaaaaaa

# Tokyo: from the route table of the staging subnet to the Seoul VPC
aws ec2 create-route --region ap-northeast-1 --route-table-id rtb-0cccccccccccccccc \
  --destination-cidr-block 10.220.0.0/16 --vpc-peering-connection-id pcx-0aaaaaaaaaaaaaaaa

# the two options that differ in the replication configuration template (the rest is as in chapter 01)
aws drs create-replication-configuration-template --region ap-northeast-1 \
  --data-plane-routing PRIVATE_IP --no-create-public-ip \
  --staging-area-subnet-id subnet-0aaaaaaaaaaaaaaaa --replication-servers-security-groups-ids sg-0aaaaaaaaaaaaaaaa

The security group of the replication server accepted only TCP 1500 from the two private subnets in Seoul. I changed the staging subnet to a private subnet, and the replication server started without a public IP. To reach the DRS, S3 and EC2 endpoints in Tokyo the replication server used the NAT gateway of the Tokyo VPC. Seen from the source instance, the peer of the replication connections is the private address of the replication server.

bash
# replication connections seen on the source instance (the addresses are example values)
ss -Htn state established '( dport = :1500 )' | awk '{print $3, "->", $4}'
[::ffff:10.220.10.10]:42260 -> [::ffff:10.221.0.20]:1500
[::ffff:10.220.10.10]:42262 -> [::ffff:10.221.0.20]:1500
[::ffff:10.220.10.10]:49702 -> [::ffff:10.221.0.20]:1500
[::ffff:10.220.10.10]:49718 -> [::ffff:10.221.0.20]:1500
[::ffff:10.220.10.10]:49732 -> [::ffff:10.221.0.20]:1500

aws drs get-replication-configuration --region ap-northeast-1 --source-server-id s-1234567890abcdef0 \
  --query '[dataPlaneRouting,createPublicIP,stagingAreaSubnetId,replicationServerInstanceType]'
[
    "PRIVATE_IP",
    false,
    "subnet-0aaaaaaaaaaaaaaaa",
    "t3.small"
]

The results followed the same course as in round 1. The source server ID stayed, and a rescan ran all three times. In the first move to the standby instance DRS again sent an amount close to the whole volumes.

ItemPlanned switch 1 (2a to 2b)Abrupt switch (2b to 2a)Planned switch 2 (2a to 2b)
Time the journal writes stopped56.7 s25.9 s56.2 s
Back to CONTINUOUS3 min 28 s3 min 21 s2 min 21 s
Sent by the source instance after the switch18.75 GiB0.02 GiB0.02 GiB
EBS snapshot at the end of the rescan2 min 21 s3 min 12 s2 min 20 s
First recovery point with data from after the switch8 min 22 s6 min 11 s2 min 20 s

Table 4. The three AZ switches on the VPC peering path (round 2). The amount sent is the CloudWatch metric of the source instance (NetworkOut), and recovery points are those listed by describe-recovery-snapshots. The recovery point of the abrupt switch is the snapshot a drill took; the snapshot of the 10-minute schedule appeared after 7 minutes 42 seconds

The return to CONTINUOUS was 1 minute 20 seconds faster than in round 1 for planned switch 1 and almost the same for the other two. With one run each, I cannot say that the path caused this difference.

In round 2 I compared the list of EBS snapshots with the list of recovery points in DRS. DRS also takes an EBS snapshot at the moment an instance stops and at the moment a rescan ends. However, not all of these snapshots were registered as recovery points.

bash
aws drs describe-recovery-snapshots --region ap-northeast-1 --source-server-id s-1234567890abcdef0

# compared with the list of EBS snapshots (UTC, the notes are mine)
00:48:34  recovery point  the source instance being stopped in planned switch 1, used by drill 1
00:51:23  not registered  end of the rescan of planned switch 1, the backlog still being sent
00:57:24  recovery point  10-minute schedule, the first recovery point with data from after planned switch 1
01:07:48  not registered  the moment of the abrupt switch
01:10:59  not registered  end of the rescan of the abrupt switch
01:13:58  recovery point  the snapshot taken by drill 2
01:15:29  recovery point  10-minute schedule
01:22:12  not registered  the source instance being stopped in planned switch 2
01:25:00  recovery point  end of the rescan of planned switch 2, used by drill 3

The snapshot at the end of a rescan was registered as a recovery point in one of the three switches, and the snapshots of the other two were deleted within an hour. For the first move to the standby instance, a recovery point with data from after the switch appeared only with the scheduled snapshot. In the last row of Table 2, the values of the abrupt switch and of planned switch 2 are snapshots taken at the end of a rescan. I could not verify whether those two were registered as recovery points.

I ran one drill after each switch, and the results matched what I had seen in round 1.

ItemDrill 1Drill 2Drill 3
StartedAfter planned switch 1, 12 s after the return to CONTINUOUSAfter the abrupt switch, 2 min 40 s after the returnAfter planned switch 2, 4 s after the return
Snapshot usedThe one from before the switchA new one taken by the drillThe one from the end of the rescan
Records recoveredUp to the records of 2a before the switchAll three runsAll four runs
Job time10 min 37 s6 min 2 s8 min 40 s

Table 5. The three drills on the VPC peering path (round 2). The recovered volumes were two single-AZ gp3 volumes of 10 GiB, as in round 1

Drill 1 and drill 3, started right after the return to CONTINUOUS, could not take an up-to-date snapshot, waited 3 minutes 9 seconds and recovered from the previous snapshot. In drill 1 that snapshot was from before the switch, so the records written in 2b during 3 minutes 13 seconds were missing. In drill 3 it was the snapshot from the end of the rescan, so the records written in the new AZ were recovered as well. Together with the two drills of round 1, all three drills started right after the return could not take an up-to-date snapshot. Every drill started more than 1 minute 30 seconds after the return took one.

I also checked that the replication data on the peering path does not depend on NAT. I deleted the default route to the NAT gateway from the route table of the subnet of the active instance and watched.

bash
# delete the default route to NAT from the route table of the active instance's subnet in 2b (01:37:15 UTC)
aws ec2 delete-route --route-table-id rtb-0bbbbbbbbbbbbbbbb --destination-cidr-block 0.0.0.0/0

# excerpt of the state read with describe-source-servers (UTC)
01:40:23  CONTINUOUS  lagDuration P0D
01:40:55  STALLED     lagDuration PT5M17S  AGENT_NOT_SEEN
01:42:29  STALLED     lagDuration PT6M51S  AGENT_NOT_SEEN

# last run of the journal read on the recovery instance of a drill started in this state
ap-northeast-2b i-0bbbbbbbbbbbbbbbb  seq 70560..92403  01:23:05.875 .. 01:42:36.513 UTC  gap after previous run 56.2 s

# the default route put back (01:51:44 UTC), and the state after it
aws ec2 create-route --route-table-id rtb-0bbbbbbbbbbbbbbbb --destination-cidr-block 0.0.0.0/0 \
  --nat-gateway-id nat-0bbbbbbbbbbbbbbbb
01:54:12  CONTINUOUS  lagDuration P0D

About 3 minutes 35 seconds after the default route was gone, DRS showed the source server as STALLED with the error AGENT_NOT_SEEN, which means the agent is not seen. A drill started in that state took a new snapshot, and the recovered copy held records up to 5 minutes 21 seconds after the route had been deleted. With the management traffic cut, the data still arrived over the replication connections that were already open. After I put the default route back, the state was CONTINUOUS 2 minutes 28 seconds later, without a rescan. I did not test an AZ switch or a restart of the agent while the management path is cut.

In cost, the amount processed by the NAT gateways changed. Over the whole test the NAT gateways sent out 38.67 GiB in round 1 and 0.02 GiB in round 2. With the amount received added and multiplied by the NAT processing rate of the Seoul Region (0.059 USD per GB), that is 2.51 USD for round 1 and 0.06 USD for round 2. Most of the data that passed NAT in round 2 was downloaded in the 3 minutes when the instances booted for the first time and the agent was installed.

The inter-Region data transfer charge (0.08 USD per GB from Seoul to Tokyo) applies on the peering path too. On the public IP path the NAT processing charge comes on top of it, and the amount grows by the size of the volumes in the initial sync and in the first AZ switch.

08

Where the documentation differed, and what I did not verify

These are the things I observed that differ from what the documentation describes.

  • A rescan ran in the planned switches too. The docs say a planned switch may continue without a rescan and add that a rescan may still happen. All four runs of the two rounds were the second case.
  • In the first move to the standby instance DRS sent again an amount close to the whole volumes. The docs say that the time of a rescan depends on the size and performance of the volumes and that DRS does not start a new initial sync. The state names were as documented, but the amount sent was the same as in the initial sync.
  • The docs tell you to launch a drill after the return to continuous replication, to confirm that recovery works from the data of the standby instance. Of the three drills started right after the return, two recovered the data from before the switch.
  • The CLI initialization succeeded with four of the six roles in the docs. I did not check whether the other two are needed when the agent is installed with access keys.
  • lifeCycle.lastSnapshotDateTime of the source server was empty during both rounds. The snapshot times had to come from other commands.

Right after the standby instance booted, the agent log held one error that the instance ID had changed and one that DescribeRecoveryInstances was not permitted. The replication continued normally afterwards.

Some items were left unverified.

  • The rescan time, and the transfer time of the first switch, for volumes of hundreds of GiB or more. The volumes in this test add up to 20 GiB.
  • Windows instances. The docs say that instances using EC2Launch v1 need a preparation step before a switch.
  • A data volume whose standby AZ differs from that of the root volume. The docs say such a volume is not replicated after the switch.
  • A real AZ failure and a real Region failure, and the failback from Tokyo to Seoul.
  • A setup without NAT, where the management traffic is private as well. The docs describe installing the agent through PrivateLink. I did not test VPN, Direct Connect or Transit Gateway paths either.

09

Cleaning up, the cost, and when to apply it

After the test I disconnected and deleted the source server and then removed the rest. The replication configuration template cannot be deleted while job records remain, so I deleted the jobs first. I also checked for and deleted the conversion volumes and snapshots left in Tokyo. I missed the source network record that the agent installer creates in DRS when I cleaned up round 1, and found and deleted it when I started round 2. After round 2 I also deleted the peering connection and its routes.

bash
aws drs disconnect-source-server --region ap-northeast-1 --source-server-id s-1234567890abcdef0
aws drs delete-source-server --region ap-northeast-1 --source-server-id s-1234567890abcdef0
aws drs delete-job --region ap-northeast-1 --job-id drsjob-1234567890abcdef0        # for each job
aws drs delete-replication-configuration-template --region ap-northeast-1 \
  --replication-configuration-template-id rct-1234567890abcdef0
aws drs delete-source-network --region ap-northeast-1 --source-network-id sn-1234567890abcdef0   # the record the installer created

aws ec2 terminate-instances --instance-ids i-0aaaaaaaaaaaaaaaa i-0bbbbbbbbbbbbbbbb
aws ec2 delete-volume --volume-id vol-0aaaaaaaaaaaaaaaa    # deleted by hand, DeleteOnTermination is false
aws ec2 delete-volume --volume-id vol-0bbbbbbbbbbbbbbbb

# round 2: delete the peering routes, then the peering connection
aws ec2 delete-route --region ap-northeast-2 --route-table-id rtb-0aaaaaaaaaaaaaaaa --destination-cidr-block 10.221.0.0/24   # for each route added
aws ec2 delete-vpc-peering-connection --region ap-northeast-2 --vpc-peering-connection-id pcx-0aaaaaaaaaaaaaaaa

The DRS price does not change with Multi-AZ volumes. The rate in the Tokyo Region is 0.028 USD per source server per hour, and the pricing page says that drills and recovery launches are included in it. The staging resources are billed separately.

ItemIn this testMonthly cost (calculated)
DRS replication1 source server20.44 USD
Replication server1 t3.small (shared by several source servers)19.86 USD
Staging volumesTwo magnetic volumes of 10 GiB1.60 USD
SnapshotsDepends on the amount of changeNot calculated
Multi-AZ volumes in SeoulTwo gp3 volumes of 10 GiB, twice the single-AZ price3.65 USD

Table 6. Monthly cost by component, calculated from the Tokyo and Seoul Region rates of December 2, 2026, times 730 hours. NAT gateways and inter-Region data transfer are left out

For a workload that has to cover both an AZ failure and a Region failure, this setup is worth using. You do not set DRS up again each time the instance moves to another AZ, and the added cost is about the Multi-AZ price difference of the volumes and the standby instance. When you apply it, put the items below in the plan.

  • Make the root volume Multi-AZ as well, and prepare the standby instance in advance with the same root volume and the same instance profile. An instance where only the data volumes were changed to Multi-AZ does not qualify.
  • Reflect in your recovery objectives that for a few minutes after an AZ switch the recovery point in the recovery Region is before the switch. The first move to the standby instance sends the whole volumes again, so this window grows with the volume size. Measure with the size you will run.
  • Consider one planned switch right after you prepare the standby instance. In both rounds the switches after the first one sent only a little data again. I did not check how long this effect lasts.
  • After a switch, check the times in the list of recovery points instead of the state value. Run a drill 1 to 2 minutes after the return to continuous replication and read the data.
  • Choose the replication path by the volume size and the amount of change. The public IP path is simple to set up, but the NAT processing charge applies to all replication data. If a 1 TiB volume sends its full size once in the initial sync and once in the first switch, the NAT processing charge alone is about 130 USD (calculated). The VPC peering path has no such charge and needs no public IP on the replication server. In return you manage the peering and the routes yourself, and you still need NAT or VPC endpoints for the management traffic.

If you do not need to cover a Region failure, or the application already replicates to another Region, Multi-AZ volumes alone are enough. Conversely, if the Region recovery point has to stay within seconds even right after an AZ switch, this setup could not meet that.

참고 자료References