QR code service inspired by QR Code Generator and Bitly codes: dynamic codes point to a short link whose destination can be edited, scans resolve from the edge, and scan analytics are counted in the background.
See why a database lookup on every scan does not scale.
What was missing: Resolving a scan should not query the database every time.
Why that's risky: A printed campaign code can be scanned thousands of times per second, and every scan runs the same lookup.
What gets added: One server that looks a code up in the database on every scan and redirects, and saves new codes.
Trade-offs: Always current, but slow under load.
Separate scanning from editing and resolve from memory.
What was missing: Scanning and editing share one path.
Why that's risky: An edited destination can take a moment to take effect.
What gets added: A resolver service reading destinations from a cache keyed by code, a code service for creating and editing codes, and a code database as source of truth.
Trade-offs: A dynamic code is a short link whose destination can change, which is why scans must resolve through the service and not be embedded in the image.
Resolve popular codes from the edge so a campaign never overloads us.
What was missing: A big campaign sends thousands of scans at once.
Why that's risky: A cached redirect keeps pointing to the old destination until it expires.
What gets added: A CDN caches each code's redirect at the edge for a short time.
Trade-offs: A permanent (301) redirect is remembered by browsers forever, which breaks editing and hides repeat scans; a temporary (302) redirect with a short edge TTL keeps both working.
Count scans in the background and limit abuse.
What was missing: Scans are not counted and anyone can create malicious codes in bulk.
Why that's risky: Scans answered at the edge never reach our servers, so without edge logs most scans would go uncounted.
What gets added: The resolver puts every scan on a queue, and scans answered at the edge are reported to it in batches from the CDN's logs; workers count scans per code in batches. A rate limiter on code creation and monitoring.
Trade-offs: Counts lag by up to a minute in exchange for fast scans.
You're in the middle of an interview session. Leaving now will end your current attempt.
Explore concept overviews, real-system examples, key tradeoffs, and interview talking points for each roadmap section.
You've conquered this phase. These are the skills you now own: