The only Cloud services you actually need to know

The only Cloud services you actually need to know

Introduction

These are notes I took while watching the video The only Cloud services you actually need to know by Neetcode.

VM

A VM, or "Virtual Machine," is like renting a computer in the cloud. You can set it up with any software you need and use it for various tasks, such as hosting a website or a database.

VMs are the basic building blocks of cloud computing. All other cloud services are built on them.

Using a VM is considered an unmanaged service, meaning the cloud provider only gives you the resources. You're responsible for managing everything else.

To work with a VM, you often connect to it using SSH.

Examples include AWS EC2, Google Compute Engine, and Azure Virtual Machines.

Object stores

If you need to store files, object stores are the solution. You only focus on uploading and downloading files without worrying about the infrastructure. Unlike with VMs, where you have to choose the size, memory, and CPU, object stores handle all that for you.

This is a managed service, meaning the cloud provider manages the infrastructure, and you just use the service. It's sometimes called serverless because you don't deal with servers directly. Your files are safely stored across multiple servers, reducing the risk of losing data.

Examples include AWS S3, Google Cloud Storage, and Azure Blob Storage.

Database services

What if you need to store application data?

Databases are complicated. You might use MySQL, PostgreSQL, or MongoDB. Essentially, databases are a complex way to manage disk space. You could set up a database on a virtual machine, decide on its size, copy it across several machines, and split the data, but this requires a lot of manual and complex effort.

That's where cloud providers come in with managed database services.

For example, in AWS, RDS is for relational databases, and DynamoDB is for non-relational databases.

Proprietary services

In many situations, AWS simply uses open-source software and manages it for you. However, they also offer their own unique services.

For instance, DynamoDB is one of these unique services. It's not open-source, meaning you can't run it yourself. If you decide to switch from DynamoDB to another non-relational database because it's too costly, you'll need to move your data and update your application code.

This situation is known as vendor lock-in, where you're tied to using a single provider's services. Generally, it's best to avoid this. But sometimes, the benefits of using a specific proprietary service might outweigh the downsides.

Knowing one cloud sets you off

Every cloud provider offers similar services.

Google Cloud, AWS, Azure, they all have VMs, object stores, databases, functions, and more.

The basics of cloud computing are the same no matter which provider you choose.

The differences might be in:

  • Pricing

  • Performance

  • Features

  • How you use the service

  • And more

Functions as services

Cloud providers let you run code without dealing with the underlying setup, called Functions as a Service (FaaS).

This means you can focus on coding without worrying about the hardware. Examples include AWS Lambda, Google Cloud Functions, and Azure Functions.

This is a type of managed service, often referred to as serverless. It's the simplest way to use cloud services. You just write your code, and the cloud provider handles everything else.

That's actually enough

You will typically not even need to deal with VMs. An object store for files, database and serverless functions is enough for most applications. With these three services, you can build a lot of things already.

Observability

When you run your app in the cloud, keeping track of what's happening is important. You'll want to know details like the number of incoming requests, how long they take, and how much memory is being used. This is where observability comes into play.

Logging: Record what's happening in your app. This helps you fix problems when they happen and understand user issues.

Monitoring: Keeping an eye on your app is a must. You need to know if it's working correctly, if it's slow, or if it's using too much memory.

Alerts: You should get alerts for problems, like an increase in errors, high latency, etc.

Cloud services like AWS CloudWatch, Google Cloud Monitoring, and Azure Monitor can help with observability. There are also specialized services like Datadog that focus entirely on observability.

Data warehouses

Data warehouses are special databases designed for analysis, not for storing everyday transaction data. They are great for running complicated searches across vast amounts of information. Data analysts and scientists use them to perform queries and create reports.

Companies use data warehouses to dig into big data sets. For instance, they might want to find out how many people are using a specific feature or how many have purchased a particular product.

Cloud services like AWS Redshift, Google BigQuery, and Azure Synapse Analytics offer managed data warehouses. There are also other popular services like Snowflake and Databricks.

Cloud wrappers

Cloud wrappers are tools that simplify working with cloud providers. Developers use them to easily deploy their applications to the cloud. Despite the challenges of working directly with cloud providers, cloud wrappers offer a solution.

Well-known examples are Vercel and Netlify. They allow you to deploy your application to the cloud with just a single command.

Regional vs Global services

Some services are regional, meaning they work in specific areas and are often cheaper. However, they might not be available everywhere. Global services, on the other hand, work everywhere but tend to cost more.

A CDN (Content Delivery Network) is a global service because it uses servers around the world to store your static content. You can't have a regional CDN because its whole purpose is to be worldwide.

Virtual Machines (VMs) are regional. When you set them up, you choose a specific area, and they don't span multiple regions.

It gets a bit more complicated when we talk about services like DynamoDB or Google Cloud Spanner.

For instance, RDS (Relational Database Service) is mainly regional. You set it up in one area but can create read replicas in other regions to improve availability. However, this doesn't make it a global service.

DynamoDB can be seen as a global service. You start with a table in one region, but then you can activate global tables. This makes DynamoDB a fully managed service that works across multiple regions and provides quick read and write operations for large-scale, worldwide applications.