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
Creating Intuitive Developer Tool in Swift
giginet
PRO
0
500
Emacs x Nostr
hakkadaikon
1
120
LLMアプリをRagasで評価して、Langfuseで可視化しよう!
minorun365
PRO
2
210
で、ValhallaのValue Classってどうなったの?
skrb
1
500
LLMOps : ΔMLOps
shuntaito
14
2.9k
WebRTC と AI の組み合わせ
tnoho
0
460
バイセルにおけるAI活用の取り組みについて紹介します/Generative AI at BuySell Technologies
kyuns
1
180
とあるユーザー企業におけるリスクベースで考えるセキュリティ業務のお話し
4su_para
0
160
SwiftSyntaxでUIKitとSwiftUIの使用率を完璧に計測できちゃう件について
ldf_tech
0
160
内製化によるシステムモダナイゼーションの実践
kazokmr
3
520
pandasはPolarsに性能面で追いつき追い越せるのか
vaaaaanquish
1
210
現実のRuby/Railsアップグレード
takeyuweb
3
2.9k
Featured
See All Featured
Learning to Love Humans: Emotional Interface Design
aarron
272
40k
Fight the Zombie Pattern Library - RWD Summit 2016
marcelosomers
231
17k
Design and Strategy: How to Deal with People Who Don’t "Get" Design
morganepeng
126
18k
How to Create Impact in a Changing Tech Landscape [PerfNow 2023]
tammyeverts
46
2.1k
The Invisible Side of Design
smashingmag
297
50k
Fontdeck: Realign not Redesign
paulrobertlloyd
81
5.2k
Optimizing for Happiness
mojombo
376
69k
Typedesign – Prime Four
hannesfritz
39
2.4k
Designing Dashboards & Data Visualisations in Web Apps
destraynor
228
52k
Put a Button on it: Removing Barriers to Going Fast.
kastner
59
3.5k
A Modern Web Designer's Workflow
chriscoyier
692
190k
The Pragmatic Product Professional
lauravandoore
31
6.3k
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