PloneConf 2014 CDN terada

Preview:

DESCRIPTION

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

Citation preview

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

1

Plone behind CDN Using CloudFront

Manabu TERADA

2014/10/30

Plone Conference 2014

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

@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

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

384Mbps and more

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

I’m using Japanese site for my work at UK

Japan is very far from UK.

12 hours by Airplane.

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

Low latency

(Spending long time)

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

Using CDN

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

Contents Delivery Network

I’m using CloudFront on AWS

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

Only a few changing on

nginx config

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

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

nginx Varnish

Plone1

Plone2

Plone3

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

nginx Varnish

Plone1

Plone2

Plone3

CDN CloudFront

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/; }

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

nginx Varnish

Plone1

Plone2

Plone3

CDN CloudFront

1

Redirect

2

3 4

56

7

8

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

nginx Varnish

Plone1

Plone2

Plone3

CDN CloudFront

1

Redirect

2

Other usage

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

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

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

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

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

Thank youCMSPlone

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

Recommended