Compute Concepts

Compute is the part of cloud computing that runs your applications. It provides the processing power needed to execute code, handle requests, and perform tasks. In cloud computing, there are three main compute options

  • Virtual Machines
  • Containers
  • Serverless

Each one offers a different level of control and abstraction.

1. Virtual Machines

A virtual machine is a software based computer that runs on physical hardware. It has its own operating system, CPU, memory, and storage, just like a real computer.

Examples:

  • Amazon Web Services EC2
  • Microsoft Azure Virtual Machines
  • Google Cloud Compute Engine

Example in real life:

  • You create a virtual server, install Linux, Node.js, and MongoDB, and run your application.

Why use virtual machines:

  • Full control over system
  • Can install any software
  • Flexible

Limitations:

  • Need to manage operating system
  • Scaling can take time

2. Containers Basic Intro

Containers are lightweight environments used to run applications. They do not include a full operating system. Instead, they share the host system but keep applications isolated.

Examples:

  • Docker
  • Kubernetes

Example in real life:

  • You package your app and its dependencies into a container and run it anywhere without worrying about system differences.

Why use containers:

  • Lightweight and fast
  • Easy to deploy
  • Consistent across environments

Limitations:

  • Requires some setup and knowledge
  • Needs orchestration for large scale systems

3. Serverless Basic Intro

Serverless means you run code without managing servers. The cloud provider automatically handles infrastructure, scaling, and execution.

Examples:

  • Amazon Web Services Lambda
  • Google Cloud Functions

Example in real life:

  • You write a function that runs when a user uploads an image, and the cloud automatically executes it.

Why use serverless:

  • No server management
  • Automatic scaling
  • Pay only for usage

Limitations:

  • Limited control
  • Not suitable for long running tasks

4. Virtual Machines vs Containers vs Serverless

Virtual Machines

  • Full control
  • Heavyweight
  • Best for custom environments

Containers

  • Lightweight
  • Fast deployment
  • Best for modern applications

Serverless:

  • No infrastructure management
  • Automatic scaling
  • Best for event based applications

  • Virtual machines act like real computers in the cloud
  • Containers provide lightweight and portable environments
  • Serverless allows you to run code without managing servers
  • These compute options help you choose how you want to build and run your applications based on control, performance, and ease of use.