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
1.1k
マネーフォワードにおけるウェブメディア高速化の取り組み / yamagoya2018
ttanimichi
7
2.3k
大規模 Padrino アプリケーション Rails 移行 / Migrating to Rails from Padrino
ttanimichi
0
13k
共通基盤システムの開発について
ttanimichi
5
13k
Other Decks in Technology
See All in Technology
社内イベント管理システムを1週間でAKSからACAに移行した話し
shingo_kawahara
0
190
普通のエンジニアがLaravelコアチームメンバーになるまで
avosalmon
0
110
非機能品質を作り込むための実践アーキテクチャ
knih
5
1.5k
NilAway による静的解析で「10 億ドル」を節約する #kyotogo / Kyoto Go 56th
ytaka23
3
380
pg_bigmをRustで実装する(第50回PostgreSQLアンカンファレンス@オンライン 発表資料)
shinyakato_
0
100
NW-JAWS #14 re:Invent 2024(予選落ち含)で 発表された推しアップデートについて
nagisa53
0
270
alecthomas/kong はいいぞ / kamakura.go#7
fujiwara3
1
300
re:Invent をおうちで楽しんでみた ~CloudWatch のオブザーバビリティ機能がスゴい!/ Enjoyed AWS re:Invent from Home and CloudWatch Observability Feature is Amazing!
yuj1osm
0
130
KubeCon NA 2024 Recap / Running WebAssembly (Wasm) Workloads Side-by-Side with Container Workloads
z63d
1
250
なぜCodeceptJSを選んだか
goataka
0
160
ハイテク休憩
sat
PRO
2
170
20241220_S3 tablesの使い方を検証してみた
handy
4
640
Featured
See All Featured
実際に使うSQLの書き方 徹底解説 / pgcon21j-tutorial
soudai
169
50k
Fight the Zombie Pattern Library - RWD Summit 2016
marcelosomers
232
17k
Become a Pro
speakerdeck
PRO
26
5k
Six Lessons from altMBA
skipperchong
27
3.5k
[Rails World 2023 - Day 1 Closing Keynote] - The Magic of Rails
eileencodes
33
2k
BBQ
matthewcrist
85
9.4k
Facilitating Awesome Meetings
lara
50
6.1k
Visualizing Your Data: Incorporating Mongo into Loggly Infrastructure
mongodb
44
9.3k
Gamification - CAS2011
davidbonilla
80
5.1k
jQuery: Nuts, Bolts and Bling
dougneiner
61
7.5k
KATA
mclloyd
29
14k
Thoughts on Productivity
jonyablonski
67
4.4k
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