Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
OpenResty在Strikingly网站集群中的应用
Search
Linghui Gong
October 21, 2017
Technology
0
190
OpenResty在Strikingly网站集群中的应用
Linghui Gong
October 21, 2017
Tweet
Share
More Decks by Linghui Gong
See All by Linghui Gong
Strikingly网站集群架构纵览
danielglh
0
290
打造国际化产品:Strikingly的I18n实践
danielglh
4
950
基于AWS Lambda的无服务器架构在Strikingly中的应用
danielglh
0
370
Other Decks in Technology
See All in Technology
Storage Browser for Amazon S3
miu_crescent
1
140
生成AIをより賢く エンジニアのための RAG入門 - Oracle AI Jam Session #20
kutsushitaneko
4
230
NilAway による静的解析で「10 億ドル」を節約する #kyotogo / Kyoto Go 56th
ytaka23
3
380
Opcodeを読んでいたら何故かphp-srcを読んでいた話
murashotaro
0
240
権威ドキュメントで振り返る2024 #年忘れセキュリティ2024
hirotomotaguchi
2
740
10個のフィルタをAXI4-Streamでつなげてみた
marsee101
0
170
オプトインカメラ:UWB測位を応用したオプトイン型のカメラ計測
matthewlujp
0
170
Snowflake女子会#3 Snowpipeの良さを5分で語るよ
lana2548
0
230
AI時代のデータセンターネットワーク
lycorptech_jp
PRO
1
290
LINEヤフーのフロントエンド組織・体制の紹介【24年12月】
lycorp_recruit_jp
0
530
Wvlet: A New Flow-Style Query Language For Functional Data Modeling and Interactive Data Analysis - Trino Summit 2024
xerial
1
120
watsonx.ai Dojo #5 ファインチューニングとInstructLAB
oniak3ibm
PRO
0
160
Featured
See All Featured
A Tale of Four Properties
chriscoyier
157
23k
Fontdeck: Realign not Redesign
paulrobertlloyd
82
5.3k
The MySQL Ecosystem @ GitHub 2015
samlambert
250
12k
We Have a Design System, Now What?
morganepeng
51
7.3k
Understanding Cognitive Biases in Performance Measurement
bluesmoon
26
1.5k
Exploring the Power of Turbo Streams & Action Cable | RailsConf2023
kevinliebholz
28
4.4k
XXLCSS - How to scale CSS and keep your sanity
sugarenia
247
1.3M
個人開発の失敗を避けるイケてる考え方 / tips for indie hackers
panda_program
95
17k
Practical Orchestrator
shlominoach
186
10k
Thoughts on Productivity
jonyablonski
67
4.4k
Learning to Love Humans: Emotional Interface Design
aarron
273
40k
How to Think Like a Performance Engineer
csswizardry
22
1.2k
Transcript
OpenResty ࣁ Strikingly ᗑᒊᵞᗭຝӾጱଫአ ὅٹพ҅Strikingly Ḓଅຝ
لݪԾߝ
لݪԾߝ
لݪԾߝ • ᒫӞਹ Y Combinator ਔ۸ጱ Ӿࢵڡڠմӱ • አಁᛔ200ग़ӻࢵਹࣈ܄ •
ඪ೮ݱᐿ੮ੑጱኪᚏᑏۖᦡ॓ • ඪ೮6ᐿጱԾߝኴᶎਮಁ ๐ۓ
لݪԾߝ • ᒫӞਹ Y Combinator ਔ۸ጱ Ӿࢵڡڠմӱ • አಁᛔ200ग़ӻࢵਹࣈ܄ •
ඪ೮ݱᐿ੮ੑጱኪᚏᑏۖᦡ॓ • ඪ೮6ᐿጱԾߝኴᶎਮಁ ๐ۓ • https://www.sxl.cn/ • 2016ଙ4์ྋୗവڊ • ԆᥝᰒӾࢵय़ᴭአಁ • ࢿ۸ጱԾߝᇙ • ᇿᒈԭStrikinglyጱߝᇈ
ই֜ڠୌӞӻᗑᒊҘ
None
ই֜ಓᓕӞӻᗑᒊҘ
౯ժىஞӞӻᗑᒊ……
౯ժىஞӞӻᗑᒊ…… • ฎވݢզ୨ಘ҅ள᭛ߥଫҘ
౯ժىஞӞӻᗑᒊ…… • ฎވݢզ୨ಘ҅ள᭛ߥଫҘ • ฎވٍ॓ӞਧᑕଶጱṛݢአҘ
౯ժىஞӞӻᗑᒊ…… • ฎވݢզ୨ಘ҅ள᭛ߥଫҘ • ฎވٍ॓ӞਧᑕଶጱṛݢአҘ • ฎވقቖᦢᳯள᭛ᑞਧҘ
౯ժىஞӞӻᗑᒊ…… • ฎވݢզ୨ಘ҅ள᭛ߥଫҘ • ฎވٍ॓ӞਧᑕଶጱṛݢአҘ • ฎވقቖᦢᳯள᭛ᑞਧҘ • ฎވٍ॓හഝփᬌጱਞقҘ
ԯଘݣᥴ٬ොໜ
ԯଘݣᥴ٬ොໜ • ᡦ۸๐ۓ + ग़ݢአ܄ + ᨮ࣐ᤍ + ୨ᖽ
ԯଘݣᥴ٬ොໜ • ᡦ۸๐ۓ + ग़ݢአ܄ + ᨮ࣐ᤍ + ୨ᖽ •
ಓᓕහഝପ๐ۓ + ݢአ܄ݝۅ + ਧ॓ղ
ԯଘݣᥴ٬ොໜ • ᡦ۸๐ۓ + ग़ݢአ܄ + ᨮ࣐ᤍ + ୨ᖽ •
ಓᓕහഝପ๐ۓ + ݢአ܄ݝۅ + ਧ॓ղ • ٖړݎᗑᕶ Content Delivery Network (CDN)
ই֜ಓᓕӞӻᗑᒊҘ
ই֜ಓᓕහጯӡӻᗑᒊҘ
౯ժىஞӞӻᗑᒊ…… • ฎވݢզ୨ಘ҅ள᭛ߥଫҘ • ฎވٍ॓ӞਧᑕଶጱṛݢአҘ • ฎވقቖᦢᳯள᭛ᑞਧҘ • ฎވٍ॓හഝփᬌጱਞقҘ
౯ժىஞྯӻᗑᒊ…… • ฎވݢզ୨ಘ҅ள᭛ߥଫҘ • ฎވٍ॓ӞਧᑕଶጱṛݢአҘ • ฎވقቖᦢᳯள᭛ᑞਧҘ • ฎވٍ॓හഝփᬌጱਞقҘ
ڡতොໜ
አಁᗑᒊວ
አಁᗑᒊວ ཛྷ
አಁᗑᒊວ ཛྷ አಁහഝ
አಁᗑᒊວ ཛྷ አಁහഝ JS ཛྷວක
አಁᗑᒊວ ཛྷ አಁහഝ JS ཛྷວක ᗑᶭ
አಁᗑᒊວ JavaScript ཛྷ •դᎱᅎၚ •դᎱ᯿አ •ວᲀय़ •SEOӧঅ ཛྷ አಁහഝ JS
ཛྷວක ᗑᶭ
๐ۓᒒວ ᗑᒊ๐ۓᵞᗭ
๐ۓᒒວ ཛྷ አಁහഝ JS ཛྷວක ວᕮຎ ᗑᶭ ᗑᒊ๐ۓᵞᗭ
ᳯ᷌ • ๐ۓᒒວຄٌၾᘙ CPU ᩒრ
ၞᰁူۖ 100% 20%
ᳯ᷌ • ๐ۓᒒວຄٌၾᘙ CPU ᩒრ
ᳯ᷌ • ๐ۓᒒວຄٌၾᘙ CPU ᩒრ • ๐ۓᒒວྲᘙ҅ߥଫᳵӧቘమ
ᳯ᷌ • ๐ۓᒒວຄٌၾᘙ CPU ᩒრ • ๐ۓᒒວྲᘙ҅ߥଫᳵӧቘమ • አಁݎᗑᒊԏݸץදӧ᷇ᔺ҅ݍ॔ວၵᩇᩒრ
ᳯ᷌ • ๐ۓᒒວຄٌၾᘙ CPU ᩒრ • ๐ۓᒒວྲᘙ҅ߥଫᳵӧቘమ • አಁݎᗑᒊԏݸץදӧ᷇ᔺ҅ݍ॔ວၵᩇᩒრ •
ݸᒒ๐ۓ෫ဩߥଫ҅ಅํአಁᗑᒊਠقӧݢአ
ᥴ٬ොໜ - ᶉா۸
ᥴ٬ොໜ - ᶉா۸ • ᖨਂಅํᶉாᶭᶎ • ᖨਂ᮱ړAPI᧗ • ᛔਧԎᖨਂڬෛګ •
قੴڬෛ • ᒊᅩڬෛ
ᶉா۸ොໜ
ᖨਂ๐ۓ
ದᭌࣳ • OpenResty v.s. ᛔ૩᭜ৼ • OpenResty • սᅩғचԭ NGINX
ୌ҅੪ฎṛᚆጱHTTP๐ۓ • ᗌᅩғෛጱದ҅ᒫӣොդᎱପӧड़ӿ҅ᨶᰁ݇૧ӧἶ • ᛔ૩᭜ৼ • սᅩғݢզᭌአኞாྲ౮ᆧጱ҅ᒫӣොդᎱପӿ • ᗌᅩғᵱᥝᛔ૩ਫሿ NGINX ૪ํጱ᮱ړۑᚆ҅ྲইդቘ
ӧ᯿॔᭜ৼ
ದᭌࣳ • OpenResty • Lua v.s. Moonscript • Lua: ੜૣᅎၚ҅ฃӤಋ҅ྲᵙᔜ᭗ҁزᤒ҅ཛྷࣘᦡᦇ҂
• Moonscript: ݎᘏๅঅٍ҅॓OOPᇙ҅դᎱๅᔜᓌ • ᔄྲғJavascript v.s. Coffeescript
ݎᘏපሲҁளԔ҂սض
ᖨਂਂؙ
ದᭌࣳ • OpenResty • Moonscript • S3/OSS v.s. NFS (Network
File System) • ๋ੜᦡғ • ඪ೮զӞਧ໒ୗጱkey༄ᔱᖨਂහഝ • ඪ೮ݐ̵ٟفڢᴻᖨਂහഝ • ඪ೮زහഝҘ
ᖨਂزහഝ
ದᭌࣳ • OpenResty • Moonscript • S3/OSS • Redis v.s.
RDBMS v.s. DynamoDB/ᤒ໒ਂؙ
ದᭌࣳ • ๐ۓғOpenResty • ғMoonscript • හഝғS3/OSS • زහഝғRedis
ᖨਂ᭦ᬋ
ᖨਂ᭦ᬋ
ᖨਂ᭦ᬋ
ᖨਂ᭦ᬋ
ᖨਂ᭦ᬋ
ํපᖨਂ • ᖨਂᇇᓕቘ • قੴᇇғኧᵞᗭդᎱᇇ٬ਧ • ᗑᒊᇇғኧአಁݎᗑᒊᇇ٬ਧ • ᖨਂහഝ key
• host + path + قੴᇇ + ᗑᒊᇇ
ᖨਂ᭦ᬋ
ᖨਂ᭦ᬋ
ᳯ᷌ࢧᶶ • ๐ۓᒒວຄٌၾᘙ CPU ᩒრ • ๐ۓᒒວྲᘙ҅ߥଫᳵӧቘమ • አಁݎᗑᒊԏݸץදӧ᷇ᔺ҅ݍ॔ວၵᩇᩒრ •
ݸᒒ๐ۓ෫ဩߥଫ҅ಅํአಁᗑᒊਠقӧݢአ
ᶉாᶭᶎ᧗ٺ80%
አಁᗑᒊ᮱ړṛݢአ
ᶱፓᦇښ • ᕡᔉଶᖨਂᓕቘ • ଘჶقੴᖨਂڬෛጱၞᰁူશ • ग़ࣈऒᜓᅩ᮱ᗟ҅ᬰӞྍදᬰᦢਮጱ᬴ • ۖாHTTPSᦤԡᓕቘ̵᮱ᗟ •
ᶉா۸๐ۓ -> አಁᗑᒊᗑى • Իۑᚆங๐ۓ۸
Project Captain
ᕪḵᕮ • ࣈݎሾह • Docker + Docker Compose • ቘᥴ
Nginx Phases • ݎঅ OpenResty ଫአጱڹ • ֵአ Moonscript • ݎපሲ܋ • դᎱݢीے
ᘶᔮොୗ • ஙܗ: @gonglinghui • ᎣԒ: @ὅٹพ • Github: @danielglh
• Twitter: @danielglh
We’re Hiring! Email:
[email protected]
Q & A