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的更多相关文章

  1. Design Tiny URL

    Part 1: 前言: 最近看了一些关于短址(short URL)方面的一些博客,有些博客说到一些好的东西,但是,也不是很全,所以,这篇博客算是对其它博客的一个总结吧. 介绍: 短址,顾名思义,就是把 ...

  2. [LeetCode] Design TinyURL 设计精简URL地址

    Note: For the coding companion problem, please see: Encode and Decode TinyURL. How would you design ...

  3. [LeetCode] Encode and Decode TinyURL 编码和解码精简URL地址

    Note: This is a companion problem to the System Design problem: Design TinyURL. TinyURL is a URL sho ...

  4. 535. Encode and Decode TinyURL 长短URL

    [抄题]: TinyURL is a URL shortening service where you enter a URL such as https://leetcode.com/problem ...

  5. GO语言的开源库

    Indexes and search engines These sites provide indexes and search engines for Go packages: godoc.org ...

  6. leetcode bugfree note

    463. Island Perimeterhttps://leetcode.com/problems/island-perimeter/就是逐一遍历所有的cell,用分离的cell总的的边数减去重叠的 ...

  7. javascript,HTML,PHP,ASP做301跳转代码 SEO优化设置

    URL HTTP Redirection URL http redirection is an automatic URL change operation from one URL to anoth ...

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

    转http://www.open-open.com/lib/view/open1396063913278.html内容目录Astronomy构建工具缓存云计算命令行选项解析器命令行工具压缩配置文件解析 ...

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

    内容目录 Astronomy 构建工具 缓存 云计算 命令行选项解析器 命令行工具 压缩 配置文件解析器 控制台用户界面 加密 数据处理 数据结构 数据库和存储 开发工具 分布式/网格计算 文档 编辑 ...

随机推荐

  1. hadoop基础----hadoop理论(四)-----hadoop分布式并行计算模型MapReduce具体解释

    我们在前一章已经学习了HDFS: hadoop基础----hadoop理论(三)-----hadoop分布式文件系统HDFS详细解释 我们已经知道Hadoop=HDFS(文件系统,数据存储技术相关)+ ...

  2. 跨平台.NET Core--微软开源方向

     跨平台.NET Core--微软开源方向 微软宣布.net开源已经有一段时间了,新的跨平台的.net框架叫.NET Core. 当前支持Windows/Linux/OSX/Docker.官网:h ...

  3. linux下安装svn服务

    环境centos6.8 64位: 1.安装svn yum install subversion yum install mod_dav_svn 2.创建svn仓库 mkdie /home/svn 3. ...

  4. python返回列表中指定内容的索引

    import numpy as npa=[2,10,2,3,4,10,10]ans = np.where(np.array(a)==10)print(ans) 结果是:(array([1, 5, 6] ...

  5. html5+CSS3实现的炫酷超链接特效

    今天为大家介绍一个非常炫酷的超链接特效.在你做一些前端的网页时可以在里面去用上这些前卫时尚的效果. 这些超链接特性,大都是借助伪元素.svg.HTML5动画来实现的.效果都很漂亮,不信看下面. 用你的 ...

  6. Web性能测试中的几个概念【转】

    每秒查询率QPS:对一个特定的查询服务器在规定时间内所处理流量多少的衡量标准,即每秒请求数,即最大谈吐能力. 并发数:并发数和QPS是不同的概念,一般说QPS会说多少并发用户下QPS,当QPS相同时, ...

  7. ResNeXt——与 ResNet 相比,相同的参数个数,结果更好:一个 101 层的 ResNeXt 网络,和 200 层的 ResNet 准确度差不多,但是计算量只有后者的一半

    from:https://blog.csdn.net/xuanwu_yan/article/details/53455260 背景 论文地址:Aggregated Residual Transform ...

  8. <%!%>声明的变量和在<%%>中声明的变量的区别

    通过写一个demo,查看Jsp_Servlet源码可知: <%!%>声明的变量是类似类的成员变量,<%%>中的变量是方法中的变量. 参考博客: http://www.cnblo ...

  9. storm源码剖析(1):storm脚本

    今天看了一下storm的命令行脚本${STORM_HOME}/bin/storm,现在将剖析过程整理一下,作为记录.注:使用的storm版本为0.8.0. ${STORM_HOME}/bin/stor ...

  10. linux 下errno各个值的意义(转) errno.h

    strerror(errno):获取errno对应的错误 查看错误代码errno是调试程序的一个重要方法.当linux C api函数发生异常时,一般会将errno变量(需include errno. ...