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.3k
大規模 Padrino アプリケーション Rails 移行 / Migrating to Rails from Padrino
ttanimichi
0
13k
共通基盤システムの開発について
ttanimichi
5
13k
Other Decks in Technology
See All in Technology
組織に自動テストを書く文化を根付かせる戦略(2024冬版) / Building Automated Test Culture 2024 Winter Edition
twada
PRO
8
3.2k
非機能品質を作り込むための実践アーキテクチャ
knih
2
630
AWS re:Invent 2024 ふりかえり
kongmingstrap
0
130
Microsoft Azure全冠になってみた ~アレを使い倒した者が試験を制す!?~/Obtained all Microsoft Azure certifications Those who use "that" to the full will win the exam! ?
yuj1osm
1
110
Postman と API セキュリティ / Postman and API Security
yokawasa
0
200
[Ruby] Develop a Morse Code Learning Gem & Beep from Strings
oguressive
1
150
Amazon Kendra GenAI Index 登場でどう変わる? 評価から学ぶ最適なRAG構成
naoki_0531
0
100
Amazon VPC Lattice 最新アップデート紹介 - PrivateLink も似たようなアップデートあったけど違いとは
bigmuramura
0
190
宇宙ベンチャーにおける最近の情シス取り組みについて
axelmizu
0
110
継続的にアウトカムを生み出し ビジネスにつなげる、 戦略と運営に対するタイミーのQUEST(探求)
zigorou
0
500
2024年にチャレンジしたことを振り返るぞ
mitchan
0
130
ハイテク休憩
sat
PRO
2
120
Featured
See All Featured
StorybookのUI Testing Handbookを読んだ
zakiyama
27
5.3k
Sharpening the Axe: The Primacy of Toolmaking
bcantrill
38
1.9k
How to train your dragon (web standard)
notwaldorf
88
5.7k
Visualizing Your Data: Incorporating Mongo into Loggly Infrastructure
mongodb
44
9.3k
Dealing with People You Can't Stand - Big Design 2015
cassininazir
365
25k
VelocityConf: Rendering Performance Case Studies
addyosmani
326
24k
How to Think Like a Performance Engineer
csswizardry
22
1.2k
Fight the Zombie Pattern Library - RWD Summit 2016
marcelosomers
232
17k
Scaling GitHub
holman
458
140k
Thoughts on Productivity
jonyablonski
67
4.4k
Building Applications with DynamoDB
mza
91
6.1k
GitHub's CSS Performance
jonrohan
1030
460k
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