Reviewed by 6 specialized AI reviewers. Explore the diagram and the full per-section feedback below.
Loading diagram…
The candidate shows strong foundational knowledge and correctly identified the primary components needed for a URL shortener. The design is functional and logical, and the identified risks are common implementation details that can be addressed with further refinement.
Clear Latency Target
Setting a <100ms latency target is appropriate for a URL redirection service, as it directly impacts user experience during the redirect flow.
Consistency Requirement
Explicitly identifying the need for consistency in the short-code-to-long-URL mapping is a strong design choice, as it prevents users from being redirected to incorrect or non-existent resources.
Lack of Quantified Availability
While 'highly available' is mentioned, it is ambiguous. Define a specific SLA (e.g., 99.9% or 99.99%) to better inform the architectural decisions regarding redundancy and failover strategies.
Missing Consistency Model Specification
You mentioned consistency, but did not specify if you require strong consistency or eventual consistency. Given the nature of URL shortening, clarifying that reads must reflect the latest write (strong consistency) would strengthen the design.
Clear entity selection
The identification of User and UrlMap correctly captures the primary domain objects required to support URL shortening and ownership tracking.
Naming ambiguity
The field 'longCode' is ambiguous; it should be renamed to 'originalUrl' or 'longUrl' to clearly represent the target destination of the shortened link.
Logical QPS derivation
The candidate correctly derived the QPS from the DAU and daily call volume, and appropriately applied a peak load multiplier to account for traffic bursts.
Storage estimation
The calculation of total storage requirements based on the number of mappings and average object size is accurate and provides a clear baseline for database sizing.
Inconsistent Read/Write ratio
The candidate states a 10:1 read-to-write ratio, but the derived QPS values (12k read vs 1.2k write) imply a 10:1 ratio, while the initial assumption of 1B calls/day for 100M users implies 10 calls per user, which contradicts the 10:1 ratio if all calls are reads. Clarify if the 1B calls/day includes both reads and writes.
Missing bandwidth calculation
While storage and QPS are covered, calculating the expected network throughput (MB/s) would provide a more complete picture for load balancer and network interface capacity planning.
Correct HTTP Status Code Usage
Using 302 for redirects is the industry standard for URL shorteners to ensure analytics tracking and flexibility, and returning 201 for resource creation follows REST best practices.
Ambiguous Date Format
The 'expiration' field uses a placeholder 'time-date-format ??'. To ensure interoperability, explicitly define the format as ISO 8601 (e.g., '2023-12-31T23:59:59Z').
Missing Response Schema
While the endpoints are defined, documenting the exact JSON response structure for the POST request (e.g., returning the full object including the generated short-id) would improve API clarity for consumers.
Use of Base62 encoding
Utilizing base62 encoding on a global counter is a standard and efficient way to generate short, URL-safe aliases for 1B records.
Caching strategy
Incorporating Redis with an LRU eviction policy is appropriate for a read-heavy URL shortening service to reduce database load.
Missing Cache Integration in Read Path
The connections show the Read service only talking to Postgres. You must connect the Read service to the Redis cache to fulfill the requirement of serving redirects efficiently.
Redundant/Orphaned Components
You have multiple 'Write service' and 'Read service' nodes listed without clear load balancing or partitioning logic between them. Consolidate these into logical service clusters.
CDN Misuse
The CDN is connected directly to Users but not to the Read service. CDNs are typically used for static assets or cached API responses; ensure the flow reflects that the Read service populates the cache/CDN.
Database Schema Ambiguity
The annotation 'expiration ??' suggests uncertainty. Given the requirement for custom expiration, ensure the schema explicitly includes an 'expires_at' timestamp column.
Draw your architecture for URL Shortener and get an instant hire/no-hire signal from 6 specialized AI reviewers — free to start.