+--------------------+ | (Planning Only) | | no infra yet | +--------------------+
No infrastructure yet, just planning the design
Your roommate asked for "short links for the group chat," and now colleagues, neighbors, and a dog walker all want one. Before you ship anything that could be carved into stone tablets, you must pick how short codes are made.
You need to generate short codes that are unique, unpredictable, and compact. Sequential IDs (1, 2, 3...) are simple but leak your traffic volume and create a single bottleneck. Random generation risks collisions—two users might get the same code. Hashing long URLs produces deterministic codes, but means the same long URL always maps to the same short code (which might be what you want, or might not). Each approach trades off simplicity, uniqueness guarantees, and coordination overhead.