Network configuration for data transfer and latency

  1. Home
  2. Network configuration for data transfer and latency

Go back to GCP Tutorials

In this tutorial, we will learn and understand Network configuration for data transfer and latency.

Steps to better GCP network performance

Know your tools

The first step in bettering your environment is to test your networking performance. The following are the tools I use on a regular basis:

  • Firstly, Iperf is a commonly used network testing tool that can create TCP/UDP data streams and measure the throughput of the network that carries them.
  • Secondly, Netperf is another good network testing tool, which is also used by the PerfKitBenchmark suite to test performance and benchmark the various cloud providers against one another.
  • Lastly, a traceroute is a computer network diagnostic tool to measure and display packets’ routes across a network. It records the route’s history as the round-trip times of the packets received from each successive host in the route. However, the sum of the mean times in each hop is a measure of the total time spent to establish the connection.
Put instances in the right zones
  • One important thing to remember about network latency is that it’s a function of physics. That is to say, the speed of light traveling in a vacuum is 300,000 km/s, meaning that it takes about 10ms to travel a distance of ~3000km. But because the internet is built on fiber-optic cable, which slows things down by a factor of ~1.52, data can only travel 1,973km one way in that same 10ms.
Use internal over external IPs
  • Any time you transfer data or communicate between VMs. Then you may get the best performance by communicating over the internal IP address. The difference in speed might be significant in many circumstances.
Rightsize your TCP window
  • The Transmission Control Protocol (aka TCP) works by sending windows of data over the internet, relying on a straightforward system of handshakes and acknowledgements. This is to ensure arrival and integrity of the data, and in some cases, to resend it.
    • On the plus side, this means that the internet is extremely stable.
    • On the down side, it generates a lot of extra traffic.
  • When the sender or receiver, on the other hand, comes to a halt and waits for ACKs for prior windows/packets. As a result, gaps in the data flow appear, reducing the connection’s maximum capacity.
Performance Strategies
  • Firstly, Evaluate performance requirements. Determine the priority of your various applications and what minimum performance you require of them.
  • Secondly, Use scalable design patterns. Improve scalability and performance with autoscaling, compute choices, and storage configurations.
  • Lastly, Identify and implement cost-saving approaches. Evaluate cost for each running service while associating priority to optimize for service availability and cost.
gcp cloud architect practice tests

Use autoscaling and data processing

Use autoscaling so that as load increases or decreases, the services add or release resources to match.

Compute Engine autoscaling

  • Managed instance groups (MIGs) let you scale your stateless apps on multiple identical VMs, so that a group of Compute Engine resources is launched based on a single template.
  • Autoscaling rules also include scaling depending on CPU utilisation, load balancing capacity, Cloud Monitoring metrics, or a queue-based workload, such as Pub/Sub, for zonal MIGs.
Google Kubernetes Engine autoscaling
  • You may utilise Google Kubernetes Engine’s (GKE) cluster autoscaler capability to control your cluster’s node pool based on the demand of your workloads.
  • Cluster autoscaler, on the other hand, automatically raises or reduces the size of the node pool based on the resource needs of Pods operating on the node pool’s nodes.

Serverless autoscaling

  • Cloud Run, App Engine, and Cloud Functions are all serverless computing alternatives with autoscaling features. Scale your microservices or functions with these serverless choices.

Data processing

  • To scale your data pipelines and data processing, Dataproc and Dataflow provide autoscaling options. Use these parameters to give your pipelines access to extra computer resources based on the amount of work they’re doing.

Use GPUs and TPUs to increase performance

Google Cloud provides options to accelerate the performance of your workloads. However, you can use these specialized hardware platforms to increase your application and data processing performance.

Graphics Processing Unit (GPU)

  • Compute Engine provides GPUs that you can add to your virtual machine instances. However, you can use these GPUs to accelerate specific workloads on your instances such as machine learning and data processing.

Tensor Processing Unit (TPU)

  • A TPU is specifically designed as a matrix processor by Google for machine learning workloads. Further, TPUs are best for massive matrix operations with a large pipeline, with significantly less memory access.

Analyze your costs and optimize

  • The first step in optimizing your cost is to understand your current usage and costs. Google Cloud provides an Export Billing to BigQuery feature that provides a detailed way to analyze your billing data. Moreover, you can connect BigQuery to Google Data Studio to perform visual analysis, or other third-party business intelligence (BI) tools like Tableau, Qlik, or Looker.
  • Secondly, sustained use discounts are automatic discounts for running specific Compute Engine resources for a significant portion of the billing month.
  • Next, committed use discounts are ideal for workloads with predictable resources needs. When you purchase a committed use contract, you purchase a certain amount of vCPUs, memory, GPUs, and local SSDs at a discounted price. However, tis is in return for committing to paying for those resources for 1 year or 3 years.
Network configuration for data transfer and latency GCP cloud architect  online course

Reference: Google Documentation, Doc 2

Go back to GCP Tutorials

Menu