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
WebSocket はどれくらい通じるのかの統計 / websocket-connectivi...
Search
Tsukuru Tanimichi
May 18, 2017
Technology
0
540
WebSocket はどれくらい通じるのかの統計 / websocket-connectivity-survey
Tsukuru Tanimichi
May 18, 2017
Tweet
Share
More Decks by Tsukuru Tanimichi
See All by Tsukuru Tanimichi
react-rails で SPA, SSR を実現する / react-rails-spa-ssr
ttanimichi
2
1k
マネーフォワードにおけるウェブメディア高速化の取り組み / yamagoya2018
ttanimichi
7
2.2k
大規模 Padrino アプリケーション Rails 移行 / Migrating to Rails from Padrino
ttanimichi
0
12k
共通基盤システムの開発について
ttanimichi
5
13k
Other Decks in Technology
See All in Technology
Assisted reorganization of data structures
ennael
PRO
0
270
Graph Database と Generative AI の素敵な関係
oracle4engineer
PRO
7
1k
とある事業会社にとっての Kaggler の魅力
hakubishin3
5
860
ファインディにおけるフロントエンド技術選定の歴史
puku0x
1
100
LINEヤフー新卒採用 コーディングテスト解説 アルゴリズム問題編
lycorp_recruit_jp
0
13k
Low Latency Join Method for Distributed DBMS
yugabytejapan
0
180
入門 バックアップ
ryuichi1208
18
7k
受託開発でもアジャイル開発できました / Agile in Contract Development
takaking22
9
4.6k
RAG: from dumb implementation to serious results
glaforge
0
150
Oracle Database 23ai 新機能#4 Rolling Maintenance
oracle4engineer
PRO
0
140
Road to Single Activity Uncovered
yurihondo
0
100
YAPC::Hakodateの映像記録を支える技術
godan
4
370
Featured
See All Featured
How to Ace a Technical Interview
jacobian
275
23k
Why You Should Never Use an ORM
jnunemaker
PRO
53
9k
Documentation Writing (for coders)
carmenintech
65
4.4k
Designing the Hi-DPI Web
ddemaree
280
34k
jQuery: Nuts, Bolts and Bling
dougneiner
61
7.5k
Creating an realtime collaboration tool: Agile Flush - .NET Oxford
marcduiker
25
1.7k
Fashionably flexible responsive web design (full day workshop)
malarkey
404
65k
Making the Leap to Tech Lead
cromwellryan
131
8.9k
Embracing the Ebb and Flow
colly
84
4.4k
Fireside Chat
paigeccino
32
3k
How to name files
jennybc
77
99k
A Modern Web Designer's Workflow
chriscoyier
692
190k
Transcript
WebSocket ͲΕ͘Β͍ ௨͡Δͷ͔ͷ౷ܭ © Tsukuru Tanimichi (@ttanimichi), 2017 1
TL;DR • Jxck ͞Μͷϒϩά • Socket.IO ඞཁ͔?ʯ·ͨʮWebSocket ௨ Δͷ͔?ʯʹ͍ͭͯ 2016
൛ • ੜͷ WebSocket ͲΕ͘Β͍௨͡Δͷ͔ • production Ͱ౷ܭΛग़ͨ͠ͷͰ݁ՌΛڞ༗͠·͢ © Tsukuru Tanimichi (@ttanimichi), 2017 2
TL;DR • ౷ܭΛग़ͨ݁͠Ռɺ • 0.1 %͘Β͍͕௨͡ͳ͍ • ڐ༰Ͱ͖Δཁ݅ͳΒੜͷ wss Ͱྑ͍͔
• ActionCable Λ͏ਓཹҙ͠·͠ΐ͏Ͷ © Tsukuru Tanimichi (@ttanimichi), 2017 3
WebSocket ͬͯ IE11 Ҏ߱ͳΒ ͑ΔΜ͡Όͳ͔͚ͬͨͬʁ © Tsukuru Tanimichi (@ttanimichi), 2017
4
ωοτϫʔΫͷͰ௨͡ͳ͍ • Connection: Upgrade ϔομͰଓΛམͱ͢ Proxy LB Firewall
• ࣌ؒଓ͞Ε͍ͯΔ TCP ίωΫγϣϯΛམͱ͢ ύʔιφϧϑΝΠΞΥʔϧ ৄ͘͠ Jxck ͞ΜͷϒϩάΛಡΜͰ͍ͩ͘͞ https://blog.jxck.io/entries/2016-08-22/websocket- connectivity.html © Tsukuru Tanimichi (@ttanimichi), 2017 5
ߏͱௐࠪํ๏ • Socket.IO (Node.js) • WebSocket ͕௨͡Ε WebSocket (wss) •
௨͡ͳ͚Ε HTTP (polling) ʹϑΥʔϧόοΫ • ΫϥΠΞϯτ͔ΒͷϝοηʔδΛड৴ͨ࣌͠ʹ WebSocket Ͱ௨৴͍ͯ͠Δ͔ɺͦΕͱ HTTP Ͱ ϑΥʔϧόοΫ͍ͯ͠Δͷ͔ϩάʹు͍ͨ © Tsukuru Tanimichi (@ttanimichi), 2017 6
ߏͱௐࠪํ๏ • ͜ͷൃදͰɺΫϥΠΞϯτ͕ WebSocket ʹରԠ ͍ͯ͠ͳ͍߹ରͱ͠·ͤΜ • εϚϗͷωΠςΟϒΞϓϦͰɺsocket.io-client Λ ͍·ͨ͠
• ϥΠϒϥϦΛ͍ͬͯΔͷͰΫϥΠΞϯτ WebSocket Λඞͣ͑Δ © Tsukuru Tanimichi (@ttanimichi), 2017 7
౷ܭ݁Ռ transport count websocket 106,592 polling 112 0.1 %
͕ HTTP (polling) ʹϑΥʔϧόοΫ © Tsukuru Tanimichi (@ttanimichi), 2017 8
མͪͯͨ connection ͷ ISP © Tsukuru Tanimichi (@ttanimichi), 2017 9
·ͱΊ • ͠ HTTP ͰϑΥʔϧόοΫͯ͠ͳ͔ͬͨΒ 0.1 % ͕ ܨ͕Βͳ͍ •
ΆͭΆͭαϙʔτʹ͍߹Θͤͱ͔དྷͦ͏ • ActionCable ʹϑΥʔϧόοΫՃͯ͘͠ΕΔ gem ͱ͔ͳ͍ΜͰ͔͢Ͷ © Tsukuru Tanimichi (@ttanimichi), 2017 10
͝ਗ਼ௌ͋Γ͕ͱ͏͍͟͝·ͨ͠ © Tsukuru Tanimichi (@ttanimichi), 2017 11