<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Url Shortener on Tech Foundations</title><link>https://valery.tech/system-design/projects/url-shortener/</link><description>Recent content in Url Shortener on Tech Foundations</description><generator>Hugo</generator><language>en-US</language><copyright>Copyright (c) 2014-2023</copyright><atom:link href="https://valery.tech/system-design/projects/url-shortener/index.xml" rel="self" type="application/rss+xml"/><item><title>Url Shortener</title><link>https://valery.tech/system-design/projects/url-shortener/url-shortener/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://valery.tech/system-design/projects/url-shortener/url-shortener/</guid><description>&lt;hr&gt;
&lt;p&gt;title: &amp;ldquo;URL Shortener&amp;rdquo;&lt;/p&gt;
&lt;p&gt;linkTitle: &amp;ldquo;URL Shortener&amp;rdquo;&lt;/p&gt;
&lt;h1 id="core-requirements"&gt;&lt;strong&gt;Core Requirements&lt;/strong&gt;&lt;/h1&gt;
&lt;h2 id="functional-requirements"&gt;Functional Requirements&lt;/h2&gt;
&lt;ol&gt;
&lt;li&gt;Users should be able to access the original URL by using the shortened URL.&lt;/li&gt;
&lt;li&gt;Users should be able to submit a long URL and receive a shortened version.
&lt;ul&gt;
&lt;li&gt;Optionally, users should be able to specify a custom alias for their shortened URL.&lt;/li&gt;
&lt;li&gt;Optionally, users should be able to specify an expiration date for their shortened URL.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;&lt;strong&gt;Below the line (out of scope):&lt;/strong&gt;&lt;/p&gt;</description></item><item><title>Url Shortener Additional</title><link>https://valery.tech/system-design/projects/url-shortener/url-shortener-additional/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://valery.tech/system-design/projects/url-shortener/url-shortener-additional/</guid><description>&lt;hr&gt;
&lt;p&gt;title: &amp;ldquo;URL Shortener Additional&amp;rdquo;&lt;/p&gt;
&lt;p&gt;linkTitle: &amp;ldquo;URL Shortener Additional&amp;rdquo;&lt;/p&gt;
&lt;h1 id="back-of-envelope-40-50s"&gt;Back-of-envelope (40-50s)&lt;/h1&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Keyspace:&lt;/strong&gt; need ≥1B codes -&amp;gt; base62^5 ≈ 916M (&amp;lt;1B), base62^6 ≈ 56.8B -&amp;gt; choose &lt;strong&gt;6-char&lt;/strong&gt; minimum, expandable to 7-8.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Traffic:&lt;/strong&gt; say 100M DAU, ~5 resolves/day ⇒ 500M/day ≈ &lt;strong&gt;5.8k QPS&lt;/strong&gt; avg; peak ×10 ≈ &lt;strong&gt;58k QPS&lt;/strong&gt; read. Writes are much smaller (≪1k QPS).&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Storage:&lt;/strong&gt; 1B rows × ~1 KB/row (URL, code, meta) ≈ &lt;strong&gt;~1 TB&lt;/strong&gt; raw (before replication).&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;(These numbers justify caches, partitioning, and avoiding hot databases on read path.)&lt;/p&gt;</description></item><item><title>Url Shortener Agentic</title><link>https://valery.tech/system-design/projects/url-shortener/url-shortener-agentic/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://valery.tech/system-design/projects/url-shortener/url-shortener-agentic/</guid><description>&lt;hr&gt;
&lt;p&gt;title: &amp;ldquo;URL Shortener Agentic&amp;rdquo;&lt;/p&gt;
&lt;p&gt;linkTitle: &amp;ldquo;URL Shortener Agentic&amp;rdquo;&lt;/p&gt;
&lt;h1 id="1-roo-code-local-service"&gt;1. Roo-Code local service&lt;/h1&gt;
&lt;p&gt;Prompt to Architect mode in roo-code: I need to build and MVP of url-shortener. It will have minimal functionality: just what need to be implemented to enable Redirect and Write Paths from @/docs/url-shortener.md . Api is specified in @/api/openapi.yaml . About structure: it will be one service with db. Later I&amp;rsquo;ll evolve it to microcervice architecture. Provide a plan to implement High-Level Design and write it to &amp;lsquo;docs/plan.md&amp;rsquo; (for example)&lt;/p&gt;</description></item><item><title>Url Shortener Nfrs</title><link>https://valery.tech/system-design/projects/url-shortener/url-shortener-nfrs/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://valery.tech/system-design/projects/url-shortener/url-shortener-nfrs/</guid><description>&lt;hr&gt;
&lt;p&gt;title: &amp;ldquo;URL Shortener NFRs&amp;rdquo;&lt;/p&gt;
&lt;p&gt;linkTitle: &amp;ldquo;URL Shortener NFRs&amp;rdquo;&lt;/p&gt;
&lt;h1 id="hellointerview-variant"&gt;hellointerview variant&lt;/h1&gt;
&lt;p&gt;&lt;strong&gt;Core Requirements&lt;/strong&gt;&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;The system should ensure uniqueness for the short codes (no two long URLs can map to the same short URL)&lt;/li&gt;
&lt;li&gt;The redirection should occur with minimal delay (&amp;lt; 100ms)&lt;/li&gt;
&lt;li&gt;The system should be reliable and available 99.99% of the time (availability &amp;gt; consistency)&lt;/li&gt;
&lt;li&gt;The system should scale to support 1B shortened URLs and 100M DAU&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;&lt;strong&gt;Below the line (out of scope):&lt;/strong&gt;&lt;/p&gt;</description></item><item><title>Url Shortener Nfrs V0</title><link>https://valery.tech/system-design/projects/url-shortener/url-shortener-nfrs-v0/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://valery.tech/system-design/projects/url-shortener/url-shortener-nfrs-v0/</guid><description>&lt;hr&gt;
&lt;p&gt;title: &amp;ldquo;URL Shortener NFRs v0&amp;rdquo;&lt;/p&gt;
&lt;p&gt;linkTitle: &amp;ldquo;URL Shortener NFRs v0&amp;rdquo;&lt;/p&gt;
&lt;p&gt;Other to consider:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Document how deactivate/expire signals propagate to caches and storage to bound staleness and avoid serving dead links beyond the intended window&lt;/li&gt;
&lt;li&gt;Adopt cache‑aside on the app with optional background warm on create, and define stale‑on‑error behavior for resilience during short origin disruptions&lt;/li&gt;
&lt;li&gt;Specify edge and regional cache TTLs for hot keys, negative‑cache TTLs for 404/410, and cache‑bust rules on deactivate/expire to ensure user‑visible correctness with minimal origin hits&lt;/li&gt;
&lt;li&gt;Observability: Emit edge and app metrics for success rate, latency (p95/p99), dependency health, and burn‑rate, add synthetic checks for top links, and define alert thresholds aligned to SLOs.&lt;/li&gt;
&lt;li&gt;Provide concise runbooks for cache hot‑key misses, regional degradations, store throttling, and rollback procedures to accelerate MTTR within the error budget&lt;/li&gt;
&lt;li&gt;Capture cutover mechanics such as DNS/health‑based routing, data replication mode, and rollback safety so the path to 99.99% is real but gated&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;API and contract polish&lt;/p&gt;</description></item><item><title>Url Shortener Useful</title><link>https://valery.tech/system-design/projects/url-shortener/url-shortener-useful/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://valery.tech/system-design/projects/url-shortener/url-shortener-useful/</guid><description>&lt;hr&gt;
&lt;p&gt;title: &amp;ldquo;URL Shortener Useful&amp;rdquo;&lt;/p&gt;
&lt;p&gt;linkTitle: &amp;ldquo;URL Shortener Useful&amp;rdquo;&lt;/p&gt;
&lt;p&gt;From a product marketing perspective, &amp;ldquo;Analytics&amp;rdquo; might be the core value proposition you sell. But from a &lt;strong&gt;system implementation and user-experience perspective, Redirection is the non-negotiable, foundational core of the entire product.&lt;/strong&gt;&lt;/p&gt;</description></item></channel></rss>