URL shortening service

Use Cases

1, shortening : take a URL => return a much shorter URL

2, redirection : take a short URL => redirect to the original URL

3, custom URL : http://goo.gl/Trump2016

4, High availability

5, Analytics :

6, Automatic link removal

7, Manual link removal : e.g. porngraphy

8, UI vs. API, see http://goo.gl

Constraints:

make some guess about the volume

1, new URLs per month : 100 million   => because twitter daily tweets:

2, request per month : 1 billion =>

3, 10% for shortening and 90% for redirection

4, Requests per second : 400+ (40 : shortens, 360 : redirects)

5, 500 bytes per URL

6, 6 bytes per hash

Abstract Design:

1, Application service layer - services the requests

* shortening service

* redirection service

2, Data storage layer - keeps track of the hash<->URL mapping

* Acts like a big hash table

Bottlenecks:

1, traffic - how much, estimation, probably not the problem

2, data volume - quickly look up and insertion

3, how to split (scale)

时间: 2024-10-14 01:25:08

URL shortening service的相关文章

[LeetCode] Encode and Decode TinyURL 编码和解码小URL地址

Note: This is a companion problem to the System Design problem: Design TinyURL. TinyURL is a URL shortening service where you enter a URL such as https://leetcode.com/problems/design-tinyurl and it returns a short URL such as http://tinyurl.com/4e9iA

Design Tiny URL

Part 1: 前言: 最近看了一些关于短址(short URL)方面的一些博客,有些博客说到一些好的东西,但是,也不是很全,所以,这篇博客算是对其它博客的一个总结吧. 介绍: 短址,顾名思义,就是把长的 URL 转成短的 URL, 现在提供这种服务的有很多公司,我们以google家的 URL shortener 服务: http://goo.gl/ 为例. 首先我们到 http://goo.gl/,然后把本文博客的地址http://blog.csdn.net/beiyeqingteng 输入进

[LeetCode] 535. Encode and Decode TinyURL 编码和解码短URL

Note: This is a companion problem to the System Design problem: Design TinyURL.TinyURL is a URL shortening service where you enter a URL such as https://leetcode.com/problems/design-tinyurl and it returns a short URL such as http://tinyurl.com/4e9iAk

Go语言(golang)开源项目大全

转http://www.open-open.com/lib/view/open1396063913278.html内容目录Astronomy构建工具缓存云计算命令行选项解析器命令行工具压缩配置文件解析器控制台用户界面加密数据处理数据结构数据库和存储开发工具分布式/网格计算文档编辑器Encodings and Character SetsGamesGISGo ImplementationsGraphics and AudioGUIs and Widget ToolkitsHardwareLangu

GO语言的开源库

Indexes and search engines These sites provide indexes and search engines for Go packages: godoc.org gowalker gosearch Sourcegraph Contributing To edit this page you must be a contributor to the go-wiki project. To get contributor access, send mail t

LeetCode 解题思路:535.Encode and Decode TinyURL

TinyURL is a URL shortening service where you enter a URL such as https://leetcode.com/problems/design-tinyurl and it returns a short URL such as http://tinyurl.com/4e9iAk. Design the encode and decode methods for the TinyURL service. There is no res

[转]Go语言(golang)开源项目大全

内容目录 Astronomy 构建工具 缓存 云计算 命令行选项解析器 命令行工具 压缩 配置文件解析器 控制台用户界面 加密 数据处理 数据结构 数据库和存储 开发工具 分布式/网格计算 文档 编辑器 Encodings and Character Sets Games GIS Go Implementations Graphics and Audio GUIs and Widget Toolkits Hardware Language and Linguistics 日志 机器学习 Math

[LeetCode] Encode and Decode TinyURL

TinyURL is a URL shortening service where you enter a URL such as https://leetcode.com/problems/design-tinyurl and it returns a short URL such as http://tinyurl.com/4e9iAk. Design the encode and decode methods for the TinyURL service. There is no res

Encode and Decode TinyURL

Encode and Decode TinyURL TinyURL is a URL shortening service where you enter a URL such as https://leetcode.com/problems/design-tinyurl and it returns a short URL such as http://tinyurl.com/4e9iAk. Design the encode and decode methods for the TinyUR