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 构建工具 缓存 云计算 命令行选项解析器 命令行工具 压缩 配置文件解析器 控制台用户界面 加密 数据处理 数据结构 数据库和存储 开发工具 分布式/网格计算 文档 编辑 ...
随机推荐
- lnmp建站常识
1.nginx配置网站目录并修改访问的端口:nginx.conf文件 listen 666;//端口默认为80,修改后增强安全性 server_name www.lnmp.org; index ind ...
- phpstorm pycharm IntelliJ IDEA激活
phpstorm 和 pycharm server选项里边输入 http://idea.imsxm.com/ IntelliJ IDEA 1. 到网站 http://idea.lanyus.com/ ...
- iphone开发之获取网卡的MAC地址和IP地址
本文转载至 http://blog.csdn.net/arthurchenjs/article/details/6358489 这是获取网卡的硬件地址的代码,如果无法编译通过,记得把下面的这几个头文件 ...
- TP框架---thinkphp模型
1.获取系统常量信息的方法:在控制器DengLuController里面下写入下面的方法,然后调用该方法. public function test() { //echo "这是测试的&qu ...
- Unix环境高级编程—进程关系
终端登录 网络登录 进程组 getpgrp(void) setpgid(pid_t pid, pid_) 会话: 是一个或多个进程组的集合,通常由shell的管道将几个进程编成一组. setsid(v ...
- Chrome 的滚动条修改.
该方法针对于win下Chrome任何版本(未测试基于Chrome内核的其他浏览器),Lunix就是目录换了一下 目录是:**\Google\Chrome\User Data\Profile 2\Use ...
- opencv的x64库的版本和vs的版本的对应关系
1 关于vs的版本 visual studio是一个集成开发环境,而vc++是一个c++的compiler,vc++有一个版本和一个版本号,vs也有一个版本,它们的对应关系如下: MSVC++ 4.x ...
- CentOS下配置静态IP
第一.在VMware中进行配置使用桥接的方式.点击编辑选择虚拟网络编辑器 选择桥接模式,选择桥接到外部的网卡.选择我们主机下的网卡 第二步.配置虚拟机使用桥接模式 第三步:启动虚拟机进入到 /etc/ ...
- MIS系统中的报表测试
报表功能的基本要求,就是通过查询/统计/分析,提供用户所需的准确的数据.如果无法实现这个基本功能,则报表完全失去意义. 对于用户来说,报表可以直接影响到他们的决策,例如可能因为报表对销售和库存情况反映 ...
- ffmpeg去水印
1.用potplayer打开有水印的视频文件,截图一张待用.2.用IrfanView打开保存的图片,调整到100%大小,按住鼠标左键框选水印位置,记下标题“Selection:”右边的4组数字.3.f ...