11/29
Part 3 of 5 · Sticky routingLearn and do

The share of bad answers stays the same, but fewer users get more of them

An example: 10 users, 12 requests each, with about 1 server in 10 bad.

Random routingFully sticky
bad answers12 of 12012 of 120
who sees them8 users see one or two1 user sees nothing else

Both sides have 12 bad answers out of 120. Stickiness doesn't change how many requests go bad. It changes who gets them.

Now the real numbers. Say 8% of servers are bad and each user sends 12 requests. Every user, sticky or not, gets 12 × 0.08 = 0.96 bad answers on average.

RoutingUsers with at least one bad answerUsers with 6 or more bad out of 12Users with all 12 bad
Random: each request picks a server63%0.016%about 0
90% of follow-ups stay on the same server15.8%7.8%2.8%
Fully sticky8%8%8%

How each row is worked out:

  • Random. Each request is a fresh draw. At least one bad answer is 1−0.9212=1−0.368=0.6321 - 0.92^{12} = 1 - 0.368 = 0.632. Here 0.92 is the chance that one request lands on a good server.
  • Fully sticky. The first request decides everything. 8% of users get 12 bad answers, and 92% get none.
  • 90% stay. Each follow-up stays on its server with probability 0.9, and otherwise picks a server at random. A short calculation gives this row: count the users who never see a bad answer, and take them from 1.

That's why the reports contradicted each other. Under random routing, nearly everyone sees an occasional bad answer and shrugs. Under sticky routing, a few users see the model fail again and again, and they say so loudly. Most see nothing wrong.

Draw some users and watch it happen. Then set stickiness to 90% for the table's middle row:

Sticky routing and who gets hurtInteractive
good response broken responseOne row per user. In this draw, 2 of 40 users got 6 or more bad answers.
Random100% staySticky
Requests answered badly8.0%8.0%8.0%
Users who hit at least one63%8.0%8.0%
Users with 6 or more of 12 badunder 0.1%8.0%8.0%
Users with all 12 badunder 0.1%8.0%8.0%

The table is exact, not this draw. With random routing a user hits at least one broken server with probability 1 − (1 − p)n. With full stickiness it's p, and those users get nothing but bad answers. In between, each follow-up stays on its server with the chosen probability and otherwise moves to a random one.

In the editor, write exposure(users, bad): the bad answers in total, and who got them. Server 7 is the one bad server. STICKY pins each of 10 users to one server for all 12 requests, and RANDOM scatters the requests so that 12 of them land on server 7, as in the table above.