DrawLintDrawLint.ai

URL Shortener — system design by SwiftJaguar63

Lean No Hire

Reviewed by 6 specialized AI reviewers. Explore the diagram and the full per-section feedback below.

Loading diagram…

Hire SignalLean No Hire

The candidate demonstrates some basic architectural intuition with a workable write path and separated ID generation, but the design misses major parts of the required functionality and lacks the senior-level rigor expected around APIs, read path, expiry semantics, capacity, and failure handling.

warning

Quality attributes are too vague to guide design

You mention only 'Scalability >> availability'. What latency, durability, or consistency expectations does the system actually need to meet? Without at least naming the key attributes and their importance, the design has no way to justify trade-offs such as whether redirects must stay fast during load spikes or whether expired links can be served briefly after deletion.

warning

No concrete targets for scale or availability

Have you considered what happens when someone asks whether this design supports 10K requests/day or 100K requests/second? 'Scalability' and 'availability' are priorities, but there are no measurable targets like QPS, p95 latency, or uptime. Without numbers, it is impossible to tell whether the proposed approach is sufficient or overbuilt.

warning

Consistency model is not stated

What happens if a short URL is created and an immediate read follows from another replica or cache? Without explicitly choosing and justifying a consistency model, you cannot reason about whether users may see 'not found' right after creation, whether expiry is enforced exactly at the deadline, or whether one-to-one mapping can be violated under concurrent writes.

warning

NFRs are not connected to the stated assumptions

The requirements include URL shortening with one-to-one mapping and optional expiry, but the NFR section does not tie its priorities to any workload assumptions. You could improve this by stating expected read/write ratio, traffic growth, and expiry behavior, then explaining why scalability matters more than availability for that workload and what level of inconsistency is acceptable.

warning

Expiry is mentioned in requirements but not modeled as an entity relationship or state on the URL mapping

Have you considered what happens when a shortened URL reaches its expiration time? Without modeling expiry as part of the URL-to-shortcode mapping, the core happy path cannot clearly answer whether a redirect should still resolve or be rejected. You could improve this by making it explicit that a URL mapping has an expiration policy or expiry timestamp associated with it.

warning

Relationship between URL and shortcode is not clearly defined

You list both 'url' and 'shortcode', but how do they connect in the one-to-one mapping requirement? If that relationship is not explicit, it becomes ambiguous whether one URL can have multiple shortcodes over time or whether one shortcode can ever be reassigned. You could strengthen this by stating clearly that a shortcode maps to exactly one URL mapping record, and vice versa if strict one-to-one is required.

info

User entity is present but its ownership relationship is unclear

Have you considered whether a user owns many shortened URLs, or whether user is optional for the core flow? Right now 'user' is listed as a noun, but the relationship to the URL mapping is not defined. Clarifying whether this is 1:N ownership or just an optional creator reference would make the domain model easier to reason about.

critical

Capacity planning is essentially absent

There are no basic scale assumptions or back-of-the-envelope calculations here. What happens when traffic is 10 requests/sec versus 10,000 requests/sec? Without even rough DAU/QPS, storage growth, or read/write estimates, there is no way to judge whether the proposed infrastructure would hold up in production or whether key components are over- or under-sized.

warning

No traffic model from users to QPS

Have you considered translating expected usage into create-vs-redirect load? A URL shortener is typically read-heavy, and the sizing of the datastore, cache, and network path depends on that split. Without a rough peak QPS model, it is unclear whether the design can handle redirect spikes or bursty link access patterns.

warning

No storage growth estimate

Have you considered how many new short URLs are created over time and how expiry affects retained data? Even simple assumptions like links/day, average record size, and retention window would let you estimate whether storage stays small, grows steadily, or needs partitioning/archival.

warning

No peak-load or hotspot analysis

What happens when a single shortened URL goes viral and receives a sudden burst of redirects? Without any discussion of peak traffic, cache hit expectations, or hotspot behavior, the design gives no confidence that it can absorb uneven access patterns common in URL shorteners.

info

Add a simple end-to-end sizing chain

You could improve this by giving a lightweight chain such as: expected users/links created per day -> write QPS, expected redirects per link -> read QPS, average metadata size -> storage/day, and then account for replication and expiry. The exact numbers do not need to be perfect; the goal is to show that the infrastructure choices follow logically from the assumed load.

critical

API section is absent, so the core flow is not usable

There are no routes, request shapes, or protocol details here. How does a client create a short URL, resolve a short code back to the original URL, or specify an expiry? Without at least a create and lookup flow, the functional requirements cannot actually be exercised through the API.

warning

Protocol choice is unclear

Have you considered how clients are expected to interact with the service? For a URL shortener, this is typically a mix of HTTP redirect behavior for resolution and a REST-style create endpoint for shortening. Without stating the protocol, redirect semantics, caching behavior, and client integration are all ambiguous.

warning

No resource or URL design to validate

Have you considered what the public and management surfaces look like? For example, clients usually need a route to create a short URL and a separate path-based route to resolve a short code. Without any route structure, it is impossible to judge whether the API is clean, resource-oriented, or even supports the one-to-one mapping requirement.

warning

Error handling and retry behavior are unspecified

What does the client see if the submitted URL is invalid, the alias already exists, the short code is expired, or the code is not found? Without status codes or an error shape, clients cannot distinguish bad input from retryable failures, and integrations become brittle.

info

Basic operation coverage should be explicit

You could improve this by defining the minimal API surface for the stated requirements: a create endpoint to shorten a URL with optional expiry, and a lookup/redirect endpoint to resolve the short code while handling expired or missing links. If you support management operations like delete or inspect metadata, list those explicitly too.

✅ Good

Simple end-to-end write path is present

The core shortening flow is logically connected: client -> gateway -> shortener service -> storage/counter. For the stated functional requirement of creating a short URL, this is a workable minimal architecture.

✅ Good

Counter separated from primary storage

Using Redis as a dedicated counter source keeps ID generation off the main database write path, which is a reasonable scalability-oriented choice for a URL shortener.

critical

Read/redirect path is missing

How does a user resolve a shortcode back to the original URL? The design only shows the create flow into DynamoDB and Redis, but no end-to-end lookup/redirect flow. Without a clear read path, the system does not satisfy the core URL shortener behavior in production.

warning

Expiry handling is not reflected in the architecture

The requirements say links can have expiry, but what happens when an expired shortcode is requested? The design does not show whether expiry is stored with the URL record, checked on reads, or cleaned up asynchronously. Without that, expired links may continue to resolve or require inefficient scans.

warning

Redis counter is a likely bottleneck and single point of failure

What happens when the Redis counter is unavailable or saturated? If every new short URL depends on a single counter service, URL creation can stop entirely. At the stated priority of scalability over availability, this is the first component I would push on; you would want partitioned ID generation, preallocated ranges, or a clearly replicated/failover strategy.

warning

No caching on the hot lookup path

URL shorteners are typically read-heavy on shortcode resolution. Have you considered what happens when a popular shortcode is repeatedly looked up? Without a cache in front of DynamoDB for redirects, the database becomes the hot path for every access and will take unnecessary load.

info

Gateway role is underspecified

The gateway is connected logically, but it is not clear what problem it solves here versus routing directly to the shortener service. You could improve the design by explaining whether it handles rate limiting, auth, request validation, or traffic distribution; otherwise it reads like a pass-through box.

info

Asynchronous cleanup could simplify expiry management

You could improve this by separating user-facing reads from background expiry cleanup. For example, store expiry on the record and reject expired links synchronously on lookup, while deleting old records asynchronously later so user requests do not block on cleanup work.

Want this kind of feedback on your own design?

Draw your architecture for URL Shortener and get an instant hire/no-hire signal from 6 specialized AI reviewers — free to start.