Set up GCP Load Balancers

During initial deployment, an instance group for Reblaze was created. In this step, you will attach this group to HTTP and HTTPS load balancing services as a backend of the service.

Related video: Reblaze via Google Cloud Marketplace: Routing Traffic. This video includes explanations for both Set up GCP Health Checks (previous topic) and Set up GCP Load Balancers (this topic).

It is beyond the scope of this document to describe all the possible load balancer settings. More information about Google’s load balancing can be found at https://cloud.google.com/compute/docs/load-balancing/. If you have any questions, feel free to contact us at support@reblaze.com.

Once you set up the load balancers (LB), traffic will be routed through them to Reblaze. Using these load balancers allows GCP to create more instances as needed to handle the traffic.

For most use cases, you will need to set up two load balancers, one for HTTP and one for HTTPS. The following steps assume that you will be setting up two load balancers. Therefore, the processes described here will be done twice, with some addition steps for HTTPS. The differences between the setup for the HTTP LB and the setup for the HTTPs LB will be noted.

  1. When an HTTPS ( port 443 ) is required, create an additional load balancer and choose the HTTPS protocol. The steps for this are the same as creating an HTTP LB, with additional steps within the frontend configuration process.

  2. After you have created the required load balancers, return to the main GCP section for the final steps needed to get Reblaze running on your website.

Create a load balancer

  1. Click Create load balancer.

  2. Click Start configuration for the appropriate type:

    • If you need non-standard ports, then use the TCP load balancer instead.

  3. Enter a name for the load balancer. We recommend that you include the protocol of this load balancer as part of the name (HTTP or HTTPS), for example, LB1-http or LB2-https. Continue with Create the backend service.

Create the backend service

  1. Enter a name for the backend service. We recommend that you include the protocol of this load balancer as part of the name (HTTP or HTTPS), for example, BE1-http or BE2-https.

  2. In the New backend fields:.

    1. Select the Instance group that was created when you deployed Reblaze in GCP. The same instance group can be used for both HTTP and HTTPS.

    2. In the Instance group has named ports popup, make sure to select the correct port for each protocol (80 or 443). 80 is the default value.

    3. Click Use selected port name

    4. Select the Port numbers. Make sure that the port number selected matched the protocol that this LB is for.

    5. For Balancing mode, select Rate, and enter 1000000 for Maximum RPS. This ensures that all servers stay available during a traffic spike unless a health check indicates otherwise.

    6. Click Done for New backend.

  3. (optional) Enable Google Cloud CDN.

  4. Select the Health check that you previously created for this protocol. Make sure to use the matching health check that was created for the load balancer you are now creating (HTTP or HTTPS).

  5. Review the remaining values on the page to see that they are appropriate for your application environment.

  6. Click Create for the backend service.

Select host and path rules

Select frontend configuration

  1. Enter a name for the frontend. We recommend that you include the protocol of this load balancer as part of the name (HTTP or HTTPS), for example, FE1-http or FE2-https.

  2. For Protocol, select the protocol that was created for the load balancer you are now creating (HTTP or HTTPS). HTTP is the default value.

  3. For most use cases, you will want to reserve a static IP address.

    If this is the first load balancer you are creating (usually HTTP), for IP address do the following:

    1. Select Create IP address.

    2. In the Reserve a new static IP address dialog, enter a name. The name for this IP address should not have the protocol embedded within it, since it will be the same for all load balancers that you create.

    3. Click Reserve. GCP will reserve an IP address and it will now appear in the IP address field in the frontend configuration panel. Tip: Make a note of the IP address provided by GCP. You will need it later at the end of the configuration process.

    If this is an additional LB (usually HTTPS):

    • For IP address, select the IP address previously created for the first LB.

  4. HTTPS only: If this load balancer is for HTTPS, you need to add or create a SSL certificate.

    1. For Certificate, select Create a new certificate.

    2. Enter a name for the certificate.

    3. You can either use a certificate you already have, or create a new one:

    4. To use an existing certificate:

      • Enter the certificate information.

      • Click Create for the certificate..

    5. To create a Google-managed certificate:

      • Select Create Google-managed certificate.

      • Enter the domains to which this certificate will apply. Multiple domains can be entered.

      • Click Create for the certificate.

  5. Click Done in the Frontend configuration panel.

Complete the load balancer creation process

  • Once you have completed all the required components for the load balancer, click Create in the Load balancer panel. The load balancer is then created. The IP address provided is the destination for your website traffic.

Last updated