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

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 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

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.

79
Mar 16, 2026 05:05

Related Links

X f L