Cloud Computing Explained: The Most Important Concepts To Know

By Be A Better Dev

Share:

Key Concepts

Scaling (Vertical & Horizontal), Load Balancing, Autoscaling, Serverless, Event Driven Architecture (EDA), Container Orchestration, Object Storage, Block Storage, Databases (Relational & NoSQL), Caching, Availability, Durability, Infrastructure as Code (IAC), Cloud Networks.

Scaling

  • Definition: Adjusting application resources to handle varying traffic loads.
  • Vertical Scaling (Scaling Up):
    • Involves increasing the resources (CPU, memory, disk space, network throughput) of a single machine hosting the application.
    • Drawbacks:
      • Diminishing Returns: Cost increases disproportionately with added resources (e.g., 16GB RAM costs $100, 32GB costs $225, 64GB costs $500-$600).
      • Stability Issues: Failure of the single, scaled-up instance leads to complete application downtime.
  • Horizontal Scaling (Scaling Out):
    • Involves cloning the application and hosting it on multiple, smaller machines.
    • Advantages:
      • Improved Stability: If one instance fails, others continue serving traffic.
      • Potentially Lower Cost: Multiple smaller machines can be cheaper than one large, vertically scaled machine.
    • Most Popular Approach: Favored in cloud computing due to ease of implementation.

Load Balancing

  • Definition: Distributing incoming traffic across multiple instances of an application.
  • Functionality:
    • Sits in front of the application with a DNS or IP address.
    • Routes traffic to available and healthy instances.
    • Monitors instance health.
  • Algorithms:
    • Round Robin: Iterates through available instances (e.g., 1, 2, 4 if 3 and 5 are down).
    • Adaptive Methods: Direct traffic to instances with fewer connections or lower resource utilization (CPU).
  • Purpose: Ensures traffic is directed to available instances in a horizontally scaled application.

Autoscaling

  • Definition: Automatically adding or removing instances based on fluctuating traffic or resource utilization.
  • Functionality:
    • Monitors metrics (e.g., connections, CPU utilization).
    • Adds instances when metrics exceed a threshold.
    • Removes instances when metrics fall below a threshold.
  • Example (AWS):
    • Autoscaling Groups: Groups of instances that can be automatically scaled.
    • Metrics-Based Scaling: Trigger scaling based on metrics like connection count or CPU usage.
  • Benefits: Dynamically adjusts resources to meet demand, optimizing cost and performance.

Serverless

  • Original Definition (AWS Lambda):
    • Focuses on writing and executing code without managing underlying infrastructure (EC2 instances).
    • Lambda Functions: Abstract entities where code is deployed and executed.
    • AWS handles provisioning, scaling, and security of underlying instances.
    • Developers only worry about writing code and business logic.
  • Evolving Definition (AWS OpenSearch Example):
    • AWS uses "serverless" to describe services where underlying infrastructure is managed by AWS, but users still pay for the provisioned resources (instances).
    • OpenSearch Example: Users don't manage instances directly, but pay for the number of instances used, even if usage is low.
    • Critique: This deviates from the original "pay-per-use" model of serverless.
  • Caution: The term "serverless" can be ambiguous; understand the specific implementation.

Event Driven Architecture (EDA)

  • Definition: A design pattern where services communicate through asynchronous events rather than direct requests.
  • Contrast with Request-Response Model:
    • Request-Response: One service directly calls another, creating tight coupling.
    • EDA: Services publish events to a central notification engine, and other services subscribe to those events.
  • Example (Amazon Order Processing):
    • Traditional (Request-Response): Order service directly calls credit card, fulfillment, and fraud services.
    • EDA: Order service sends an "order placed" event to a notification engine (SNS or EventBridge). Credit card, fulfillment, and fraud services subscribe to this event.
  • Benefits:
    • Decoupling: Services don't need to know about each other.
    • Scalability: Easy to add new services without modifying existing ones.
  • Challenges:
    • Handling failures and ensuring eventual consistency.
    • Requires mechanisms for compensating actions (e.g., canceling an order).
  • Key Terms:
    • Publisher: The service that produces the event (e.g., Amazon order service).
    • Subscriber: The service that consumes the event (e.g., credit card service).
    • Pub/Sub: Short for Publisher/Subscriber.

Container Orchestration

  • Definition: Automating the deployment, scaling, and management of containerized applications.
  • Containers: Isolated environments that bundle code, dependencies, and configuration.
  • Problem without Orchestration:
    • Deploying and managing containers on individual EC2 instances is complex.
    • Requires manual monitoring and restarting of failed containers.
  • Solution (ECS, EKS):
    • Services like ECS (Elastic Container Service) and EKS (Elastic Kubernetes Service) simplify container management.
    • Allows deploying containers across multiple machines.
    • Provides load balancing, health checks, and automatic replacement of failed instances.
  • Benefits: Simplifies deployment, scaling, and management of containerized applications.

Storage

  • Object Storage:
    • General-purpose storage for media files (MP4, AVI), JSON objects, CSV files, and binary data.
    • Used for storing miscellaneous data accessible by applications.
  • Block Storage:
    • Represents volumes (hard drives) that can be attached to instances.
    • Supports autoscaling and sharing volumes across multiple instances.
  • Databases:
    • Relational Databases: (e.g., PostgreSQL, MySQL, Microsoft SQL Server, Oracle) Use SQL for data management.
    • NoSQL Databases: (e.g., MongoDB, DynamoDB, OpenSearch/Elasticsearch, Graph Databases) Use various data models (document, key-value, graph).
  • Caching:
    • Temporary data storage in memory for frequently accessed data.
    • Reduces the load on databases.

Availability

  • Definition: The percentage of time an application is up and running.
  • Measurement: Expressed as a percentage (e.g., 99.999%).
  • Impact: Translates to the amount of downtime expected per year or month.
  • Improving Availability:
    • Horizontal Scaling: Distributing application instances across multiple machines.
    • Load Balancing: Distributing traffic across available instances.
    • Availability Zones: Deploying instances in physically separate data centers.

Durability

  • Definition: The guarantee that data stored in the cloud will not be lost.
  • Implementation: Cloud providers store multiple copies of data across different locations.
  • Benefits: Protects against data loss due to hardware failures, data center outages, or disasters.

Infrastructure as Code (IAC)

  • Definition: Managing and provisioning infrastructure through code rather than manual processes.
  • Problem with Manual Configuration:
    • Error-prone.
    • Difficult to replicate.
    • Lacks version control and auditing.
  • Solution:
    • Define infrastructure resources (databases, networks, etc.) in code.
    • Use tools to deploy and manage infrastructure based on the code.
  • Tools:
    • AWS CloudFormation (CF): Declarative template language.
    • AWS Cloud Development Kit (CDK): Programming language for defining infrastructure.
    • Terraform: Third-party tool that supports multiple cloud providers.
  • Benefits:
    • Reduces errors.
    • Improves repeatability.
    • Enables version control and collaboration.

Cloud Networks

  • Definition: Virtual networks within a cloud provider that isolate resources.
  • Traditional Networks:
    • Physical server rooms with subnets and security groups.
  • Cloud Networks (VPCs):
    • Isolate resources from other customers within the cloud provider.
    • Control inbound and outbound traffic through security rules.
    • Allow connecting networks with other customers for business relationships.
  • Benefits:
    • Enhanced security.
    • Isolation of resources.
    • Control over network traffic.

Conclusion

The video provides a comprehensive overview of essential cloud computing concepts, emphasizing the benefits and trade-offs of different approaches. It highlights the importance of understanding scaling, load balancing, and autoscaling for building resilient applications. It also clarifies the evolving definition of serverless and introduces key concepts like event-driven architecture, container orchestration, and infrastructure as code. Finally, it covers storage options, availability, durability, and cloud networking, providing a solid foundation for anyone entering or refreshing their knowledge of the cloud computing landscape.

Chat with this Video

AI-Powered

Hi! I can answer questions about this video "Cloud Computing Explained: The Most Important Concepts To Know". What would you like to know?

Chat is based on the transcript of this video and may not be 100% accurate.

Related Videos

Ready to summarize another video?

Summarize YouTube Video