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について
Search
newapplesho
February 01, 2018
Programming
0
85
OpenRestyについて
OpenRestyについて
newapplesho
February 01, 2018
Tweet
Share
More Decks by newapplesho
See All by newapplesho
Continuous Integration for Pharo Smalltalk Part 2 (Travis CI)
newapplesho
0
170
今時なウェブ開発をSmalltalkでやってみる?
newapplesho
0
120
Continuous Integration for Pharo Smalltalk
newapplesho
0
130
Elasticsearch for Pharo Smalltalk
newapplesho
0
150
SourceCode Management with Pharo Smalltalk - Pharo Smalltalkソースコード管理方法
newapplesho
0
110
RUNNING Smalltalk - 実践Smalltalk
newapplesho
0
90
AWS SDK for Smalltalk
newapplesho
0
90
How Smalltalker Works
newapplesho
0
78
愛せよ、さもなくば捨てよ。
newapplesho
0
110
Other Decks in Programming
See All in Programming
Beyond ORM
77web
7
860
선언형 UI에서의 상태관리
l2hyunwoo
0
170
create_tableをしただけなのに〜囚われのuuid編〜
daisukeshinoku
0
260
これでLambdaが不要に?!Step FunctionsのJSONata対応について
iwatatomoya
2
3.7k
Amazon S3 NYJavaSIG 2024-12-12
sullis
0
100
フロントエンドのディレクトリ構成どうしてる? Feature-Sliced Design 導入体験談
osakatechlab
8
4.1k
バグを見つけた?それAppleに直してもらおう!
uetyo
0
180
PHPUnitしか使ってこなかった 一般PHPerがPestに乗り換えた実録
mashirou1234
0
200
命名をリントする
chiroruxx
1
410
htmxって知っていますか?次世代のHTML
hiro_ghap1
0
340
Haze - Real time background blurring
chrisbanes
1
510
103 Early Hints
sugi_0000
1
230
Featured
See All Featured
The Cult of Friendly URLs
andyhume
78
6.1k
ピンチをチャンスに:未来をつくるプロダクトロードマップ #pmconf2020
aki_iinuma
111
49k
10 Git Anti Patterns You Should be Aware of
lemiorhan
PRO
656
59k
Visualization
eitanlees
146
15k
How GitHub (no longer) Works
holman
311
140k
We Have a Design System, Now What?
morganepeng
51
7.3k
Site-Speed That Sticks
csswizardry
2
190
The World Runs on Bad Software
bkeepers
PRO
65
11k
Keith and Marios Guide to Fast Websites
keithpitt
410
22k
The Cost Of JavaScript in 2023
addyosmani
45
7k
Chrome DevTools: State of the Union 2024 - Debugging React & Beyond
addyosmani
2
170
Distributed Sagas: A Protocol for Coordinating Microservices
caitiem20
330
21k
Transcript
S h o Yo s h i d a (
@ n e w a p p l e s h o ) O p e n R e s t y Λ ༻ ͍ͯ ΠέΠέ ͳ α ʔ Ϗ ε Λ ࡞ Δ ํ ๏ 2 0 1 8 / 0 2 / 0 1
४ උ Ͱ ͖ ͯ ͍ ͳ ͍Ͱ ͢ ɾ
ɾ ɾ ͢Έ·ͤΜɻௐࢠͷΓ·ͨ͠ɻ
O p e n R e s t y ͱ
• lua-nginx-moduleͳͲɺศརͳϞδϡʔϧΛՃͨ͠nginxΛ؆୯ʹϏϧυ Ͱ͖ΔΑ͏ʹͯ͘͠ΕΔϓϩμΫτ • ngx_luaΛ͡Ίͱ͢ΔCͰॻ͔Ε֤ͨछαʔυύʔςΟϞδϡʔϧͱ ngx_luaͷAPIΛར༻ͨ͠restyϞδϡʔϧɺLua/LuaJITͰߏ
L u a - n g i n x -
m o d u l e • https://github.com/openresty/lua-nginx-module • https://www.nginx.com/resources/wiki/modules/lua/
N g i n x Ͱ l u a
͑Δ ͱ Կ ͕ ͍ ͍ ͷ ʁ • ϛυϧΣΞʹೝূɺϧʔςΟϯάɺΞΫηε੍ޚͳͲΛͤΒΕΔ • ׂͷղͨ͠ΠϯϑϥߏɺαʔϏεઃܭ͕ՄೳʹͳΔͣ • ཁ͢ΔʹϛυϧΣΞΛͬͱ׆༻Ͱ͖Δ
ྫ • OpenRestyͱRedis https://qiita.com/voluntas/items/ b37aedc70058c519aa00 • td-agent BigQuery https://github.com/kaizenplatform/fluent-plugin- bigquery
O p e n R e s t y Λ
ͬ ͨ Π ϯ ϑ ϥ ߏ ྫ HTTP server OpenResty Application Server ೝূ ϧʔςΟϯά ۀϩδοΫA ۀϩδοΫB ۀϩδοΫC ೝূ ϧʔςΟϯά ۀϩδοΫA ۀϩδοΫC ۀϩδοΫB
ϛ υϧ Σ Ξ Λ ڧ ͘ ͢ Δ
ྑ ͞ • HTTP headerͷՃͳͲOpenRestyʹ·͔ͤΒΕΔ • OpenRestyԼͷαʔόʔಛఆͷۀϩδοΫ͚ͩʹઐ೦Ͱ͖Δ • APIίʔϧʹԠͨ͡ॲཧͳͲهड़Ͱ͖ɺϚΠΫϩαʔϏεԽ͘͢͠ͳΔ
A P I α ʔ Ϗ εΠ ϯ ϑ ϥ
ߏ ֓ ཁ API Clientʹରͯ͠෦ɼ֎෦ͷϧʔςΟϯάΛߦ͏αʔόʔʢAPIϧʔςΟϯάαʔόʔʣΛલ ஈʹஔΛߦ͏ɻ֎෦APIͷΞΫηεͷࡍʹɺAPIϧʔςΟϯάαʔόʔ͕APIΞΫηεೝ ূΛߦ͍ɺAPI ServerଓΛ͢Δɻ
A P I όʔ δϣ ϯ Ճ ࣌ ͷ
ߏ API όʔδϣϯՃͷࡍʹɺAPIϧʔςΟϯάαʔόʔɺదͳAPI ServerଓΛ͢Δ Α͏ʹ੍ޚ͢Δ
ৄ ͠ ͘