Course: Cloud Computing Technologies
Authors: Fulvio Risso, Stefano Galantino, Politecnico di Torino
Source: Microservices and containers orchestration, 25 PDF pages (printed slides 1–22 and 24–26; there is no printed slide 23), CC BY-NC-SA.
Lecture numbering: 10 records its position in the course notes. The source was supplied in the study session and remains outside the published resources.

Learning route

The lecture starts with traditional software monoliths and explains why modern cloud applications turned scalability into a central engineering problem across development, deployment, performance, and resilience. It then introduces microservices—contrasting them with monoliths and embedded libraries—alongside the discovery problem solved by software catalogs. Next, it examines the hidden costs of splitting a monolith (East-West traffic, network latency, eventual consistency, and distributed observability) before connecting microservices to containers and container orchestration, closing with why Kubernetes became the industry standard and when simpler alternatives fit better.

Exam priorities

Focus on comparing monoliths and microservices across the nine architectural dimensions, distinguishing the four aspects of scalability, explaining why embedded libraries differ from live microservices, classifying North-South vs. East-West traffic, explaining eventual consistency and partial failures, listing container orchestrator goals (Must Have vs. Nice to Have), and contrasting declarative orchestration (Kubernetes) with scripting and manual deployment. Historical dates (Amazon 1998, Venice 2011), orchestrator market snapshots, and specific product names (Backstage, Nomad, Mesos) serve primarily as supporting context.

Monoliths and the four dimensions of scalability

Classic web applications—such as e-commerce portals or Moodle built on the LAMP stack (Linux, Apache, MySQL, PHP)—pack frontend, business logic, and database code into one giant monolith. In the pre-cloud era of small corporate applications running on dedicated on-premises servers with predictable users, scalability was secondary. Cloud computing changed that along four partially orthogonal axes: software development (large multi-team coordination), software deployment (rapid independent security patches), performance (elastic infrastructure scaling + CPU cost efficiency), and resilience (software surviving frequent infrastructure faults). Monoliths hit both a development wall (every tiny Pull Request re-tests the whole app) and a deployment wall (scaling one busy module clones the whole VM and creates database consistency issues). Scalability and Software Monoliths

Microservices vs. monoliths and embedded libraries

Applying the UNIX philosophy (“Do one thing and do it well”) and the Single-Responsibility Principle (SRP), microservices split an application into loosely coupled, independently deployable services—illustrated by Google’s Online Boutique (Frontend, ProductCatalogService, CartService + Redis, RecommendationService, CheckoutService, PaymentService, ShippingService, EmailService, CurrencyService, AdService), where busy components can scale independently. Crucially, unlike an embedded library (code only, requiring each calling app to maintain its own database and recompile on updates), a microservice is a live component (code + data) accessed over an API (e.g., REST/HTTP, gRPC, or Kafka) and updated without touching callers. Because developer-driven microservices evolve without a top-down architecture blueprint, large teams rely on software catalogs such as Backstage to document ownership and APIs. Microservices Architecture and Libraries vs Services

The hidden costs of microservices

Turning local procedure calls into socket-based network calls introduces latency, serialization overhead, and partial failures. Internally, East-West service-to-service traffic balloons relative to North-South Internet traffic (typically at least 90% EW vs. 10% NS, and orders of magnitude higher at Meta). Giving each service its own database eliminates single all-or-nothing transactions across services, yielding eventual consistency where services can temporarily disagree after a failure. Debugging and tracing also grow far harder across orchestrator-managed datacenters where localhost no longer works—explaining why Amazon Prime Video cut costs ~90% in 2023 by moving a monitoring pipeline from serverless microservices back to a monolith. Microservices Costs Traffic and Eventual Consistency

Containers and Kubernetes orchestration

Virtual machines are too heavy to wrap every individual microservice; containers provide self-contained, fast-starting, replaceable packaging. Beyond manual SSH + Docker or imperative scripts (Ansible, Chef, Puppet), dedicated orchestrators operate at machine timescale to handle lifecycle, scheduling (resource needs, affinity, labels), replication, machine failure recovery, service discovery, inspection, and virtual networking—plus nice-to-haves like load balancing, rolling updates, and cluster/app auto-scaling. Kubernetes (Google 2014; CNCF 2015; 82% production adoption in CNCF 2025) became the de-facto standard because of its declarative self-healing controllers, CRD/operator extensibility (including batch jobs, VMs via KubeVirt, and AI inference), vendor neutrality, and uniform API across clouds and laptops—though single hosts (Docker Compose), small clusters (Swarm, Nomad), or teams without ops capacity (Cloud Run, AWS Fargate) often benefit from simpler options. Container Orchestration and Kubernetes

Source map

PDF pagePrinted slideTopic
11Title, authors (Risso, Galantino), Politecnico di Torino, CC BY-NC-SA
22Software monoliths (LAMP stack, coupled components)
3–43–4Four dimensions of scalability; why scalability became critical in the cloud
55Monolith challenges at development time and deployment time (VM/DB duplication)
6–76–7UNIX philosophy, SRP, microservices definition, 1998–2014 history
8–108–10Online Boutique example, Oracle high-level view, Fowler scaling comparison
11–1211–12Embedded libraries (code only) vs. microservices (live code + data)
13–1413–14Developer-driven evolution vs. SOA; software catalogs (Backstage)
15159-row comparison table: microservices vs. monolithic architectures
1616North-South vs. East-West traffic (10/90 rule, Meta 2014/2025 studies)
17–1917–19Costs & new challenges: network sockets, eventual consistency, Prime Video 2023, discovery, observability
2020Why containers fit microservices better than VMs
2121Deploying containers: manual vs. scripting vs. dedicated orchestrator
2222Orchestration goals (Must Have vs. Nice to Have; human vs. machine timescale)
2324Container orchestrators 2026 landscape (Kubernetes, Swarm, Nomad, Mesos retired, ECS)
2425Why Kubernetes won (declarative, extensible, vendor-neutral, same API) & when to skip it
2526Bibliography (Tim Hockin, Werner Vogels)

Retrieval questions

  1. What are the four dimensions of scalability, and why does a monolith fail at development and deployment scaling?
    Development, deployment, performance, and resilience. In a monolith, tiny PRs require full-app testing and cross-team interface coordination, while scaling one busy component forces duplicating the entire VM and risks splitting/corrupting a co-located database.
  2. How does an embedded authentication library differ from an authentication microservice when a bug is patched or a user resets a password?
    A library is code-only, so every calling app keeps its own user DB and must be recompiled on updates; a microservice is a live code + data component shared via an API that updates without recompiling callers.
  3. Why does splitting a monolith into microservices push internal East-West traffic above 90% and replace ACID transactions with eventual consistency?
    Every external North-South request fans out into multiple socket calls between services, while per-service databases mean multi-service workflows can no longer commit atomically in one database transaction.
  4. Why is an Ansible script that runs docker across five servers not equivalent to Kubernetes?
    Ansible runs imperative setup steps at human-triggered moments; Kubernetes uses declarative desired state and continuous controllers to auto-schedule, load-balance, discover peers, and self-heal machine crashes automatically.
  5. When should a team avoid self-managed Kubernetes?
    On a single host (use Docker Compose), in small clusters (Swarm or Nomad), or without an operations team (use managed Kubernetes or serverless containers such as Cloud Run or AWS Fargate).