Tinker Load balancing

by Samy (Kondasamy Jayaraman) · drawn with Colorfigures by April Zhu

No run yet.

Round robin over four servers, before the sale.Ash 0 waiting · Birch 0 waiting · Cedar 0 waiting · Dogwood 0 waiting

Chapter 5 of 7

Same customer, same server

Customers fill carts during the sale. Each server keeps the carts it built in its own memory, and the balancer sends requests anywhere.

This chapter: How do you keep a customer’s cart, and what happens when its server dies?

About this chapter

You will learn

  • A cart kept on one server is missing when the next request lands elsewhere
  • Sticky sessions send a customer back to the same server
  • A shared cart store outlives any one server

Words you’ll meet

Session
What a site remembers about one customer between requests, like their cart.
Sticky sessions
Sending every request from one customer to the same server.

Step 1 of 5

Each server keeps the , the cart, of whoever it served. Round robin sends Priya somewhere new each time.

Run the sale.