20
株式会社CMSコミュニケーションズ 1 Plone behind CDN Using CloudFront Manabu TERADA 2014/10/30 Plone Conference 2014 株式会社CMSコミュニケーションズ

PloneConf 2014 CDN terada

Embed Size (px)

DESCRIPTION

Plone behind CDN Using CloudFront. And other usage by CloudFront, And Case study in Japan

Citation preview

Page 1: PloneConf 2014 CDN terada

株式会社CMSコミュニケーションズ

1

Plone behind CDN Using CloudFront

Manabu TERADA

2014/10/30

Plone Conference 2014

株式会社CMSコミュニケーションズ

Page 2: PloneConf 2014 CDN terada

@terapyon

Owner of CMS communications Inc.

Chair of PyCon APAC 2013 in Japan

Member of Plone Foundation

Member of NVDA Japanese Team

Member of Gold Concert staff team

About me株式会社CMSコミュニケーションズ

Manabu TERADA

We use Plone for building web site

Universities, Public institutions

Engineering company

Supporting education tools

CMScom

2

Page 3: PloneConf 2014 CDN terada

Our customer requested highest system.

864,000 pv/day --> 17,180,000 req/day

10 pv/s --> 200 req/s

(1.6MB/Page 16MB/s = 128Mbps)

Peak time

30pv/s --> 600 req/s

(384Mbps)

Motivation (1)株式会社CMSコミュニケーションズ 3

Page 4: PloneConf 2014 CDN terada

384Mbps and more

株式会社CMSコミュニケーションズ 4

Page 5: PloneConf 2014 CDN terada

I’m using Japanese site for my work at UK

Japan is very far from UK.

12 hours by Airplane.

Motivation (2)株式会社CMSコミュニケーションズ 5

Page 6: PloneConf 2014 CDN terada

Low latency

(Spending long time)

株式会社CMSコミュニケーションズ 6

Page 7: PloneConf 2014 CDN terada

Using CDN

株式会社CMSコミュニケーションズ 7

Page 8: PloneConf 2014 CDN terada

Contents Delivery Network

I’m using CloudFront on AWS

CDN株式会社CMSコミュニケーションズ 8

Page 9: PloneConf 2014 CDN terada

Only a few changing on

nginx config

Server Setting株式会社CMSコミュニケーションズ 9

Page 10: PloneConf 2014 CDN terada

System structure w/o CDN株式会社CMSコミュニケーションズ 10

nginx Varnish

Plone1

Plone2

Plone3

Page 11: PloneConf 2014 CDN terada

System structure w/ CDN株式会社CMSコミュニケーションズ 11

nginx Varnish

Plone1

Plone2

Plone3

CDN CloudFront

Page 12: PloneConf 2014 CDN terada

nginx Config株式会社CMSコミュニケーションズ 12

location / { if ($uri ~* \.(jpe?g|png|gif|pdf|gz|tgz|bz2|tbz|zip|tiff|tif)$) { set $no_plone A; } if ($uri ~* /(image|(image_(?:[^/]|(?!view.*).+)))$) { set $no_plone A; } if ($uri ~* \.(svg|swf|ico|mp3|mp4|m4a|ogg|mov|avi|wmv|flv)$) { set $no_plone A; } if ($uri ~* \.(css|js)$) { set $no_plone A; } if ( $http_user_agent != "Amazon CloudFront" ) { set $no_plone "${no_plone}B"; } if ($no_plone = AB) { expires 1h; rewrite ^ http://YOUR_SUBDOMAIN.cloudfront.net$request_uri? last; } proxy_pass http://to_varnish/VirtualHostBase/http/YOUR_DOMAIN:80/Plone/VirtualHostRoot/; }

Page 13: PloneConf 2014 CDN terada

Data delivery first time株式会社CMSコミュニケーションズ 13

nginx Varnish

Plone1

Plone2

Plone3

CDN CloudFront

1

Redirect

2

3 4

56

7

8

Page 14: PloneConf 2014 CDN terada

Data delivery株式会社CMSコミュニケーションズ 14

nginx Varnish

Plone1

Plone2

Plone3

CDN CloudFront

1

Redirect

2

Page 15: PloneConf 2014 CDN terada

Other usage

株式会社CMSコミュニケーションズ 15

Page 16: PloneConf 2014 CDN terada

Other usage株式会社CMSコミュニケーションズ

Streaming video with access control by Plone login

CloudFront provides Streaming and one time URL

system.

I will make the sprint topic tomorrow. Please join us. https://bitbucket.org/cmscom/c2.app.streamingaws

16

Page 17: PloneConf 2014 CDN terada

Case Study in Japan株式会社CMSコミュニケーションズ

http://www.osaka-u.ac.jp/

http://www.kyoto-u.ac.jp/

http://www.kumamoto-u.ac.jp/

http://todai.tv/

http://www.osaka-cu.ac.jp/

http://ocw.kyoto-u.ac.jp/

http://ocw.osaka-u.ac.jp/

https://crdeg2.cf.ocha.ac.jp/ocha/plone

https://my.osaka-u.ac.jp/ (need login)

17

Page 18: PloneConf 2014 CDN terada

Case Study in Japan株式会社CMSコミュニケーションズ

http://www.pref.yamagata.jp/

http://www.jetro.go.jp/

http://www.spring8.or.jp/

http://www.icsu-wds.org/

http://www.tokyofoundation.org/en/

http://www.scan-at-work.com/case

http://oss.sios.com/

http://www.jsps.gr.jp/

http://www.mkt-i.jp/career-voice

18

Page 19: PloneConf 2014 CDN terada

Plone Symposium Tokyo株式会社CMSコミュニケーションズ

Information and discussion Mailing List (Google

Group)

Please join

Plone Symposium Tokyo Group

https://groups.google.com/forum/?hl=ja#!aboutgroup/

plone-symposium-tokyo

19

Page 20: PloneConf 2014 CDN terada

Thank youCMSPlone

株式会社CMSコミュニケーションズ 20