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 构建工具 缓存 云计算 命令行选项解析器 命令行工具 压缩 配置文件解析器 控制台用户界面 加密 数据处理 数据结构 数据库和存储 开发工具 分布式/网格计算 文档 编辑 ...
随机推荐
- python 基础 8.5 re 的match对象
#/usr/bin/python #coding=utf-8 #@Time :2017/11/18 21:49 #@Auther :liuzhenchuan #@File :match对象.p ...
- 九度OJ 1007:奥运排序问题 (排序)
时间限制:1 秒 内存限制:32 兆 特殊判题:否 提交:7344 解决:1568 题目描述: 按要求,给国家进行排名. 输入: 有多组数据. 第一行给出国家数N,要求排名的国家数M,国家号从0到N- ...
- cocos2d-js添加百通广告(通过jsb反射机制)
1.导入jar包,包括so文件 2.配置AndroidManifest.xml文件,添加: <!-- BDAPPUNIONSDK start --> <activity androi ...
- Android学习之——优化篇(2)
一.高级优化 上篇主要从0基础优化的方式,本篇主要将从程序执行性能的角度出发,分析各种经常使用方案的不足.并给出对象池技术.基础数据类型替换法.屏蔽函数计算三种能够节省资源开销和处理器时间的优 ...
- 20170326 ABAP调用外部webservice实例
调用外部webservice 使用Tcode: SICF SPROXSET 设置创建proxy 的权限 SE80 SOAMANAGER 一.目的:调用外部SRM系统的 webservice: ...
- HDU3336 Count the string —— KMP next数组
题目链接:https://vjudge.net/problem/HDU-3336 Count the string Time Limit: 2000/1000 MS (Java/Others) ...
- 部署asp.net网站的小问题
C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\CONFIG web.config 修改 trust level="Full"
- Ubuntu 17.4下如何安装VMwareTools
解压vmware-tools-distrib 运行vmware-install.pl安装过程中间出现错误,要求选择"ifconfig"工具.由于ifconfig工具过时逐渐被各大厂 ...
- BZOJ 1191 [HNOI2006]超级英雄Hero:二分图匹配 匈牙利算法
题目链接:http://www.lydsy.com/JudgeOnline/problem.php?id=1191 题意: 有m道题,每答对一题才能接着回答下一个问题. 你一道题都不会,但是你有n个“ ...
- 使用谷歌浏览器进行Web开发技巧
1.为了避免缓存影响开发,使用使用那个“Ctrl+Shift+N”进入浏览器的隐身模式