Set up a regional external Application Load Balancer with hybrid connectivity

This page illustrates how to deploy a regional external Application Load Balancer to load balancetraffic to network endpoints that are on-premises or in other public clouds andare reachable by usinghybrid connectivity.

Note: For global external Application Load Balancer instructions, seeSetting up aglobal external Application Load Balancer with hybridconnectivity.For classic Application Load Balancer instructions, seeSetting up anclassic Application Load Balancer with hybrid connectivity.

After you complete these tasks, you can optionally explore enabling additionalservices (such as Cloud CDN and Google Cloud Armor) and advanced traffic managementfeatures.

If you haven't already done so, review theHybrid connectivity NEGsoverview to understand thenetwork requirements to set up hybrid load balancing.

Note: Regional external Application Load Balancers support both the Premiumand Standard Network Service Tiers. This procedure demonstrates the setup withStandard Tier.

Setup overview

The example on this page sets up the following sample deployment:

External Application Load Balancer example for hybrid connectivity.
External Application Load Balancer example for hybrid connectivity (click to enlarge).

You must configure hybrid connectivity before you attempt to set up a hybridload balancing deployment. This document does not include the hybrid connectivitysetup.

Depending on your choice of hybrid connectivity product (eitherCloud VPN or Cloud Interconnect (Dedicated or Partner)), usethe relevant product documentation to configure this.

Permissions

To set up hybrid load balancing, you must have the following permissions:

  • On Google Cloud

    • Permissions to establish hybrid connectivity between Google Cloud andyour on-premises environment or other cloud environments. For the listof permissions needed, see the relevantNetwork Connectivity productdocumentation.
    • Permissions to create a hybrid connectivity NEG and the load balancer.TheCompute Load Balancer Adminrole(roles/compute.loadBalancerAdmin) contains the permissions required toperform the tasks described in this guide.
  • On your on-premises environment or other non-Google Cloud cloudenvironment

    • Permissions to configure network endpoints that allow services on youron-premises environment or other cloud environments to be reachable fromGoogle Cloud by using anIP:Port combination. For more information,contact your environment's network administrator.
    • Permissions to create firewall rules on your on-premises environment orother cloud environments to allow Google's health check probes to reach theendpoints.

Additionally, to complete the instructions on this page, you need to create ahybrid connectivity NEG, a load balancer, and zonal NEGs (and their endpoints)to serve as Google Cloud-based backends for the load balancer.

You should be either a projectOwneror Editor, or you should have thefollowingCompute Engine IAMroles.

TaskRequired role
Create networks, subnets, and load balancer componentsCompute Network Admin (roles/compute.networkAdmin)
Add and remove firewall rulesCompute Security Admin (roles/compute.securityAdmin)
Create instancesCompute Instance Admin (roles/compute.instanceAdmin)

Optional: Use BYOIP addresses

With bring your own IP (BYOIP), you can import your own public addresses toGoogle Cloud to use the addresses with Google Cloud resources. Forexample, if you import your own IPv4 addresses, you can assign one to theforwarding rule when you configure your load balancer. When you follow theinstructions in this document toconfigure the load balancer, provide the BYOIP address as theIP address.

For more information about using BYOIP, seeBring your own IP addresses.

Establish hybrid connectivity

Your Google Cloud and on-premises environment or other cloud environmentsmust be connected throughhybrid connectivity by usingeither Cloud Interconnect VLAN attachments or Cloud VPNtunnels with Cloud Router or Router appliance VMs. We recommend that youuse a high availability connection.

A Cloud Router enabled withglobal dynamicroutinglearns about the specific endpoint through Border Gateway Protocol (BGP) andprograms it into your Google Cloud VPC network. Regionaldynamic routing is not supported. Static routes are also not supported.

You can use either the same network or a different VPC networkwithin the same project to configure both hybrid networking(Cloud Interconnect or Cloud VPN or a Router appliance VM) and the load balancer. Notethe following:

  • If you use different VPC networks, the two networks must beconnected using either VPC Network Peering or they must beVPCspokeson the sameNetwork Connectivity Centerhub.

  • If you use the same VPC network, ensure that yourVPC network's subnet CIDR ranges don't conflict with yourremote CIDR ranges. When IP addresses overlap, subnet routes are prioritizedover remote connectivity.

For instructions, see the following documentation:

Important: Don't proceed with the instructions on this page until you set uphybrid connectivity between your environments.

Set up your environment that is outside Google Cloud

Perform the following steps to set up your on-premises environment or other cloudenvironment for hybrid load balancing:

  • Configure network endpoints to expose on-premises services toGoogle Cloud (IP:Port).
  • Configure firewall rules on your on-premises environment or other cloud environment.
  • Configure Cloud Router to advertise certain required routes to yourprivate environment.

Set up network endpoints

After you set up hybrid connectivity, you configure one or more networkendpoints within your on-premises environment or other cloud environments thatare reachable through Cloud Interconnect or Cloud VPN orRouter appliance by using anIP:port combination. ThisIP:portcombination is configured as one or more endpoints for the hybrid connectivityNEG that is created in Google Cloud later on in this process.

If there are multiple paths to the IP endpoint, routingfollows the behavior described in theCloud Routeroverview.

Set up firewall rules

The following firewall rules must be created on your on-premises environmentor other cloud environment:

  • Create an ingress allow firewall rule in on-premises or other cloud environments to allow traffic from the region'sproxy-only subnet to reach the endpoints.
  • Allowing traffic from Google's health check probe ranges isn't required for hybridNEGs. However, if you're using a combination of hybrid and zonal NEGs ina single backend service, you need to allow traffic from theGooglehealth check probe ranges for the zonal NEGs.

Advertise routes

Configure Cloud Router toadvertise the following custom IPranges to youron-premises environment or other cloud environment:

  • The range of the region's proxy-only subnet.

Set up Google Cloud environment

For the following steps, make sure you use the same VPC network(calledNETWORK in this procedure) thatwas used to configure hybrid connectivity between the environments.

Additionally, make sure the region used (calledREGION in thisprocedure) is the same as that used to create the Cloud VPN tunnel orCloud Interconnect VLAN attachment.

Configure the proxy-only subnet

This proxy-only subnet is used for all regional external Application Load Balancers in theREGION region.

Console

  1. In the Google Cloud console, go to theVPC networks page.
    Go to VPC networks
  2. Go to the network that was used to configurehybrid connectivity between the environments.
  3. ClickAdd subnet.
  4. Enter aName:PROXY_ONLY_SUBNET_NAME.
  5. Select aRegion:REGION.
  6. SetPurpose toRegional Managed Proxy.
  7. Enter anIP address range:PROXY_ONLY_SUBNET_RANGE.
  8. ClickAdd.

gcloud

Create the proxy-only subnet with thegcloud compute networks subnetscreate command.

gcloud compute networks subnets createPROXY_ONLY_SUBNET_NAME \  --purpose=REGIONAL_MANAGED_PROXY \  --role=ACTIVE \  --region=REGION \  --network=NETWORK \  --range=PROXY_ONLY_SUBNET_RANGE

Configure the load balancer subnet

This subnet is used to create the load balancer's zonal NEG backends, thefrontend, and the internal IP address.

Create this subnet in theNETWORKnetwork that was used to configure hybrid connectivity between theenvironments.

Cloud console

  1. In the Google Cloud console, go to theVPC networks page.
    Go to VPC networks
  2. Go to the network that was used to configure hybridconnectivity between the environments.
  3. In theSubnets section:
    • Set theSubnet creation mode toCustom.
    • In theNew subnet section, enter the following information:
      • Name:LB_SUBNET_NAME
      • Region:REGION
      • IP address range:LB_SUBNET_RANGE
    • ClickDone.
  4. ClickCreate.

gcloud

Create a subnet in theNETWORKnetwork that was used to configure hybrid connectivity between theenvironments.

  gcloud compute networks subnets createLB_SUBNET_NAME
--network=NETWORK
--range=LB_SUBNET_RANGE
--region=REGION

Reserve the load balancer's IP address

Note: Regional external Application Load Balancers support both the Premiumand Standard Network Service Tiers. This procedure demonstrates the setup withStandard Tier.

Cloud console

  1. In the Google Cloud console, go to theReserve a static addresspage.

    Go to Reserve a static address

  2. Enter aName:LB_IP_ADDRESS.

  3. For theNetwork Service Tier, selectStandard.

  4. ForIP version, selectIPv4.

  5. ForType, selectRegional.

  6. Select theREGION to create the address in.

  7. Leave theAttach to option for set toNone. After you create theload balancer, this IP address will be attached to the loadbalancer's forwarding rule.

  8. ClickReserve to reserve the IP address.

gcloud

  1. Reserve a regional static external IP address as follows.

    gcloud compute addresses createLB_IP_ADDRESS  \   --region=REGION \   --network-tier=STANDARD
  2. Use thecompute addresses describecommandto view the result:

    gcloud compute addresses describeLB_IP_ADDRESS  \   --region=REGION

Create firewall rules for zonal NEGs

In this example, you create the following firewall rules for the zonal NEGbackends on Google Cloud:

  • fw-allow-health-check: An ingress firewall rule, applicable to theinstances being load balanced, that allows traffic from the load balancer andGoogle Cloud health checking systems (130.211.0.0/22and35.191.0.0/16). This example uses the target tagallow-health-check toidentify the backend VMs to which it should apply.Allowing traffic from Google's health check probe ranges isn't required for hybridNEGs. However, if you're using a combination of hybrid and zonal NEGs ina single backend service, you need to allow traffic from theGooglehealth check probe ranges for the zonal NEGs.
  • fw-allow-proxy-only-subnet: An ingress firewall rule that allows connectionsfrom the proxy-only subnet to reach the backends. This example uses the targettagallow-proxy-only-subnet to identify the backend VMs to which it shouldapply.

Console

  1. In the Google Cloud console, go to theFirewall policies page.
    Go to Firewall policies
  2. ClickCreate firewall rule to create the rule to allow traffic fromhealth check probes:
    1. Enter aName offw-allow-health-check.
    2. UnderNetwork, selectNETWORK.
    3. UnderTargets, selectSpecified target tags.
    4. Populate theTarget tags field withallow-health-check.
    5. SetSource filter toIPv4 ranges.
    6. SetSource IPv4 ranges to130.211.0.0/22 and35.191.0.0/16.
    7. UnderProtocols and ports, selectSpecified protocols andports.
    8. SelectTCP and then enter80 for the port number.
    9. ClickCreate.
  3. ClickCreate firewall rule again to create the rule to allow incomingconnections from the proxy-only subnet:
    1. Name:fw-allow-ssh
    2. Network:NETWORK
    3. Priority:1000
    4. Direction of traffic: ingress
    5. Action on match: allow
    6. Targets: Specified target tags
    7. Target tags:allow-proxy-only-subnet
    8. Source filter:IPv4 ranges
    9. Source IPv4 ranges:PROXY_ONLY_SUBNET_RANGE
    10. Protocols and ports: ChooseSpecified protocols and ports
    11. SelectTCP and then enter80 for the port number.
    12. ClickCreate.

gcloud

  1. Create thefw-allow-health-check-and-proxy rule to allowthe Google Cloud health checks to reach thebackend instances on TCP port80:

    gcloud compute firewall-rules create fw-allow-health-check \    --network=NETWORK \    --action=allow \    --direction=ingress \    --target-tags=allow-health-check \    --source-ranges=130.211.0.0/22,35.191.0.0/16 \    --rules=tcp:80
  2. Create an ingress allow firewall rule for the proxy-only subnet to allowthe load balancer to communicate with backend instances on TCP port80:

    gcloud compute firewall-rules create fw-allow-proxy-only-subnet \    --network=NETWORK \    --action=allow \    --direction=ingress \    --target-tags=allow-proxy-only-subnet \    --source-ranges=PROXY_ONLY_SUBNET_RANGE \    --rules=tcp:80

Set up the zonal NEG

For Google Cloud-based backends, we recommend you configure multiple zonalNEGs in the same region where you configuredhybridconnectivity.

For this example, we set up a zonal NEG (withGCE_VM_IP_PORT type endpoints)in theREGION region. First create the VMs intheGCP_NEG_ZONE zone. Thencreate a zonal NEG in the sameGCP_NEG_ZONE andadd the VMs' network endpoints to the NEG.

Create VMs

Console

  1. Go to the VM instances page in the Google Cloud console.
    Go to VM instances
  2. ClickCreate instance.
  3. Set theName tovm-a1.
  4. For theRegion, chooseREGION, and chooseanyZone.This will be referred to asGCP_NEG_ZONEin this procedure.
  5. In theBoot disk section, ensure thatDebian GNU/Linux 12 (bookworm) is selected for the boot diskoptions. ClickChoose to change the image if necessary.
  6. ClickAdvanced options and make the following changes:

    • ClickNetworking and add the followingNetwork tags:allow-ssh,allow-health-check, andallow-proxy-only-subnet.
    • ClickEdit underNetwork interfaces and make the following changes then clickDone:
      • Network:NETWORK
      • Subnet:LB_SUBNET_NAME
    • ClickManagement. In theStartup script field, copy and pastethe following script contents. The script contents are identical forall four VMs:

      #! /bin/bashapt-get updateapt-get install apache2 -ya2ensite default-ssla2enmod sslvm_hostname="$(curl -H "Metadata-Flavor:Google" \http://metadata.google.internal/computeMetadata/v1/instance/name)"echo "Page served from: $vm_hostname" | \tee /var/www/html/index.htmlsystemctl restart apache2
  7. ClickCreate.

  8. Repeat the following steps to create a second VM, using the followingname and zone combination:

    • Name:vm-a2, zone:GCP_NEG_ZONE

gcloud

Create the VMs by running the following command two times, using these combinations for the name of the VM and its zone. The script contents are identical for both VMs.

  • VM_NAME ofvm-a1 andGCP_NEG_ZONE zone ofyour choice
  • VM_NAME ofvm-a2 and the sameGCP_NEG_ZONE zone

    gcloud compute instances createVM_NAME \    --zone=GCP_NEG_ZONE \    --image-family=debian-12 \    --image-project=debian-cloud \    --tags=allow-ssh,allow-health-check,allow-proxy-only-subnet \    --subnet=LB_SUBNET_NAME \    --metadata=startup-script='#! /bin/bash      apt-get update      apt-get install apache2 -y      a2ensite default-ssl      a2enmod ssl      vm_hostname="$(curl -H "Metadata-Flavor:Google" \      http://metadata.google.internal/computeMetadata/v1/instance/name)"      echo "Page served from: $vm_hostname" | \      tee /var/www/html/index.html      systemctl restart apache2'

Create the zonal NEG

Console

To create a zonal network endpoint group:

  1. Go to the Network Endpoint Groups page in the Google Cloud console.
    Go to the Network Endpoint Groups page
  2. ClickCreate network endpoint group.
  3. Enter aName for the zonal NEG. Referred to asGCP_NEG_NAME in thisprocedure.
  4. Select theNetwork endpoint group type:Network endpoint group(Zonal).
  5. Select theNetwork:NETWORK
  6. Select theSubnet:LB_SUBNET_NAME
  7. Select theZone:GCP_NEG_ZONE
  8. Enter theDefault port:80.
  9. ClickCreate.

Add endpoints to the zonal NEG:

  1. Go to the Network Endpoint Groups page in the Google Cloud console.
    Go to the Network endpoint groups
  2. Click theName of the network endpoint group created in the previousstep (GCP_NEG_NAME). Yousee theNetwork endpoint group details page.
  3. In theNetwork endpoints in this group section, clickAdd networkendpoint. You see theAdd network endpoint page.
  4. Select aVM instance to add its internal IP addresses as networkendpoints. In theNetwork interface section, the name, zone,and subnet of the VM is displayed.
  5. In theIPv4 address field, enter the IPv4 address of the new networkendpoint.
  6. Select thePort type.
    1. If you selectDefault, the endpoint uses the default port80for all endpoints in the network endpoint group. This is sufficientfor our example because the Apache server is serving requests atport80.
    2. If you selectCustom, enter thePort number for the endpointto use.
  7. To add more endpoints, clickAdd network endpoint and repeat theprevious steps.
  8. After you add all the endpoints, clickCreate.

gcloud

  1. Create a zonal NEG (withGCE_VM_IP_PORT endpoints)using thegcloud compute network-endpoint-groupscreatecommand:

    gcloud compute network-endpoint-groups createGCP_NEG_NAME \    --network-endpoint-type=GCE_VM_IP_PORT \    --zone=GCP_NEG_ZONE \    --network=NETWORK \    --subnet=LB_SUBNET_NAME

    You can either specify a--default-port while creating the NEG in thisstep, orspecify a port number for eachendpointas shown in the next step.

  2. Add endpoints toGCP_NEG_NAME.

    gcloud compute network-endpoint-groups updateGCP_NEG_NAME \    --zone=GCP_NEG_ZONE \    --add-endpoint='instance=vm-a1,port=80' \    --add-endpoint='instance=vm-a2,port=80'

Set up the hybrid connectivity NEG

Note: If you're usingdistributed Envoy healthchecks with hybrid connectivity NEG backends (supported only forEnvoy-basedload balancers), make sure that you configure unique networkendpoints for all the NEGs attached to the same backend service. Addingthe same network endpoint to multiple NEGs results in undefined behavior.

When creating the NEG, use a zone that minimizes the geographicdistance between Google Cloud and your on-premises or other cloudenvironment. For example, if you are hosting a service in an on-premisesenvironment in Frankfurt, Germany, you can specify theeurope-west3-aGoogle Cloud zone when you create the NEG.

Moreover, if you're using Cloud Interconnect, the zone usedto create the NEG should be in the same region where theCloud Interconnect attachment was configured.

For the available regions and zones, see theCompute Enginedocumentation: Available regions andzones.

Console

To create a hybrid connectivity network endpoint group:

  1. Go to the Network Endpoint Groups page in the Google Cloud console.
    Go to Network endpoint groups
  2. ClickCreate network endpoint group.
  3. Enter aName for the hybrid NEG. Referred to asON_PREM_NEG_NAME in thisprocedure.
  4. Select theNetwork endpoint group type:Hybrid connectivity networkendpoint group (Zonal).
  5. Select theNetwork:NETWORK
  6. Select theSubnet:LB_SUBNET_NAME
  7. Select theZone:ON_PREM_NEG_ZONE
  8. Enter theDefault port.
  9. ClickCreate

Add endpoints to the hybrid connectivity NEG:

  1. Go to the Network Endpoint Groups page in the Google Cloud console.
    Go to the Network Endpoint Groups page
  2. Click theName of the network endpoint group created in the previousstep (ON_PREM_NEG_NAME). Yousee theNetwork endpoint group detail page.
  3. In theNetwork endpoints in this group section, clickAdd networkendpoint. You see theAdd network endpoint page.
  4. Enter theIP address of the new network endpoint.
  5. Select thePort type.
    1. If you selectDefault, the endpoint uses the default portfor all endpoints in the network endpoint group.
    2. If you selectCustom, you can enter a differentPort numberfor the endpoint to use.
  6. To add more endpoints, clickAdd network endpoint and repeat theprevious steps.
  7. After you add all the non-Google Cloud endpoints,clickCreate.

gcloud

  1. Create a hybrid connectivity NEG using thegcloud compute network-endpoint-groupscreatecommand.

    gcloud compute network-endpoint-groups createON_PREM_NEG_NAME \    --network-endpoint-type=NON_GCP_PRIVATE_IP_PORT \    --zone=ON_PREM_NEG_ZONE \    --network=NETWORK
  2. Add the on-premises backend VM endpoint toON_PREM_NEG_NAME:

    gcloud compute network-endpoint-groups updateON_PREM_NEG_NAME \    --zone=ON_PREM_NEG_ZONE \    --add-endpoint="ip=ON_PREM_IP_ADDRESS_1,port=PORT_1" \    --add-endpoint="ip=ON_PREM_IP_ADDRESS_2,port=PORT_2"

You can use this command to add the network endpoints youpreviouslyconfigured on-premises or in your cloud environment.Repeat--add-endpoint as many times as needed.

You can repeat these steps to create multiple hybrid NEGs if needed.

Configure the load balancer

Create the load balancer with both zonal and hybrid NEG backends.

Console

Note: You cannot use the Google Cloud console to create a load balancerthat has mixed zonal and hybrid connectivity NEGs backends in a singlebackend service. Use eithergcloud or the REST API instead.

gcloud

  1. Create ahealth check for the backends.
       gcloud compute health-checks create httpHTTP_HEALTH_CHECK_NAME \       --region=REGION \       --use-serving-port
    Health check probes for hybrid NEG backends originate from Envoy proxies in the proxy-only subnet, whereas probes for zonal NEG backends originate from [Google's central probe IP ranges](/load-balancing/docs/health-check-concepts#ip-ranges).
  2. Create a backend service. You add both the zonal NEG and the hybrid connectivity NEG as backends to this backend service.
      gcloud compute backend-services createBACKEND_SERVICE \      --load-balancing-scheme=EXTERNAL_MANAGED \      --protocol=HTTP \      --health-checks=HTTP_HEALTH_CHECK_NAME \      --health-checks-region=REGION \      --region=REGION
  3. Add the zonal NEG as a backend to the backend service.
    gcloud compute backend-services add-backendBACKEND_SERVICE \    --region=REGION \    --balancing-mode=RATE \    --max-rate-per-endpoint=MAX_REQUEST_RATE_PER_ENDPOINT \    --network-endpoint-group=GCP_NEG_NAME \    --network-endpoint-group-zone=GCP_NEG_ZONE
    For details about configuring the balancing mode, see the gcloud CLI documentation for the--max-rate-per-endpoint parameter.
  4. Add the hybrid NEG as a backend to the backend service.
    gcloud compute backend-services add-backendBACKEND_SERVICE \    --region=REGION \    --balancing-mode=RATE \    --max-rate-per-endpoint=MAX_REQUEST_RATE_PER_ENDPOINT \    --network-endpoint-group=ON_PREM_NEG_NAME \    --network-endpoint-group-zone=ON_PREM_NEG_ZONE
    For details about configuring the balancing mode, see the gcloud CLI documentation for the--max-rate-per-endpoint parameter.
  5. Create a URL map to route incoming requests to the backend service:
    gcloud compute url-maps createURL_MAP_NAME \    --default-serviceBACKEND_SERVICE \    --region=REGION
  6. Optional: Perform this step if you are using HTTPS between the client andthe load balancer. This step is not required for HTTP load balancers.

    You can create either Compute Engine or Certificate Manager certificates. Use any of the following methods to create certificates using Certificate Manager:

    After you create certificates, attach the certificate directly to the targetproxy.

    To create a Compute Engine self-managed SSL certificate resource:
    gcloud compute ssl-certificates createSSL_CERTIFICATE_NAME \    --certificateCRT_FILE_PATH \    --private-keyKEY_FILE_PATH
  7. Create a target HTTP(S) proxy to route requests to your URL map.

    For an HTTP load balancer, create an HTTP target proxy:
    gcloud compute target-http-proxies createTARGET_HTTP_PROXY_NAME \    --url-map=URL_MAP_NAME \    --url-map-region=REGION \    --region=REGION
    For an HTTPS load balancer, create an HTTPS target proxy.The proxy is the portion of the loadbalancer that holds the SSL certificate for HTTPS load balancing, so youalso load your certificate in this step.
    gcloud compute target-https-proxies createTARGET_HTTPS_PROXY_NAME \    --ssl-certificates=SSL_CERTIFICATE_NAME \    --url-map=URL_MAP_NAME \    --url-map-region=REGION \    --region=REGION
  8. Create a forwarding rule to route incoming requests to the proxy. Don'tuse the proxy-only subnet to create the forwarding rule.

    For an HTTP load balancer:
      gcloud compute forwarding-rules createHTTP_FORWARDING_RULE_NAME \      --load-balancing-scheme=EXTERNAL_MANAGED \      --network=NETWORK \      --subnet=LB_SUBNET_NAME \      --address=LB_IP_ADDRESS \      --ports=80 \      --region=REGION \      --target-http-proxy=TARGET_HTTP_PROXY_NAME \      --target-http-proxy-region=REGION
    For an HTTPS load balancer:
      gcloud compute forwarding-rules createHTTPS_FORWARDING_RULE_NAME \      --load-balancing-scheme=EXTERNAL_MANAGED \      --network=NETWORK \      --subnet=LB_SUBNET_NAME \      --address=LB_IP_ADDRESS \      --ports=443 \      --region=REGION \      --target-http-proxy=TARGET_HTTPS_PROXY_NAME \      --target-http-proxy-region=REGION

Connect your domain to your load balancer

After the load balancer is created, note the IP address that is associated withthe load balancer—for example,30.90.80.100. To point your domain to yourload balancer, create anA record by using your domain registration service. Ifyou added multiple domains to your SSL certificate, you must add anA recordfor each one, all pointing to the load balancer's IP address. For example, tocreateA records forwww.example.com andexample.com, use the following:

NAME                  TYPE     DATAwww                   A        30.90.80.100@                     A        30.90.80.100

If you use Cloud DNS as your DNS provider, seeAdd, modify, and delete records.

Test the load balancer

Note: It might take a few minutes for the load balancer configuration topropagate after you first deploy it.

Now that you have configured your load balancer, you can start sendingtraffic to the load balancer's IP address.

  1. Go to the Load balancing page in the Google Cloud console.
    Go to Load balancing
  2. Click on the load balancer you just created.
  3. Note theIP Address of the load balancer.
  4. Send traffic to the load balancer.

    • If you created anHTTP load balancer, you can test your load balancerusing a web browser by going tohttp://IP_ADDRESS.ReplaceIP_ADDRESS with the load balancer's IPaddress. You should be directed to the service you have exposed through theendpoint.

    • If you created anHTTPS load balancer, you can test your load balancerby usingcurl as follows. ReplaceIP_ADDRESS withtheload balancer's IP address. Youshould be directed to the service you have exposed through the endpoint.

      curl -k https://IP_ADDRESS

      If that does not work and you are using a Google-managed certificate,confirm that your certificate resource's status is ACTIVE. For moreinformation, seeGoogle-managed SSL certificate resourcestatus.Then test the domain pointing to the load balancer's IP address. Forexample:

      curl -s https://DOMAIN_NAME

      ReplaceDOMAIN_NAME with your application domain name, forexample,test.example.com.

  5. Testing the non-Google Cloud endpoints depends on the service you haveexposed through the hybrid NEG endpoint.

What's next

Except as otherwise noted, the content of this page is licensed under theCreative Commons Attribution 4.0 License, and code samples are licensed under theApache 2.0 License. For details, see theGoogle Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.

Last updated 2025-12-15 UTC.