Paths Subjects Questions Quizzes Pricing Search
Intermediate Open Pro

301 vs 302 and the Analytics Path

A product manager wants two things at once: "make redirects as fast as possible" and "show customers an accurate click count and referrer breakdown per link."

  1. Explain how the 301 vs 302 choice interacts with these two goals. Which would you pick and what would you tell the PM?
  2. An engineer proposes UPDATE urls SET click_count = click_count + 1 WHERE key = ? inside the redirect handler. Explain why this is a bad idea at 10,000 redirects/s and design a better pipeline.
  3. What accuracy guarantee can you promise for the click count under your design?

Share this question

← Back to Design a URL Shortener (bit.ly / TinyURL) practice

We use cookies for product analytics to improve OmniAtlas. See our Privacy Policy.