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 构建工具 缓存 云计算 命令行选项解析器 命令行工具 压缩 配置文件解析器 控制台用户界面 加密 数据处理 数据结构 数据库和存储 开发工具 分布式/网格计算 文档 编辑 ...
随机推荐
- jquery 滚动效果插件
1.css <style> .fl { float: left; } .slider0 img { display: block; width:100px; padding: 2px; } ...
- Grails 简要
一.什么是Grails? Grails is an Open Source, full stack, web application framework for the JVM. It takes a ...
- 利用.dSYM跟.app文件准确定位Crash位置
本文转载至 http://blog.csdn.net/lvxiangan/article/details/28102629 利用.dSYM和.app文件准确定位Crash位置首先,确保 ...
- 可能是目前市面上唯一能够支持全平台的RTMP推流组件:Windows、Linux、Android、iOS、ARM
EasyRTMP是什么? EasyRTMP是一套RTMP直播推送功能组件,内部集成了包括:基本RTMP协议.断线重连.异步推送.环形缓冲区.推送网络拥塞自动丢帧.缓冲区关键帧检索.事件回调(断线.音视 ...
- Asp.Net Mvc: 浅析TempData机制
一. Asp.Net Mvc中的TempData 在Asp.Net Mvc框架的ControllerBase中存在一个叫做TempData的Property,它的类型为TempDataDictiona ...
- babylon
https://github.com/babel/babel babylon - npm https://www.npmjs.com/package/babylon Babel is a compil ...
- Python爬虫--Requests库
Requests Requests是用python语言基于urllib编写的,采用的是Apache2 Licensed开源协议的HTTP库,requests是python实现的最简单易用的HTTP库, ...
- android MVP模式思考
在软件开发设计中,有多种软件设计模式,如web开发中经典的MVC, 将后台分为三层:Model层,View层和Controller层,其中,Model主要是数据处理,如数据库,文件,或网络数据等:Vi ...
- 初学OpenMP
这两天在看多核计算的书,就要用到openmp,因为我使用vs2015,从微软可以看到是支持openmp2.0版本的 具体使用: 在vs里创造一个控制台项目,然后打开属性管理器,在属性管理器里找到配置属 ...
- 线上cpu100%问题快速定位
问题描述:服务器上部署了多个tomcat,即垂直切分的Web站点,记忆多个Java微服务,突然收到运维的cpu异常告警. 步骤一:找到最耗cpu的进程 工具:top 方法: 执行top -c,显示进程 ...