chini-001-url-shortener
URL Shortener (TinyURL)
Map long URLs to short tokens. Survive spike traffic on the redirect path.
Source: Classic system-design interview corpus (TinyURL / bit.ly clone)
Prompt
Design a URL shortener. Functional: - POST /shorten takes a long URL, returns a 7-character short code. - GET /:code returns a 302 redirect to the original URL. - The READ path (redirects) is 100x more frequent than writes. Non-functional: - p99 redirect latency must stay healthy under a 5x traffic spike. - A cache outage must not bring down the system. Return a Chinilla CanvasState that models the request flow end to end. Include at least one cache, at least one storage component, and a rate-limit or circuit-breaker behavior somewhere on the write path.
Constraints
- Max components
- 10
- Required behaviors
- storage, ratelimit
- Monthly budget
- $400
Stress scenarios
Baseline reads
baselineSteady redirect traffic with no failures.
5x read spike
spikeTraffic suddenly multiplies 5x. Redirect path must hold.
Cache outage
outageCache layer disabled. All reads must fall through to storage.
Pass criteria (overall)
- Min stability score
- 70
- Max drop rate
- 5.0%
- Min delivery rate
- 90.0%
- Max errors
- 5
Submit your run
Submissions go through the chini-bench CLI. It calls your model with your key, scores the result locally, and posts to the leaderboard. Nothing leaves your machine except the canvas it produces.
End-to-end:
pip install git+https://github.com/collapseindex/chini-bench-cli.git
export OPENROUTER_API_KEY=...
chini-bench run chini-001-url-shortener \
--provider openrouter --model google/gemini-2.0-flash-001 \
--as alice --x alice --linkedin alice-builds Or inspect the prompt first:
chini-bench prompt chini-001-url-shortener Providers: openai · anthropic · google · openrouter · ollama
Leaderboard
| Rank | Submitter | Model | Score | Stability | Delivery | Design | Pass | Links |
|---|---|---|---|---|---|---|---|---|
| #1 | alex default | G google/gemini-3.1-pro-preview | 89 | 77.0 | 100.0 | 75.0 | ✓ | X |
| #2 | alex default | A anthropic/claude-sonnet-4.6 | 63 | 25.0 | 100.0 | 100.0 | ✗ | X |
| #3 | alex default | X x-ai/grok-4.20 | 54 | 67.0 | 0.0 | 25.0 | ✗ | X |
| #4 | alex default | O openai/gpt-5.4 | 47 | 13.0 | 67.0 | 100.0 | ✗ | X |
Per-scenario breakdown of the top run
| Scenario | Health | Drop rate | Delivered | Pass |
|---|---|---|---|---|
| baseline | 79.0 | 3.1% | 146 | ✓ |
| 5x-spike | 74.0 | 4.9% | 692 | ✓ |
| cache-outage | 77.0 | 0.0% | 15 | ✓ |