Senior Track Roadmap

Load balancing: Kamal

This course covers running an application on more than one server with Kamal. It separates capacity from availability and estimates request capacity with slot arithmetic. It shows how Kamal deploys to several hosts without providing a load balancer, and compares DNS round-robin, a dedicated load balancer and an edge provider. It audits what must be shared between servers: sessions, uploads, cache and jobs. It also explains why sticky sessions hide failures, and how database connections and a single Postgres host limit the setup.

What you'll learn

  • ✓The difference between capacity and availability as reasons for a second server
  • ✓How Kamal deploys to multiple hosts, and what roles and accessories do
  • ✓DNS round-robin, dedicated load balancers and edge providers compared
  • ✓Which state must be shared across servers, and why disk uploads break
  • ✓Why sticky sessions cause reliability problems, and when they are legitimate
  • ✓Database connection limits, PgBouncer and the database as a single point of failure
Free preview · Lesson 1 3 min read

When one server stops being enough

Load balancing is the answer to a question you should be able to state as a number, and stating it is more than half the work.

Read the full lesson free →

Curriculum

7 lessons
Type to start searching...