Roll back migrated resources to classic Application Load Balancer

This document describes how to roll back the migrated resources from the global external Application Load Balancer infrastructure to the classic Application Load Balancer infrastructure.

Use the following order to roll back a migrated resource within 90 days of changing its load balancing scheme:

  1. Forwarding rules.
  2. Traffic to backend buckets attached to the forwarding rules.
  3. Backend services attached to the forwarding rules.
  4. Traffic to backend services attached to the forwarding rules.

To roll back a backend service to the EXTERNAL load balancing scheme, you must roll back the forwarding rule too. To roll back a forwarding rule to the EXTERNAL load balancing scheme, you don't need to roll back the attached backend services. If any backend buckets are attached to the forwarding rule, you must change the state of the backend buckets to TEST_ALL_TRAFFIC.

Before you begin

Before you roll back migrated resources, make sure that you've migrated the classic Application Load Balancer resources to the global external Application Load Balancer infrastructure and changed their load balancing schemes to EXTERNAL_MANAGED. Remember, only resources that were migrated to the EXTERNAL_MANAGED scheme from the EXTERNAL scheme in the last 90 days can be rolled back.

You must also remove any new advanced traffic management features configured on the resources before you start rolling back the resources.

Permissions

To follow this document, you must have permissions to manage load balancer components. Make sure you have the Compute Network Admin role (roles/compute.networkAdmin).

For more information, see the following pages:

Roll back the forwarding rule

  1. Change the load balancing scheme of the forwarding rule from EXTERNAL_MANAGED to EXTERNAL.

    If a backend bucket is attached to the forwarding rule, skip this step and roll back the backend bucket.

    gcloud beta compute forwarding-rules update web-map-http-forwarding-rule \
        --load-balancing-scheme=EXTERNAL \
        --global
    

    Wait for some time (approximately six minutes).

  2. Optional: Check the logs of the forwarding rule. You see the load balancing scheme has changed to EXTERNAL.

Roll back the backend bucket

  1. Change the scheme of the backend bucket to EXTERNAL and the migration state to TEST_ALL_TRAFFIC.

    gcloud beta compute forwarding-rules update web-map-http-forwarding-rule \
        --load-balancing-scheme=EXTERNAL \
        --external-managed-backend-bucket-migration-state=TEST_ALL_TRAFFIC \
        --global
    

    Wait for some time (approximately six minutes).

  2. Optional: To send some classic Application Load Balancer network traffic to the backend bucket, change the migration state of the backend bucket to TEST_BY_PERCENTAGE and set the percentage.

    gcloud beta compute forwarding-rules update web-map-http-forwarding-rule \
        --external-managed-backend-bucket-migration-state=TEST_BY_PERCENTAGE \
        --external-managed-backend-bucket-migration-testing-percentage=10 \
        --global
    

    Wait for some time (approximately six minutes).

  3. Change the migration state of the backend bucket to PREPARE.

    gcloud beta compute forwarding-rules update web-map-http-forwarding-rule \
        --external-managed-backend-bucket-migration-state=PREPARE \
        --global
    

    Wait for some time (approximately six minutes).

  4. Change the migration state of the backend bucket to its pre-migration state.

    gcloud beta compute forwarding-rules update web-map-http-forwarding-rule \
        --clear-external-managed-migration-state \
        --global
    

    Wait for some time (approximately six minutes).

Roll back the backend service

  1. Change the scheme of the backend service to EXTERNAL and the migration state to TEST_ALL_TRAFFIC.

    gcloud beta compute backend-services update web-backend-service \
        --load-balancing-scheme=EXTERNAL \
        --external-managed-migration-state=TEST_ALL_TRAFFIC \
        --global
    

    Wait for some time (approximately six minutes).

  2. Optional: To send some classic Application Load Balancer network traffic to the backend service, change the migration state of the backend service to TEST_BY_PERCENTAGE and set the percentage.

    gcloud beta compute backend-services update web-backend-service \
        --external-managed-migration-state=TEST_BY_PERCENTAGE \
        --external-managed-migration-testing-percentage=10 \
        --global
    

    Wait for some time (approximately six minutes).

  3. Change the migration state of the backend service to PREPARE.

    gcloud beta compute backend-services update web-backend-service \
        --external-managed-migration-state=PREPARE \
        --global
    

    Wait for some time (approximately six minutes).

  4. Change the migration state of the backend service to its pre-migration state.

    gcloud beta compute backend-services update web-backend-service \
        --clear-external-managed-migration-state \
        --global
    

    Wait for some time (approximately six minutes).

  5. After rolling back the backend service, check its log. You see the load balancing scheme has changed to EXTERNAL.