In this lesson · topic 3 of 7
Topic 3
Make codes and follow them in the lab
8 min read
What the lab runs
Each tick the service creates 100 links and handles 300 clicks. A random code is drawn from 62 symbols. If it is taken, the service draws again, up to eight times. A counter hands out the next number and never repeats.
Clicks are skewed. A few links draw most of them. The server keeps a cache of the most recently used links and counts a hit when a click finds its link there.
The lab stops adding links at 60,000 so a long run stays cheap.
Predict before you press play
Things to try
- Set random codes to 3 characters and read the collision share.
- Set them to 5 characters.
- Switch to the counter.
- Set the cache to 100 links, then to 5,000.
- Lower the click skew to 6 tenths.
- Switch the redirect status to 301.
The full-page lab has a guided experiment for each of these.