← Quiz: Design a URL Shortener: all 10 questions
Quiz: Design a URL Shortener · Question 9 of 10
Why give each API server its own range of IDs (for example 1–1,000,000) instead of one shared counter?
Why give each API server its own range of IDs (for example 1–1,000,000) instead of one shared counter?
- A.Ranges make codes shorter
- B.One shared counter would become a bottleneck and a single point of failure
- C.Ranges remove the need for a database
- D.It makes redirects use 301
Answer & explanation
Correct answer: One shared counter would become a bottleneck and a single point of failure
Each server can hand out IDs locally without asking a central service every time.
Can you get the rest right without peeking?
Take the timed Quiz: Design a URL Shortener quiz free. Pass it to earn XP and count towards your certificate.
Start the quiz →