Understanding Serverless Architecture Essentials

May 5, 2024

Lecture Notes on Serverless Architecture

Summary

In this lecture, Ashher Syed from the IBM Cloud team provides an overview of the evolution and benefits of serverless computing. Key aspects, such as the definition, development models, and functional advantages of serverless computing, are explored in detail alongside practical examples.

Definition of Serverless

  • Serverless does not mean there are no servers. It means that the developer does not manage or provision servers; this responsibility is outsourced to the cloud provider.
  • Focus for developers is on writing code and business logic, not on managing infrastructure.

Evolution of Deployment Models

  1. Bare Metal

    • Full management and configuration of servers by the developer.
    • Responsibilities include installing operating systems and managing patches.
  2. Virtual Machines

    • Improved resource optimization compared to bare metal.
    • Still requires setting up environments and managing updates.
  3. Containers (Popularized by Docker)

    • Package deployment code, application code, and dependencies into a container.
    • Challenges include managing scaling and idle times.
  4. Serverless

    • Complete abstraction from underlying infrastructure.
    • Main focus is on writing business logic.

Serverless: How it Works

  • Functions as a Service (FaaS): Main compute platform for serverless.
  • Functions: Single units of deployment code, triggered by events (e.g., a user click).
  • Event-driven Architecture: Operates within an ecosystem of cloud services that generate and respond to events.

Example of FaaS

  • User uploads and submits an image.
  • An event triggers a function to resize the image.
  • The resized image is saved to storage.

Benefits of Serverless Computing

  1. Cost Efficiency

    • Pay only for the time functions are running, no idle costs.
  2. Scalability

    • Automatically handled by the cloud provider.
  3. Faster Time to Market

    • Reduced responsibility for infrastructure management allows quicker development and deployment.
  4. Polyglot Environment

    • Supports multiple programming languages and frameworks.
  5. High Availability

    • Cloud provider ensures fault tolerance and multi-zone regions (MZRs) are utilized for consistent availability.

Closing Remarks

  • Encouragement to engage with the content (comments, likes, subscriptions).
  • Invitation to sign up for a free IBM Cloud account to experiment with serverless computing.

This lecture provides a comprehensive understanding of serverless architecture, demonstrating its efficiency and strategic benefits in modern cloud computing.