2022-03-09

Comparing Google Cloud and AWS

Introduction

This article will offer the comparison of services offered by Google Cloud Platform (GCP) and Amazon Web Services (AWS).

VPC and Subnet

AWS

In AWS, a Virtual Private Cloud (VPC) is created by defining an IP address range (CIDR) that will be used within a region, including multiple Availability Zones (AZs). A subnet is created within the VPC's CIDR range, and it is designated to a specific AZ.

In AWS, you initiate a VPC by specifying a unique IP address range (CIDR block), and then you designate multiple subnets within that VPC. Each subnet, tied to a specific Availability Zone, has its own IP address range, which is a portion of the VPC's IP address range.

This setup allows granular control over network configurations, ensuring security and isolation of network resources. However, it necessitates careful management of IP address ranges and the correlation between VPCs, subnets, and AZs.

GCP

GCP allows the creation of a VPC that spans multiple regions, negating the CIDR concept. Instead, it uses subnets with specified CIDRs created for each region.

In GCP, you can create a global VPC that spans multiple regions without specifying an overarching CIDR block. Subnets in GCP are associated with a CIDR block and are tied to a specific region. These regional subnets collectively constitute the global VPC.

This approach allows for seamless peering between regions, making it ideal for systems that receive access from all over the world. It alleviates the need for managing overarching CIDR blocks for the VPC, leading to simpler network management and enhanced scalability.

Firewall

AWS: Security Group

In AWS, Security Groups (SGs) are used to control inbound and outbound traffic to resources like load balancers (LBs) and EC2 instances.

A security group acts as a virtual firewall for your instances. When you create a security group, you add rules that control the inbound traffic to instances, and a separate set of rules for outbound traffic.

In AWS, you create an inbound and outbound rule set as a pair within a security group. Once created, the security group can be associated with multiple resources within a VPC, applying the specified rules to each resource.

GCP: Firewall Rules and Tags

Conversely, Google Cloud uses a system of firewall rules and tags to manage and control inbound and outbound traffic.

In GCP, firewall rules are created for inbound and outbound traffic, with each set of rules having an associated tag. These rules can then be applied to instances, like GCE instances, which are tagged correspondingly.

In addition to tag-based rule application, GCP's firewall allows for priority setting for each rule set. In cases where multiple rules apply, the priority determines the order of rule application. This feature offers enhanced control over network traffic management and ensures that critical rules are applied first.

Load Balancing (LB)

AWS: Load Balancing within VPC

In AWS, Load Balancing is performed within the confines of the VPC, distributing traffic to resources within that VPC.

In a typical setup, the Load Balancer is placed in a public subnet for Internet-facing services. The Load Balancer then evenly distributes traffic among resources within the VPC.

Internet-facing Load Balancers in AWS are assigned a public DNS name. This feature enables the Load Balancer to direct incoming traffic to the appropriate resources within the VPC, effectively managing and distributing the load.

GCP: Inter-Regional Load Balancing

Contrarily, Google Cloud provides the capability to perform load balancing across multiple regions.

In GCP, a Load Balancer can be set up to distribute traffic among resources spanning multiple regions. This advanced feature allows GCP to efficiently distribute traffic even when dealing with globally scattered resources.

A unique feature of GCP's Load Balancing is the allocation of a single IP address to the Load Balancer's frontend. This feature streamlines the management of resources, making it easier to monitor and control incoming traffic.

Object Storage

AWS: S3

AWS offers Simple Storage Service (S3) as a scalable and durable object storage service.

S3 provides a robust set of features, including various storage class options, high durability (eleven nines), and lifecycle rules for automatic data management.

S3 operates with the concept of storage classes, each offering different access speeds and costs, making it suitable for different use cases. The service offers an impressive eleven nines (99.999999999%) durability, ensuring data safety. Access control can be managed using ACLs (Access Control Lists) or bucket policies.

GCP: Cloud Storage

Google Cloud offers Cloud Storage for object storage services.

Like S3, Google Cloud Storage also offers various storage classes, high durability, and lifecycle management. However, it also includes built-in caching functionality, enabling it to serve public objects with reduced latency and increased speed, acting like a Content Delivery Network (CDN).

Cloud Storage's built-in caching function stores public objects for a set period, improving performance by serving cached content for frequently accessed data.

RDB

GCP: Cloud SQL and Cloud Spanner

Relational Database (RDB) is a fundamental component of most applications, and choosing the right RDB service plays a significant role in a cloud platform. On Google Cloud Platform (GCP), two popular RDB services are Cloud SQL and Cloud Spanner.

Cloud SQL is an equivalent to AWS's Relational Database Service (RDS). It supports terabyte-scale data storage, with the capacity for both horizontal and vertical scaling. However, Cloud SQL supports fewer database types compared to RDS, which supports Oracle, MariaDB, and others.

Cloud Spanner is a unique offering from Google. It's a high-performance, globally-distributed, relational database service that ensures transactional consistency across regions and continents. Cloud Spanner is categorized as a NewSQL database, and at this point, AWS doesn't have an equivalent service. One of Cloud Spanner's strengths is that it can scale without limit by simply adding nodes. However, while it's suitable for mission-critical applications such as financial systems, it doesn't support traditional RDBs like MySQL, and there are certain constraints specific to Cloud Spanner. Therefore, it may pose a challenge to implement in certain situations.

AWS: RDS and Aurora

AWS offers a powerful equivalent to GCP's Cloud SQL, known as Amazon RDS. It supports a variety of databases including MySQL, PostgreSQL, Oracle, and MariaDB. In addition, RDS supports Amazon Aurora, a proprietary database engine touted to be five times faster than MySQL and three times faster than PostgreSQL. Amazon Aurora is fully managed, and compatible with MySQL and PostgreSQL, making it an appealing option for many businesses.

NoSQL

GCP: Cloud Bigtable and Cloud Firestore

NoSQL databases are an essential part of modern application development, particularly for large-scale applications where high throughput and low latency are critical.

Google's Cloud Bigtable is a fully managed, scalable NoSQL database service, somewhat analogous to AWS's DynamoDB. A distinguishing feature of Cloud Bigtable is its use of the HBase API, which makes integration with big data tools like Hadoop simple. This makes Cloud Bigtable especially suitable for big data analytics in IoT or adtech. Moreover, since it is used by core Google services like Google Search and Gmail, its reliability is high.

Cloud Firestore, another NoSQL service by GCP, is a fully managed, fast NoSQL document database. It's comparable to AWS's DocumentDB. Firestore's offline support stands out as a key feature. When a client-side network disruption occurs, Firestore caches updates locally and reflects them in Firestore when connectivity resumes. This reduces the burden on developers to handle such scenarios, thus saving time and resources.

AWS: DynamoDB and DocumentDB

DynamoDB is a key-value and document database that delivers single-digit millisecond performance at any scale. It's a fully managed, multiregion, multimaster, durable database with built-in security, backup and restore, and in-memory caching for internet-scale applications.

DocumentDB (with MongoDB compatibility) is a fast, scalable, highly available, and fully managed document database service that supports MongoDB workloads. Developers can use the same MongoDB application code, drivers, and tools to run, manage, and scale workloads on Amazon DocumentDB and enjoy improved performance, scalability, and availability without worrying about managing the underlying infrastructure.

Container

GCP: Cloud Run

In the field of containers, Google Cloud Platform (GCP) offers Cloud Run, a fully managed service that automatically scales your containerized applications. Cloud Run is designed to be serverless, taking care of all infrastructure management, so you can focus on what matters most — building great applications.

One of Cloud Run's strengths is the ability to scale down to zero when instances aren't in use, providing a cost-effective solution for sporadic workloads. Additionally, it allows developers to choose up to 8vCPUs and 32GB of memory for their containers, making it a scalable solution for high performance needs.

AWS: App Runner

AWS's equivalent service to Cloud Run is App Runner, built on the foundation of Elastic Container Service (ECS) Fargate. Like Cloud Run, App Runner is a fully managed service for deploying containerized applications quickly and securely.

However, App Runner is designed with a different philosophy. Instead of scaling down to zero, it aims to eliminate cold starts to ensure consistent low latency, thus, it doesn't allow scaling down to zero. As for container specifications, App Runner allows up to 2vCPUs and 4GB of memory, less than Cloud Run but still adequate for a wide range of applications.

FaaS

GCP: Cloud Functions

Function as a Service (FaaS) is a cloud service model that allows developers to execute and manage code without worrying about the underlying infrastructure. Google's Cloud Functions is a FaaS service that offers both HTTP and event-driven functions.

Cloud Functions supports several languages, including specific versions of Node.js, Python, Go, Java, .NET, Ruby, and PHP. Each function can have up to 16GiB of memory (8GiB for the first generation), and disk access is shared with a tmpfs volume.

AWS: Lambda

AWS Lambda is the counterpart to GCP's Cloud Functions. It is an event-driven, serverless computing platform provided by AWS as a part of Amazon Web Services. Lambda supports not only several standard languages but also custom runtimes and container images, effectively allowing virtually any language to be used.

Each Lambda function can have up to 10,240MB of memory, and in addition to the memory, it can have up to 10GB of ephemeral storage. Unlike Cloud Functions, Lambda can also be created within a VPC and can mount an Elastic File System (EFS).

Lambda also has a feature called Lambda@Edge, which, in conjunction with Cloud Front, allows code execution at AWS locations around the world. This is handy for modifying requests at each edge location, providing lower latency and a more personalized user experience.

Ryusei Kakujo

researchgatelinkedingithub

Focusing on data science for mobility

Bench Press 100kg!