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
550
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
"とにかくやってみる"で始めるAWS Security Hub
maimyyym
2
100
【Startup CTO of the Year 2024 / Audience Award】アセンド取締役CTO 丹羽健
niwatakeru
0
1.4k
あなたの知らない Function.prototype.toString() の世界
mizdra
PRO
2
360
生成AIが変えるデータ分析の全体像
ishikawa_satoru
0
170
TypeScript、上達の瞬間
sadnessojisan
47
14k
CDCL による厳密解法を採用した MILP ソルバー
imai448
3
180
開発生産性を上げながらビジネスも30倍成長させてきたチームの姿
kamina_zzz
2
1.7k
SREが投資するAIOps ~ペアーズにおけるLLM for Developerへの取り組み~
takumiogawa
2
480
Exadata Database Service on Dedicated Infrastructure(ExaDB-D) UI スクリーン・キャプチャ集
oracle4engineer
PRO
2
3.2k
アジャイルでの品質の進化 Agile in Motion vol.1/20241118 Hiroyuki Sato
shift_evolve
0
180
New Relicを活用したSREの最初のステップ / NRUG OKINAWA VOL.3
isaoshimizu
3
640
TanStack Routerに移行するのかい しないのかい、どっちなんだい! / Are you going to migrate to TanStack Router or not? Which one is it?
kaminashi
0
600
Featured
See All Featured
Product Roadmaps are Hard
iamctodd
PRO
49
11k
Stop Working from a Prison Cell
hatefulcrawdad
267
20k
Designing the Hi-DPI Web
ddemaree
280
34k
Bootstrapping a Software Product
garrettdimon
PRO
305
110k
Practical Tips for Bootstrapping Information Extraction Pipelines
honnibal
PRO
10
720
Done Done
chrislema
181
16k
Optimizing for Happiness
mojombo
376
70k
The Art of Delivering Value - GDevCon NA Keynote
reverentgeek
8
900
CSS Pre-Processors: Stylus, Less & Sass
bermonpainter
356
29k
Site-Speed That Sticks
csswizardry
0
33
Happy Clients
brianwarren
98
6.7k
Sharpening the Axe: The Primacy of Toolmaking
bcantrill
38
1.8k
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