Google Load Balancer Latency Analysis

Transforming the way people build, test & deliver software

Google Load Balancer Latency Analysis

Purpose

Perform latency test of Google Cloud Load Balancer and check API latency performance across the US region.

Approach

  • Configure Google Cloud Load Balancer(GLB)
  • Configure instance groups on Google Cloud Platform(GCP) in different available US regions
  • Configure Virtual Machines(VMs) in above-configured instance group with NGINX server deployment
  • Run latency test from different US regions

Configurations

  • 1 GLB
  • 1 VM (3.75GB RAM and 1 vCPUs) per instance group
  • NGINX serving index.html on each VM
  • 1000 test request generated from VMs of each available US regions in GCP

Cost

  • 30$/month/VM (3.75GB RAM and 1 vCPUs)
  • 1M request/day * 10KB payload/request = 1.3$/day/10GB = 39$/month/300GB
  • Total Cost in $/month = (number of instance group * number of VMs in each instance group * 30) + (number of data served in GB * 0.13 * 30)

Results

Below table shows data for API latency across different US regions on GCP.  The table shows request originated region (columns) and the number of instance group & which region instance group served the request (rows). The value represents the time taken in milliseconds.

Note: 
Yellow – US Central Region (Iowa)
Grey – US East Region 1 (South Carolina)
Green – US East Region 4 (North Virginia)
Blue – US West Region 1 (Oregon)
Pink – US West Region 2 (Los Angeles)

Google Load Balancer Latency Analysis

Below table shows API latency measurement using the website. It shows latency data across the US when GLB was configured with 5 instance group in 5 different regions.

Google Load Balancer Latency Analysis

Conclusion

Google Load Balancer does help in reducing latency but multi-region deployments have their own caveats of managing storage data like MySQL, Redis, etc. across the different region. You can always choose Google Cloud managed services like Spanner which gives out of the box support for multi-region data consistency. From the above data choose the best suited combination for your application in terms of cost, multi-region data consistency and DevOps management cost.

Tags: , , , , , ,

Leave a Reply

Your email address will not be published. Required fields are marked *