SlideShare uma empresa Scribd logo
1 de 178
Using CDN to improve performance Gea-Suan Lin [email_address]
如果有問題…
請不要舉手,
請直接打斷!
亂發問才會亂爆八卦
我不能回答的,
有人可以回答。
 
不過因為投影片超過一百張
所以請節制…
Anyway…
開始。
從小網站開始…
一台  Server
一台  Web 一台  Database
…
不小心 把網站搞大了
Tuning
很多台  Web
DNS Round Robin
每一台  Web  都有  Public IP
…
前面架一台  Load balancer
兩個禮拜後…
Load balancer  凌晨三點當掉
總經理還沒睡
把換燈管的叫起來
換燈管的把我叫起來
…
買硬體的  Load balancer
出事就找人罰站
繼續  Tuning
用  Apache  提供  css ?
一個  css 3KB  佔用一個  50MB  的  httpd…
動態頁面 與 靜態檔案 分離
靜態檔案
獨立網域
static.bubble.com
nginx  或  lighttpd
為什麼用  nginx ?
CSS/JavaScript + gzip on-the-fly
一台  nginx
兩台  nginx ( 兩份檔案 )
出事了…
客服殺人…
IE6 + gzip  地雷
IE6  時  gzip  關掉
繼續成長…
N  台  nginx (N  份檔案 )
…
政治不正確
Reverse Proxy Cache
Squid
Invalidate  問題
/main.css
/main.css?v=[ 修改時間 ]
/main.css?v=[ CRC32 ]
講到這裡,有沒有問題?
網站繼續大下去…
「拓展海外市場」
需要改善非台灣的瀏覽速度
光速是固定的
台北 – 美西 120+ms
台北 – 美東 180+ms
在美國放伺服器
用  GeoDNS  分配流量
寫  Health Check  當國外當掉時改用台灣的伺服器
ZzZz…
除了美洲還有歐洲
自己管理的成本過高
外包給專業的…
CDN
( 終於進入主題了 )
Content Delivery Network
內容傳遞網路
( 屁 )
等於沒解釋…
多個伺服器群
多個地點
提供相同的內容
所以…
[object Object]
加快  TCP handshake  速度
加快  TCP  下載速度
2.  提供高可靠度
不同地點互相備援
3. DoS  防禦
「由專業公司防禦  DoS 」
「死道友不死貧道」
4.  成本
CDN  頻寬比較貴?
台灣頻寬比  CDN  貴!
一般頻寬計算方法: 95%
五分鐘取樣一次
一個月  30  天共  8640  次
刪除最高的  5% (432  次 )
取剩下最高的
From http://en.wikipedia.org/wiki/Burstable_billing
CDN  頻寬計算方式:總量
總量  =  平均流量  ( 等價 )
1Mbps ~ 10GB/day
換算?
依照網站的  MRTG Pattern
From http://en.wikipedia.org/wiki/Burstable_billing
95% 2.62M  與平均  1.27M
大約  2.06  倍
5.  克服瀏覽器壓縮  bug
用  CDN  後總量反而下降
講到這裡,有沒有問題?
CDN  的分類
Latency 、 Thoughput 、 Cost
CSS 、 JavaScript
低  Latency 、初期  Thoughput  要高、 Cost  不是主要考量
亞洲要有直接連線的  PoPs
尤其是  HiNet  與  TANet
影音
Latency  不重要, Thoughput  足夠就好, Cost  要低
封包到美西再到香港
所以…
( 如果有時間的話 )
總是要講一下實際案例?
Akamai
很大,非常大,第一大
效能是最好的
台灣唯一有  PoPs  的  CDN
台灣有經銷商
價錢…
Limelight Networks
第二大?
YouTube  被  Google  買之前的  CDN
有香港與日本的  PoPs
但是都是導到美西  PoPs
第二大不一定比其他的好
CDNetworks
第三大?
二月買下  Panther Express
討論  Panther Express
有香港與日本的  PoPs
HiNet  與  TANet  到香港都是  20+ms
HiNet  調整  routing  時會自動跳到日本,約  30+ms
PIXNET  的  CSS/JavaScript
EdgeCast
第  N  大  ( 不重要了 )
有香港與日本的  PoPs
會導到香港的  PoP ,但是會先到美西
但是速度沒問題
PIXNET  的影音
Voxel
就是一家  CDN  業者…
價錢公佈在網站上
沒有亞洲的  PoPs
Amazon CloudFront
Because it’s Amazon…
Don’t waste your time
Amazon S3  應該找其他  CDN  搭配用
SimpleCDN
完全是拼價錢的  CDN
目前沒有亞洲的  PoPs
不吃  file.css?v=[ 時間 ]
就…
實際案例
( 如果還有時間的話 )
download.microsoft.com
Akamai + Limelight
js.microsoft.com
Akamai
www.barackobama.com
Panther Express (g2)
US-only PoPs
public.slideshare.net
Panther Express (g1)
US + EU PoPs
cdn.slideshare.net
Panther Express (l1)
價錢導向的  CDN Level
cdn1.badongo.com cdn2.badongo.com cdn3.badongo.com cdn4.badongo.com
Amazon CloudFront Akamai EdgeCast ( 目前是這個 ) EdgeCast
Thanks

Mais conteúdo relacionado

Mais procurados

AWS 고객이 주로 겪는 운영 이슈에 대한 해법-AWS Summit Seoul 2017
AWS 고객이 주로 겪는 운영 이슈에 대한 해법-AWS Summit Seoul 2017AWS 고객이 주로 겪는 운영 이슈에 대한 해법-AWS Summit Seoul 2017
AWS 고객이 주로 겪는 운영 이슈에 대한 해법-AWS Summit Seoul 2017
Amazon Web Services Korea
 

Mais procurados (20)

イマドキ!ユースケース別に見るAWS IoT への接続パターン
イマドキ!ユースケース別に見るAWS IoT への接続パターンイマドキ!ユースケース別に見るAWS IoT への接続パターン
イマドキ!ユースケース別に見るAWS IoT への接続パターン
 
Data Lake Security on AWS
Data Lake Security on AWSData Lake Security on AWS
Data Lake Security on AWS
 
Streaming sql and druid
Streaming sql and druid Streaming sql and druid
Streaming sql and druid
 
20200818 AWS Black Belt Online Seminar AWS Shield Advanced
20200818 AWS Black Belt Online Seminar AWS Shield Advanced20200818 AWS Black Belt Online Seminar AWS Shield Advanced
20200818 AWS Black Belt Online Seminar AWS Shield Advanced
 
Deep Dive: AWS Command Line Interface
Deep Dive: AWS Command Line InterfaceDeep Dive: AWS Command Line Interface
Deep Dive: AWS Command Line Interface
 
AWS solution Architect Associate study material
AWS solution Architect Associate study materialAWS solution Architect Associate study material
AWS solution Architect Associate study material
 
AWS 상의 컨테이너 서비스 소개 ECS, EKS - 이종립 / Principle Enterprise Evangelist @베스핀글로벌
AWS 상의 컨테이너 서비스 소개 ECS, EKS - 이종립 / Principle Enterprise Evangelist @베스핀글로벌AWS 상의 컨테이너 서비스 소개 ECS, EKS - 이종립 / Principle Enterprise Evangelist @베스핀글로벌
AWS 상의 컨테이너 서비스 소개 ECS, EKS - 이종립 / Principle Enterprise Evangelist @베스핀글로벌
 
AWS Black Belt Online Seminar 2017 Amazon Relational Database Service (Amazon...
AWS Black Belt Online Seminar 2017 Amazon Relational Database Service (Amazon...AWS Black Belt Online Seminar 2017 Amazon Relational Database Service (Amazon...
AWS Black Belt Online Seminar 2017 Amazon Relational Database Service (Amazon...
 
Amazon DynamoDB Under the Hood: How We Built a Hyper-Scale Database (DAT321) ...
Amazon DynamoDB Under the Hood: How We Built a Hyper-Scale Database (DAT321) ...Amazon DynamoDB Under the Hood: How We Built a Hyper-Scale Database (DAT321) ...
Amazon DynamoDB Under the Hood: How We Built a Hyper-Scale Database (DAT321) ...
 
AWS re:Invent 2016: DNS Demystified: Getting Started with Amazon Route 53, fe...
AWS re:Invent 2016: DNS Demystified: Getting Started with Amazon Route 53, fe...AWS re:Invent 2016: DNS Demystified: Getting Started with Amazon Route 53, fe...
AWS re:Invent 2016: DNS Demystified: Getting Started with Amazon Route 53, fe...
 
AWS 고객이 주로 겪는 운영 이슈에 대한 해법-AWS Summit Seoul 2017
AWS 고객이 주로 겪는 운영 이슈에 대한 해법-AWS Summit Seoul 2017AWS 고객이 주로 겪는 운영 이슈에 대한 해법-AWS Summit Seoul 2017
AWS 고객이 주로 겪는 운영 이슈에 대한 해법-AWS Summit Seoul 2017
 
Db2をAWS上に構築する際のヒント&TIPS 2019年7月版
Db2をAWS上に構築する際のヒント&TIPS 2019年7月版Db2をAWS上に構築する際のヒント&TIPS 2019年7月版
Db2をAWS上に構築する際のヒント&TIPS 2019年7月版
 
Best Practices for Running SQL Server on Amazon RDS (DAT323) - AWS re:Invent ...
Best Practices for Running SQL Server on Amazon RDS (DAT323) - AWS re:Invent ...Best Practices for Running SQL Server on Amazon RDS (DAT323) - AWS re:Invent ...
Best Practices for Running SQL Server on Amazon RDS (DAT323) - AWS re:Invent ...
 
20221202-WHOIS教室 Ver3.0.pdf
20221202-WHOIS教室 Ver3.0.pdf20221202-WHOIS教室 Ver3.0.pdf
20221202-WHOIS教室 Ver3.0.pdf
 
Terraform을 기반한 AWS 기반 대규모 마이크로서비스 인프라 운영 노하우 - 이용욱, 삼성전자 :: AWS Summit Seoul ...
Terraform을 기반한 AWS 기반 대규모 마이크로서비스 인프라 운영 노하우 - 이용욱, 삼성전자 :: AWS Summit Seoul ...Terraform을 기반한 AWS 기반 대규모 마이크로서비스 인프라 운영 노하우 - 이용욱, 삼성전자 :: AWS Summit Seoul ...
Terraform을 기반한 AWS 기반 대규모 마이크로서비스 인프라 운영 노하우 - 이용욱, 삼성전자 :: AWS Summit Seoul ...
 
Aws auto scalingによるwebapサーバbatchサーバの構成例
Aws auto scalingによるwebapサーバbatchサーバの構成例Aws auto scalingによるwebapサーバbatchサーバの構成例
Aws auto scalingによるwebapサーバbatchサーバの構成例
 
(NET406) Deep Dive: AWS Direct Connect and VPNs
(NET406) Deep Dive: AWS Direct Connect and VPNs(NET406) Deep Dive: AWS Direct Connect and VPNs
(NET406) Deep Dive: AWS Direct Connect and VPNs
 
[2019.04] 쿠버네티스 기반 하이퍼레저 패브릭 네트워크 구축하기
[2019.04] 쿠버네티스 기반 하이퍼레저 패브릭 네트워크 구축하기[2019.04] 쿠버네티스 기반 하이퍼레저 패브릭 네트워크 구축하기
[2019.04] 쿠버네티스 기반 하이퍼레저 패브릭 네트워크 구축하기
 
Cloud Architectures with AWS Direct Connect (ARC304) | AWS re:Invent 2013
Cloud Architectures with AWS Direct Connect (ARC304) | AWS re:Invent 2013Cloud Architectures with AWS Direct Connect (ARC304) | AWS re:Invent 2013
Cloud Architectures with AWS Direct Connect (ARC304) | AWS re:Invent 2013
 
AWS Cloud Practitioner Tutorial | Edureka
AWS Cloud Practitioner Tutorial | EdurekaAWS Cloud Practitioner Tutorial | Edureka
AWS Cloud Practitioner Tutorial | Edureka
 

Destaque

Future of CDN - Next 10 Years - Ahmet Ozalp, Akamai Technologies - DigiWorld ...
Future of CDN - Next 10 Years - Ahmet Ozalp, Akamai Technologies - DigiWorld ...Future of CDN - Next 10 Years - Ahmet Ozalp, Akamai Technologies - DigiWorld ...
Future of CDN - Next 10 Years - Ahmet Ozalp, Akamai Technologies - DigiWorld ...
IDATE DigiWorld
 
Netflix CDN and Open Source
Netflix CDN and Open SourceNetflix CDN and Open Source
Netflix CDN and Open Source
Gleb Smirnoff
 
Introduction to chinacache services
Introduction to chinacache servicesIntroduction to chinacache services
Introduction to chinacache services
Lillian shao
 
Hadoop summit 2010 frameworks panel elephant bird
Hadoop summit 2010 frameworks panel elephant birdHadoop summit 2010 frameworks panel elephant bird
Hadoop summit 2010 frameworks panel elephant bird
Kevin Weil
 

Destaque (20)

How Content Delivery Networks Work
How Content Delivery Networks WorkHow Content Delivery Networks Work
How Content Delivery Networks Work
 
Future of CDN - Next 10 Years - Ahmet Ozalp, Akamai Technologies - DigiWorld ...
Future of CDN - Next 10 Years - Ahmet Ozalp, Akamai Technologies - DigiWorld ...Future of CDN - Next 10 Years - Ahmet Ozalp, Akamai Technologies - DigiWorld ...
Future of CDN - Next 10 Years - Ahmet Ozalp, Akamai Technologies - DigiWorld ...
 
Content Delivery Network
Content Delivery NetworkContent Delivery Network
Content Delivery Network
 
Netflix CDN and Open Source
Netflix CDN and Open SourceNetflix CDN and Open Source
Netflix CDN and Open Source
 
Monitoring CDN Performance
Monitoring CDN PerformanceMonitoring CDN Performance
Monitoring CDN Performance
 
NGINX High-performance Caching
NGINX High-performance CachingNGINX High-performance Caching
NGINX High-performance Caching
 
Jifty
JiftyJifty
Jifty
 
Introduction to Angular2
Introduction to Angular2Introduction to Angular2
Introduction to Angular2
 
CONTENT DELIVERY NETWORK
CONTENT DELIVERY NETWORK CONTENT DELIVERY NETWORK
CONTENT DELIVERY NETWORK
 
A Better Rich Media Experience & Video Analytics at Arkena with Apache Hadoop
A Better Rich Media Experience & Video Analytics at Arkena with Apache HadoopA Better Rich Media Experience & Video Analytics at Arkena with Apache Hadoop
A Better Rich Media Experience & Video Analytics at Arkena with Apache Hadoop
 
CDN 2.0
CDN 2.0CDN 2.0
CDN 2.0
 
China cache IDC Services 201611
China cache IDC Services 201611 China cache IDC Services 201611
China cache IDC Services 201611
 
Introduction to chinacache services
Introduction to chinacache servicesIntroduction to chinacache services
Introduction to chinacache services
 
Introduction to Nginx
Introduction to NginxIntroduction to Nginx
Introduction to Nginx
 
Development of a Cisco ACI device package for NGINX as a Load-Balancer
Development of a Cisco ACI device package for NGINX as a Load-BalancerDevelopment of a Cisco ACI device package for NGINX as a Load-Balancer
Development of a Cisco ACI device package for NGINX as a Load-Balancer
 
Measuring CDN performance and why you're doing it wrong
Measuring CDN performance and why you're doing it wrongMeasuring CDN performance and why you're doing it wrong
Measuring CDN performance and why you're doing it wrong
 
Scaling Your Cache And Caching At Scale
Scaling Your Cache And Caching At ScaleScaling Your Cache And Caching At Scale
Scaling Your Cache And Caching At Scale
 
MySQL and SSD
MySQL and SSDMySQL and SSD
MySQL and SSD
 
Hadoop summit 2010 frameworks panel elephant bird
Hadoop summit 2010 frameworks panel elephant birdHadoop summit 2010 frameworks panel elephant bird
Hadoop summit 2010 frameworks panel elephant bird
 
Gaurab Ixp Tutorial
Gaurab Ixp TutorialGaurab Ixp Tutorial
Gaurab Ixp Tutorial
 

Semelhante a Using CDN to improve performance

淘宝软件基础设施构建实践
淘宝软件基础设施构建实践淘宝软件基础设施构建实践
淘宝软件基础设施构建实践
Wensong Zhang
 
淘宝软件基础设施构建实践
淘宝软件基础设施构建实践淘宝软件基础设施构建实践
淘宝软件基础设施构建实践
lovingprince58
 
淘宝软件基础设施构建实践
淘宝软件基础设施构建实践淘宝软件基础设施构建实践
淘宝软件基础设施构建实践
drewz lin
 
20110821 Web Development on Cloud Platform - PIXNET
20110821 Web Development on Cloud Platform - PIXNET20110821 Web Development on Cloud Platform - PIXNET
20110821 Web Development on Cloud Platform - PIXNET
Jui-Nan Lin
 
开源+自主开发 - 淘宝软件基础设施构建实践
开源+自主开发  - 淘宝软件基础设施构建实践开源+自主开发  - 淘宝软件基础设施构建实践
开源+自主开发 - 淘宝软件基础设施构建实践
Wensong Zhang
 
淘宝对象存储与Cdn系统到服务
淘宝对象存储与Cdn系统到服务淘宝对象存储与Cdn系统到服务
淘宝对象存储与Cdn系统到服务
drewz lin
 
大型视频网站单点分析与可用性提升-Qcon2011
大型视频网站单点分析与可用性提升-Qcon2011大型视频网站单点分析与可用性提升-Qcon2011
大型视频网站单点分析与可用性提升-Qcon2011
Yiwei Ma
 
Dreaming Infrastructure
Dreaming InfrastructureDreaming Infrastructure
Dreaming Infrastructure
kyhpudding
 
Taobao海量图片存储与cdn系统
Taobao海量图片存储与cdn系统Taobao海量图片存储与cdn系统
Taobao海量图片存储与cdn系统
智杰 付
 
淘宝图片存储与Cdn系统
淘宝图片存储与Cdn系统淘宝图片存储与Cdn系统
淘宝图片存储与Cdn系统
Dai Jun
 
Taobao 海量图片存储与CDN系统02
Taobao 海量图片存储与CDN系统02Taobao 海量图片存储与CDN系统02
Taobao 海量图片存储与CDN系统02
lovingprince58
 
Taobao海量图片存储与cdn系统
Taobao海量图片存储与cdn系统Taobao海量图片存储与cdn系统
Taobao海量图片存储与cdn系统
Michael Zhang
 
章文嵩:Taobao海量图片存储与cdn系统 v2-系统架构师
章文嵩:Taobao海量图片存储与cdn系统 v2-系统架构师章文嵩:Taobao海量图片存储与cdn系统 v2-系统架构师
章文嵩:Taobao海量图片存储与cdn系统 v2-系统架构师
Enlight Chen
 
视频Cdn架构浅淡 守住每一天
视频Cdn架构浅淡 守住每一天视频Cdn架构浅淡 守住每一天
视频Cdn架构浅淡 守住每一天
liuyu105
 

Semelhante a Using CDN to improve performance (20)

稳定、高效、低碳 -淘宝软件基础设施构建实践
稳定、高效、低碳  -淘宝软件基础设施构建实践稳定、高效、低碳  -淘宝软件基础设施构建实践
稳定、高效、低碳 -淘宝软件基础设施构建实践
 
淘宝软件基础设施构建实践
淘宝软件基础设施构建实践淘宝软件基础设施构建实践
淘宝软件基础设施构建实践
 
Taobao base
Taobao baseTaobao base
Taobao base
 
淘宝软件基础设施构建实践
淘宝软件基础设施构建实践淘宝软件基础设施构建实践
淘宝软件基础设施构建实践
 
淘宝软件基础设施构建实践
淘宝软件基础设施构建实践淘宝软件基础设施构建实践
淘宝软件基础设施构建实践
 
20110821 Web Development on Cloud Platform - PIXNET
20110821 Web Development on Cloud Platform - PIXNET20110821 Web Development on Cloud Platform - PIXNET
20110821 Web Development on Cloud Platform - PIXNET
 
开源+自主开发 - 淘宝软件基础设施构建实践
开源+自主开发  - 淘宝软件基础设施构建实践开源+自主开发  - 淘宝软件基础设施构建实践
开源+自主开发 - 淘宝软件基础设施构建实践
 
淘宝对象存储与Cdn系统到服务
淘宝对象存储与Cdn系统到服务淘宝对象存储与Cdn系统到服务
淘宝对象存储与Cdn系统到服务
 
Taobao图片存储与cdn系统到服务
Taobao图片存储与cdn系统到服务Taobao图片存储与cdn系统到服务
Taobao图片存储与cdn系统到服务
 
大型视频网站单点分析与可用性提升-Qcon2011
大型视频网站单点分析与可用性提升-Qcon2011大型视频网站单点分析与可用性提升-Qcon2011
大型视频网站单点分析与可用性提升-Qcon2011
 
Dreaming Infrastructure
Dreaming InfrastructureDreaming Infrastructure
Dreaming Infrastructure
 
Taobao海量图片存储与cdn系统
Taobao海量图片存储与cdn系统Taobao海量图片存储与cdn系统
Taobao海量图片存储与cdn系统
 
淘宝图片存储与Cdn系统
淘宝图片存储与Cdn系统淘宝图片存储与Cdn系统
淘宝图片存储与Cdn系统
 
Taobao海量图片存储与cdn系统
Taobao海量图片存储与cdn系统Taobao海量图片存储与cdn系统
Taobao海量图片存储与cdn系统
 
Taobao 海量图片存储与CDN系统02
Taobao 海量图片存储与CDN系统02Taobao 海量图片存储与CDN系统02
Taobao 海量图片存储与CDN系统02
 
Taobao海量图片存储与cdn系统
Taobao海量图片存储与cdn系统Taobao海量图片存储与cdn系统
Taobao海量图片存储与cdn系统
 
章文嵩:Taobao海量图片存储与cdn系统 v2-系统架构师
章文嵩:Taobao海量图片存储与cdn系统 v2-系统架构师章文嵩:Taobao海量图片存储与cdn系统 v2-系统架构师
章文嵩:Taobao海量图片存储与cdn系统 v2-系统架构师
 
Taobao海量图片存储与cdn系统 v2-系统架构师
Taobao海量图片存储与cdn系统 v2-系统架构师Taobao海量图片存储与cdn系统 v2-系统架构师
Taobao海量图片存储与cdn系统 v2-系统架构师
 
视频Cdn架构浅淡 守住每一天
视频Cdn架构浅淡 守住每一天视频Cdn架构浅淡 守住每一天
视频Cdn架构浅淡 守住每一天
 
构建基于Lamp的中型网站架构
构建基于Lamp的中型网站架构构建基于Lamp的中型网站架构
构建基于Lamp的中型网站架构
 

Using CDN to improve performance