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)
URL shortening service的更多相关文章
- Design Tiny URL
Part 1: 前言: 最近看了一些关于短址(short URL)方面的一些博客,有些博客说到一些好的东西,但是,也不是很全,所以,这篇博客算是对其它博客的一个总结吧. 介绍: 短址,顾名思义,就是把 ...
- [LeetCode] Design TinyURL 设计精简URL地址
Note: For the coding companion problem, please see: Encode and Decode TinyURL. How would you design ...
- [LeetCode] Encode and Decode TinyURL 编码和解码精简URL地址
Note: This is a companion problem to the System Design problem: Design TinyURL. TinyURL is a URL sho ...
- 535. Encode and Decode TinyURL 长短URL
[抄题]: TinyURL is a URL shortening service where you enter a URL such as https://leetcode.com/problem ...
- GO语言的开源库
Indexes and search engines These sites provide indexes and search engines for Go packages: godoc.org ...
- leetcode bugfree note
463. Island Perimeterhttps://leetcode.com/problems/island-perimeter/就是逐一遍历所有的cell,用分离的cell总的的边数减去重叠的 ...
- javascript,HTML,PHP,ASP做301跳转代码 SEO优化设置
URL HTTP Redirection URL http redirection is an automatic URL change operation from one URL to anoth ...
- Go语言(golang)开源项目大全
转http://www.open-open.com/lib/view/open1396063913278.html内容目录Astronomy构建工具缓存云计算命令行选项解析器命令行工具压缩配置文件解析 ...
- [转]Go语言(golang)开源项目大全
内容目录 Astronomy 构建工具 缓存 云计算 命令行选项解析器 命令行工具 压缩 配置文件解析器 控制台用户界面 加密 数据处理 数据结构 数据库和存储 开发工具 分布式/网格计算 文档 编辑 ...
随机推荐
- IOS - unity3d错误Could not produce class with ID
运行环境 Unity 5.3.5f1 (IL2CPP)编译IOS版本 XCode Version 7.2.1 (7C1002) Mac OS X 10.11.3 (15D21) (Mac mini) ...
- VMware 报错“Intel VT-x处于禁止状态”
VMware Workstation 10虚拟机安装64位windows server 2008 R2系统时报错“Intel VT-x处于禁止状态”,如下图. 工具/原料 VMware Wor ...
- EasyNVR RTSP摄像机HLS直播服务器中使用Onvif协议获取设备快照
我们知道EasyNVR中可以获取快照信息,之前的文章也说明了EasyNVR是如何进行快照抓取的 这里我们使用另一种方法进行快照的抓取 流程 获取设备能力Capabilities 获取设备的能力,并且可 ...
- android菜鸟学习笔记5----第一个android程序
程序功能:点击一个按钮,然后弹出一个提示信息 Step 1:在eclipse中新建一个android application project,在创建过程中不勾选create activity,这样就创 ...
- django url匹配过程
ROOT_URLCONF root URLconf module urlpatterns “include” other URLconf modules chops off whatever part ...
- 20179209课后作业之od命令重写
一.问题描述: 1 复习c文件处理内容 2 编写myod.c 用myod XXX实现Linux下od -tx -tc XXX的功能 3. main与其他分开,制作静态库和动态库 4. 编写Makefi ...
- imagick图片压缩。
选择一个合适的图片处理扩展包. 常见的扩展如GD,imagick,Gmagick. 老古董的GD丢掉吧,效率很低,而且压缩的图片体积很大=.= imagick是个不错的选择,在PHP的图片处理扩展 ...
- 关于android R.java文件无法创建的问题
R.java文件无法创建的原因网上有很多说法普遍是以下两种: 1. xml文件有错误: 解决方法就是找到哪个xml有错然后把错误修复就OK了. 2.编码问题 这时候只要把xml文件的编码改成utf8就 ...
- Android Weekly Notes Issue #318
Android Weekly Issue #318 July 15th, 2018 Android Weekly Issue #318 本期内容包括: Android Navigation Compo ...
- SQL 数据类型 numeric varchar char
Numeric(10,2) 指字段是数字型,长度为10 小数为两位的 简要描述一下SQL中的五种数据类型:字符型,文本型,数值型,逻辑型和日期型 字符型 VARCHAR VS CHAR VARCHAR ...