Orivel Orivel
Open menu

Latest Tasks & Discussions

Browse the latest benchmark content across tasks and discussions. Switch by genre to focus on what you want to compare.

Benchmark Genres

Model Directory

System Design

OpenAI GPT-5.2 VS Google Gemini 2.5 Flash

Design a URL Shortening Service

Design a URL shortening service (similar to bit.ly or tinyurl.com) that must handle the following constraints: 1. The service must support 100 million new URL shortenings per month. 2. The ratio of read (redirect) requests to write (shorten) requests is 100:1. 3. Shortened URLs should be as short as possible but must support the expected volume for at least 10 years. 4. The system must achieve 99.9% uptime availability. 5. Redirect latency must be under 50ms at the 95th percentile. 6. The service must handle graceful degradation if a data center goes offline. In your design, address each of the following areas: A) API Design: Define the key API endpoints and their contracts. B) Data Model and Storage: Choose a storage solution, justify your choice, explain your schema, and estimate the total storage needed over 10 years. C) Short URL Generation: Describe your algorithm for generating short codes. Discuss how you avoid collisions and what character set and length you chose, with a mathematical justification for why the keyspace is sufficient. D) Scaling and Performance: Explain how you would scale reads and writes independently. Describe your caching strategy, including cache eviction policy and expected hit rate. Explain how you meet the 50ms p95 latency requirement. E) Reliability and Fault Tolerance: Describe how the system handles data center failures, data replication strategy, and what trade-offs you make between consistency and availability (reference the CAP theorem). F) Trade-off Discussion: Identify at least two significant design trade-offs you made and explain why you chose one option over the other, including what you would sacrifice and gain. Present your answer as a structured plan with clear sections corresponding to A through F.

21
Mar 22, 2026 21:21

System Design

OpenAI GPT-5.4 VS Google Gemini 2.5 Flash

Design a URL Shortening Service

Design a URL shortening service (similar to bit.ly or tinyurl.com) that must handle the following constraints: 1. The service must support 100 million new URL shortenings per month. 2. The read-to-write ratio is 100:1 (i.e., for every URL created, it is accessed 100 times on average). 3. Shortened URLs must remain accessible for at least 5 years. 4. The system must achieve 99.9% uptime. 5. Redirect latency (from receiving a short URL request to issuing the HTTP redirect) must be under 50ms at the 95th percentile. Your design should address all of the following areas: A. **Short URL Generation Strategy**: How will you generate unique, compact short codes? Discuss the encoding scheme, expected URL length, and how you handle collisions or exhaustion of the key space. B. **Data Storage**: What database(s) will you use and why? Estimate the total storage needed over 5 years. Explain your schema design and any partitioning or sharding strategy. C. **Read Path Architecture**: How will you serve redirect requests at scale to meet the latency and throughput requirements? Discuss caching layers, CDN usage, and any replication strategies. D. **Write Path Architecture**: How will you handle the ingestion of 100M new URLs per month reliably? Discuss any queuing, rate limiting, or consistency considerations. E. **Reliability and Fault Tolerance**: How does your system handle node failures, data center outages, or cache invalidation? What is your backup and recovery strategy? F. **Key Trade-offs**: Identify at least two significant trade-offs in your design (e.g., consistency vs. availability, storage cost vs. read performance, simplicity vs. scalability) and explain why you chose the side you did. Present your answer as a structured design document with clear sections corresponding to A through F above.

46
Mar 20, 2026 17:43

System Design

Google Gemini 2.5 Flash VS Anthropic Claude Sonnet 4.6

Design a Global URL Shortening Service

Design a public URL shortening service similar to Bitly. Users can submit a long URL and receive a short alias; visiting the short link should redirect quickly to the original URL. The system must support custom aliases, optional expiration dates, basic click analytics, and abuse mitigation for malicious links. Requirements and constraints: - Functional requirements: - Create short URLs for long URLs. - Redirect short URLs to original URLs. - Support custom aliases when available. - Support optional expiration time per link. - Record click events for analytics. - Allow users to disable a link manually. - Scale assumptions: - 120 million new short URLs per month. - 1.5 billion redirects per day. - Redirect traffic is globally distributed and read-heavy. - Analytics data should be queryable within 15 minutes. - Performance targets: - Redirect p95 latency under 80 ms for most regions. - Short-link creation p95 under 300 ms. - 99.99% availability for redirects. - Data and retention: - Links may live indefinitely unless expired or disabled. - Raw click events may be retained for 90 days; aggregated analytics for 2 years. - Operational constraints: - Use commodity cloud infrastructure; do not assume one exotic managed product solves everything. - Budget matters: justify any replication, caching, and storage choices. - Short codes should be compact and reasonably hard to guess at large scale, but perfect secrecy is not required. In your answer, provide: 1. A high-level architecture with major components and data flow. 2. Storage choices for link metadata, redirect path, and analytics events, with rationale. 3. A short-code generation strategy, including how to avoid collisions and handle custom aliases. 4. A scaling plan for global traffic, including caching, partitioning/sharding, and multi-region considerations. 5. A reliability plan covering failures, hot keys, disaster recovery, and degraded-mode behavior. 6. Key APIs and core data models. 7. Abuse mitigation and security considerations. 8. The main trade-offs you made and why.

46
Mar 20, 2026 11:03

System Design

Google Gemini 2.5 Flash VS Anthropic Claude Haiku 4.5

Design a Global URL Shortening Service

Design a globally available URL shortening service similar to Bitly. The service must let users create short links that redirect to long URLs, support custom aliases for paid users, track click analytics, and allow links to expire at a specified time. Requirements: - Handle 120 million new short links per day. - Handle 4 billion redirects per day. - Peak traffic can reach 3 times the daily average. - Redirect latency target: p95 under 80 ms for users in North America, Europe, and Asia. - Short-link creation latency target: p95 under 300 ms. - Service availability target: 99.99% for redirects. - Analytics data can be eventually consistent within 5 minutes. - Custom aliases must be unique globally. - Expired or deleted links must stop redirecting quickly. - The system should tolerate regional failures without total service outage. Assumptions you may use: - Average long URL length is 500 bytes. - Analytics events include timestamp, link ID, country, device type, and referrer domain. - Read traffic is much higher than write traffic. - You may choose SQL, NoSQL, cache, stream, CDN, and messaging technologies as needed, but justify them. In your answer, provide: 1. A high-level architecture with main components and request flows. 2. Data model and storage choices for links, aliases, and analytics. 3. A scaling strategy for read-heavy traffic, including caching and regional routing. 4. A reliability strategy covering failover, consistency decisions, and handling regional outages. 5. Key trade-offs, bottlenecks, and at least three risks with mitigations. 6. A brief capacity estimate for storage and throughput using the numbers above.

56
Mar 19, 2026 18:51

System Design

Anthropic Claude Opus 4.6 VS Google Gemini 2.5 Pro

Design a Global URL Shortening Service

Design a public URL shortening service similar to Bitly. The service must let users create short links for long URLs, optionally specify a custom alias if available, and redirect users who visit the short link to the original destination. Include a basic analytics feature that reports total clicks per link and clicks by day for the last 30 days. Assume the following constraints: - 120 million new short links are created per month. - 1.2 billion redirect requests are served per month. - Read traffic is highly bursty, especially for viral links. - The service is used globally and users expect low-latency redirects. - Short links should remain valid for at least 5 years. - Redirect availability target is 99.99 percent. - Analytics may be eventually consistent by up to 10 minutes. - The system should prevent obvious abuse at a basic level, but a full trust and safety platform is out of scope. In your design, cover: - High-level architecture and main components. - Data model and storage choices for link mappings and analytics. - ID or token generation strategy, including custom alias handling. - API design for creating links, redirecting, and fetching analytics. - Caching, partitioning, and replication strategy. - Reliability approach, including failure handling and multi-region considerations. - How you would scale for read-heavy traffic and viral hotspots. - Key trade-offs in consistency, cost, latency, and operational complexity. State any reasonable assumptions you make and justify your choices.

60
Mar 19, 2026 08:02

System Design

Anthropic Claude Haiku 4.5 VS Google Gemini 2.5 Flash-Lite

Design a Real-Time Ride Matching Platform

Design the backend architecture for a ride-hailing platform that matches riders with nearby drivers in real time across multiple cities. Your design should support these product requirements: - Riders can request a trip by sending pickup and destination locations. - Nearby available drivers should receive the request quickly, and one driver can accept it. - The system must prevent double-booking of drivers. - Riders and drivers should see live trip status updates such as requested, accepted, arrived, in progress, and completed. - The platform should provide an estimated fare and estimated pickup time before confirmation. - Trip history should be available to both riders and drivers. Constraints and assumptions: - 8 million daily ride requests. - Peak load is 25 times the average request rate during commuting windows. - Operates in 40 cities, with uneven traffic distribution. - Location updates from active drivers arrive every 3 seconds. - Acceptable rider-facing latency for initial driver matching is under 2 seconds at p95. - Trip status updates should usually appear within 1 second. - The system should remain available during a regional service outage affecting one data center. - Exact payment processing details are out of scope, but trip records must be durable for later billing. - Privacy, security, and regulatory concerns may be mentioned briefly, but the main focus is architecture and scaling. In your answer, describe: - The main services or components and their responsibilities. - The data flow from ride request to driver assignment to trip completion. - How you would store and query driver locations efficiently. - How you would handle scaling for peak traffic and hotspot cities. - How you would ensure reliability, fault tolerance, and data consistency where it matters. - Key trade-offs in your design, including any places where you prefer eventual consistency over strong consistency, or vice versa. You do not need to provide exact cloud vendor products. A clear architecture and reasoning-focused design is preferred over exhaustive implementation detail.

60
Mar 19, 2026 07:43

System Design

Google Gemini 2.5 Pro VS Anthropic Claude Sonnet 4.6

Design a Global URL Shortening Service

Design a public URL shortening service similar to Bitly. Users can submit a long URL and receive a short alias, then anyone can use the short link to be redirected to the original URL. Your design should support these requirements and constraints: Functional requirements: - Create short links for arbitrary valid URLs. - Redirect short links with low latency. - Support optional custom aliases when available. - Provide basic click analytics per link: total clicks, clicks in the last 24 hours, and top 5 countries by click count. - Allow link expiration dates. Scale assumptions: - 120 million new short links per day. - 8 billion redirect requests per day. - Read-heavy workload with strong traffic skew: a small fraction of links receive very high traffic. - Global users across North America, Europe, and Asia. Constraints: - 99.99% availability target for redirects. - P95 redirect latency under 80 ms for users in major regions. - Newly created links should become usable within 2 seconds globally. - Analytics can be eventually consistent, but redirects must be correct. - Budget matters: justify where you would spend on stronger consistency or multi-region replication and where you would avoid it. - Assume no third-party managed analytics product; design the core system yourself. Please provide: - A high-level architecture with major components and data flow. - Storage choices for link mappings, analytics events, and cached hot links. - ID generation or alias strategy, including collision handling and custom alias checks. - API design for create-link, redirect, and analytics retrieval. - Scaling approach for hot keys, caching, partitioning, and multi-region traffic. - Reliability strategy covering failover, data replication, backup, and degradation behavior. - Key trade-offs and at least two alternative design choices you considered and rejected.

53
Mar 19, 2026 04:33

System Design

Google Gemini 2.5 Pro VS OpenAI GPT-5 mini

Design a URL Shortening Service at Scale

You are tasked with designing a URL shortening service (similar to bit.ly or tinyurl.com) that must handle the following constraints: 1. The service must support 100 million new URL shortenings per month. 2. The read-to-write ratio is 100:1 (i.e., 10 billion redirects per month). 3. Shortened URLs must be at most 7 characters long (alphanumeric). 4. The system must guarantee that a shortened URL, once created, never expires unless explicitly deleted by the user. 5. Redirect latency (from receiving the request to issuing the HTTP 301/302) must be under 10 milliseconds at the 99th percentile. 6. The system must remain available even if an entire data center goes offline. 7. The service must support an optional analytics dashboard showing click counts, geographic distribution, and referrer data per shortened URL, but analytics must not degrade redirect performance. Provide a comprehensive system design that addresses: A. High-level architecture: Describe the major components and how they interact. B. URL generation strategy: How you generate unique short codes, why you chose that approach, and how you handle collisions. C. Data model and storage: What databases or storage systems you use and why. Include schema considerations. D. Read path optimization: How you achieve the latency requirement for redirects at the given scale. E. Write path: How new URLs are created and persisted reliably. F. Scaling strategy: How the system scales horizontally to handle growth. G. Reliability and fault tolerance: How you handle data center failures, replication, and failover. H. Analytics pipeline: How you collect, process, and serve analytics data without impacting redirect performance. I. Key trade-offs: Identify at least three significant trade-offs you made in your design and justify each one. Be specific about technologies, protocols, and numerical estimates where relevant (e.g., storage calculations, QPS estimates, cache sizes).

50
Mar 18, 2026 22:59

System Design

Anthropic Claude Sonnet 4.6 VS OpenAI GPT-5 mini

Design a Scalable Real-Time Notification System

You are a senior software engineer tasked with designing a real-time notification system for a rapidly growing social media platform. The system must be able to deliver notifications (e.g., 'new like', 'new comment', 'friend request') to users who are currently online. **System Requirements:** * **Functional:** 1. Users can subscribe to different notification topics (e.g., updates on their own posts, updates from specific friends). 2. An event publishing service can send messages to specific topics or users. 3. Subscribed, online users receive relevant notifications in real-time. * **Non-Functional (Constraints):** 1. **Scalability:** The system must support 1 million concurrent online users and a peak load of 10,000 notifications per second. 2. **Latency:** 99% of notifications should be delivered to the user's device within 200 milliseconds from the time the event is published. 3. **Reliability:** The system must guarantee at-least-once delivery for notifications. 4. **Availability:** The system should have 99.95% uptime. **Your Task:** Provide a high-level system design. Your response should cover: 1. The overall architecture (including key components like API gateways, notification service, message queues, databases, and client connection management). 2. The technology choices for key components and the reasoning behind them (e.g., WebSockets vs. Long Polling, Kafka vs. RabbitMQ, NoSQL vs. SQL). 3. How your design addresses the scalability, latency, reliability, and availability requirements. 4. A discussion of the potential trade-offs you made in your design.

78
Mar 16, 2026 05:05

System Design

Google Gemini 2.5 Flash-Lite VS Anthropic Claude Opus 4.6

Design a URL Shortening Service for Global Read Traffic

Design a production-ready URL shortening service similar to Bitly. The system must let users create short links that redirect to long URLs, support optional custom aliases, and provide basic click analytics per link. Assume these requirements and constraints: - 120 million new short links are created per month. - 1.5 billion redirects happen per month. - Read traffic is highly bursty during news events and marketing campaigns. - Redirect latency should be under 80 ms at the 95th percentile for users in North America and Europe. - Short links should continue working even if one data center goes down. - Analytics do not need to be perfectly real time, but should usually appear within 5 minutes. - Users may update the destination URL only within 10 minutes of creation. - Links can expire at an optional user-defined time. - Abuse prevention matters: the service should reduce obvious spam and malicious redirects, but deep security implementation details are not required. In your answer, provide: - A high-level architecture and main components. - The core data model and storage choices. - API design for creating links, resolving links, and reading analytics. - A scaling strategy for traffic growth and burst handling. - Reliability and disaster recovery approach. - Key trade-offs, including ID generation, database selection, caching, consistency, and analytics pipeline design. - A brief note on how you would monitor the system and detect failures.

63
Mar 16, 2026 04:45

System Design

OpenAI GPT-5 mini VS Anthropic Claude Opus 4.6

Design a Real-Time E-commerce Notification System

You are a senior software engineer at a rapidly growing e-commerce company. Your task is to design a real-time notification system. This system should alert users about various events, such as order status updates (e.g., "shipped," "delivered"), price drops on items in their wishlist, and flash sale announcements. Design a high-level architecture for this system. Your design should address the following requirements: 1. **High Throughput:** The system must handle up to 100,000 notifications per minute during peak times, like major sales events. 2. **Low Latency:** 99% of notifications should be delivered to the user's device within 5 seconds of the event occurring. 3. **Reliability:** The system must guarantee at-least-once delivery of notifications. No critical notification (like an order update) should be lost. 4. **Scalability:** The architecture should be able to scale horizontally to handle future growth in user base and notification volume. 5. **Personalization:** The system should support sending targeted notifications to specific user segments (e.g., users interested in a particular product category). Describe your proposed architecture, including the key components and their interactions. Explain your choice of technologies (e.g., message queues, databases, push notification services). Justify your design decisions by discussing the trade-offs you considered, particularly regarding consistency, availability, and cost.

63
Mar 15, 2026 11:23

System Design

OpenAI GPT-5 mini VS Google Gemini 2.5 Flash

Design a URL Shortening Service at Scale

You are tasked with designing a URL shortening service (similar to bit.ly or tinyurl.com) that must handle the following constraints: 1. The service must support 100 million new URL shortenings per month. 2. The read-to-write ratio is 100:1 (i.e., 10 billion redirects per month). 3. Shortened URLs must be at most 7 characters long (alphanumeric). 4. Shortened URLs should not be guessable or sequential. 5. The system must achieve 99.9% uptime. 6. Redirect latency must be under 10ms at the 95th percentile. 7. Shortened URLs should expire after a configurable TTL (default 5 years), and expired URLs should be reclaimable. 8. The service must operate across at least two geographic regions for disaster recovery. Provide a comprehensive system design that addresses the following: - High-level architecture diagram description (describe components and their interactions clearly in text) - URL shortening algorithm and key generation strategy, including how you avoid collisions and ensure non-guessability - Database schema and choice of storage technology, with justification - Caching strategy and cache invalidation approach - Read path and write path, described separately with estimated throughput calculations - Scaling strategy: how the system handles 10x traffic growth - Multi-region deployment and data consistency model, including trade-offs chosen (CAP theorem reasoning) - TTL expiration and URL reclamation mechanism - Failure modes and how the system recovers (at least 3 specific failure scenarios) - Key trade-offs you made and alternatives you considered but rejected, with reasoning Be specific with numbers, technology choices, and architectural reasoning. Avoid vague generalities.

73
Mar 14, 2026 19:35

System Design

OpenAI GPT-5.2 VS Google Gemini 2.5 Pro

Design a URL Shortening Service

Design a URL shortening service similar to bit.ly or TinyURL. Your design should address the following aspects: 1. **Functional Requirements**: What are the core features the service must support? Consider URL creation, redirection, expiration, and analytics. 2. **High-Level Architecture**: Describe the main components of the system (e.g., API layer, application servers, databases, caches, load balancers). Explain how they interact. 3. **URL Encoding Strategy**: How will you generate short, unique keys for each URL? Discuss your approach (e.g., hashing, base62 encoding, pre-generated key service) and how you handle collisions. 4. **Database Design**: What database(s) would you use and why? Provide the schema for the core table(s). Discuss the trade-offs between SQL and NoSQL for this use case. 5. **Scalability and Performance**: How would you handle high read traffic (e.g., millions of redirects per day)? Discuss caching strategy, database partitioning or sharding, and read replicas. 6. **Reliability and Availability**: How do you ensure the service remains available if a component fails? Discuss redundancy, replication, and failover strategies. 7. **Rate Limiting and Abuse Prevention**: How would you prevent misuse of the service? Provide a clear, well-structured plan that a senior engineer could use as a starting point for implementation. Include rough capacity estimations assuming 100 million new URLs per month and a 100:1 read-to-write ratio.

70
Mar 11, 2026 17:55

Related Links

X f L