Skip to content

Commit

Permalink
Editorial for infra and traffic
Browse files Browse the repository at this point in the history
Signed-off-by: Archer <[email protected]>
  • Loading branch information
Naarcha-AWS committed Dec 3, 2024
1 parent 5c49297 commit e7a6244
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 18 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,4 @@ cdk destroy "*" --c contextId=<CONTEXT_ID>

Follow the instructions on the command-line to remove the deployed resources from the AWS account.

The AWS Console can also be used to verify, remove, and confirm resources for the Migration Assistant are no longer in the account.
The AWS Management Console can also be used to remove Migration Assistant resources and confirm that they are no longer in the account.
Original file line number Diff line number Diff line change
Expand Up @@ -7,44 +7,44 @@ parent: Migration phases

# Switching traffic from the source cluster

After the source and target clusters are in sync traffic needs to be switched to the target cluster so the source cluster can be taken offline.
After the source and target clusters are synchronized, traffic needs to be switched to the target cluster so that the source cluster can be taken offline.

## Assumptions

This page assumes the following has occurred before making the switch:
This page assumes that the following has occurred before making the switch:

- All client traffic is being routed through switchover listener in [MigrationAssistant ALB]({{site.url}}{{site.baseurl}}/migrations/migration-phases/backfill/).
- Client traffic has been verified to be compatible with target cluster.
- Target cluster is in a good state to accept client traffic.
- All client traffic is being routed through a switchover listener in the [MigrationAssistant Application Load Balancer]({{site.url}}{{site.baseurl}}/migrations/migration-phases/backfill/).
- Client traffic has been verified as compatible with the target cluster.
- The target cluster is in a good state to accept client traffic.
- The target proxy service is deployed.

## Switching traffic

Use the following steps to switch traffic from the source cluster to the target cluster:

1. In the AWS Console, navigate to **ECS** > **Migration Assistant Cluster**. Note down the desired count of the capture proxy, which should be greater than 1.
1. In the AWS Management Console, navigate to **ECS** > **Migration Assistant Cluster**. Note the desired count of the capture proxy, which should be greater than 1.

2. Update the **ECS Service** of the Target Proxy to be at least as large as the Traffic Capture Proxy. Wait for tasks to startup and verify all targets are healthy within the Target Proxy Service's "Load balancer health".
2. Update the **ECS Service** of the target proxy to be at least as large as the traffic capture proxy. Wait for tasks to start up, and verify that all targets are healthy in the target proxy service's **Load balancer health** section.

3. Within the AWS Console, navigate to **EC2** > **Load Balancers** > **Migration Assistant ALB**.
3. Navigate to **EC2** > **Load Balancers** > **Migration Assistant ALB**.

4. Navigate to **ALB Metrics** and examine any useful information, specifically looking at Active Connection Count and New Connection Count. Note any big discrepancies, which can indicate reused connections affecting traffic switchover.
4. Navigate to **ALB Metrics** and examine any useful information, specifically looking at **Active Connection Count** and **New Connection Count**. Note any large discrepancies, which can indicate reused connections affecting traffic switchover.

5. Navigate to the **Capture Proxy Target Group** (`ALBSourceProxy-<STAGE>-TG`) > **Monitoring**.
5. Navigate to **Capture Proxy Target Group** (`ALBSourceProxy-<STAGE>-TG`) > **Monitoring**.

6. Examine **Metrics Requests**, **Target (2XX, 3XX, 4XX, 5XX)**, and **Target Response Time** Metrics. Verify that this looks as expected and includes all traffic expected to be included in the switchover. Note details that would help identify anomalies during the switchover, including expected response time and response code rate.
6. Examine the **Metrics Requests**, **Target (2XX, 3XX, 4XX, 5XX)**, and **Target Response Time** metrics. Verify that this appears as expected and includes all traffic expected to be included in the switchover. Note details that could help identify anomalies during the switchover, including the expected response time and response code rate.

7. Navigate back to ALB and click on **Target Proxy Target Group** (`ALBTargetProxy-<STAGE>-TG`). Verify all expected targets are healthy and none are in draining state.
7. Navigate back to **ALB Metrics** and choose **Target Proxy Target Group** (`ALBTargetProxy-<STAGE>-TG`). Verify that all expected targets are healthy and that none are in a draining state.

8. Navigate back to ALB and to the **Listener** on port `9200`.
8. Navigate back to **ALB Metrics** and to the **Listener** on port `9200`.

9. Click on the **Default rule** and **Edit**.
9. Choose the **Default rule** and **Edit**.

10. Modify the weights of the targets to shift desired traffic over to the target proxy. To perform a full switchover, modify the weight to `1` on the **Target Proxy** and `0` on the **Source Proxy**.
10. Modify the weights of the targets to switch the desired traffic to the target proxy. To perform a full switchover, modify the **Target Proxy** weight to `1` and the **Source Proxy** weight to `0`.

11. Click **Save Changes**.
11. Choose **Save Changes**.

12. Navigate to both **SourceProxy** and **TargetProxy TG Monitoring** metrics and verify traffic is shifting over as expected. If connections are being reused by clients, perform any actions if needed to terminate those to get the clients to shift over. Monitor until SourceProxy TG shows 0 requests when it is known all clients have switched over.
12. Navigate to both **SourceProxy** and **TargetProxy TG Monitoring** metrics and verify that traffic is switching over as expected. If connections are being reused by clients, perform any necessary actions to terminate them. Monitor these metrics until **SourceProxy TG** shows 0 requests when all clients have switched over.


## Fallback
Expand Down

0 comments on commit e7a6244

Please sign in to comment.