Pro Yearly is on sale from $80 to $50! »

WebSocket はどれくらい通じるのかの統計 / websocket-connectivity-survey

WebSocket はどれくらい通じるのかの統計 / websocket-connectivity-survey

Cc81dc2acad7b0d070a2f2d3f10eef7d?s=128

Tsukuru Tanimichi

May 18, 2017
Tweet

Transcript

  1. WebSocket ͸ͲΕ͘Β͍ ௨͡Δͷ͔ͷ౷ܭ © Tsukuru Tanimichi (@ttanimichi), 2017 1

  2. TL;DR • Jxck ͞Μͷϒϩά • Socket.IO ͸ඞཁ͔?ʯ·ͨ͸ʮWebSocket ͸௨ Δͷ͔?ʯ໰୊ʹ͍ͭͯ 2016

    ೥൛ • ੜͷ WebSocket ͸ͲΕ͘Β͍௨͡Δͷ͔ • production Ͱ౷ܭΛग़ͨ͠ͷͰ݁ՌΛڞ༗͠·͢ © Tsukuru Tanimichi (@ttanimichi), 2017 2
  3. TL;DR • ౷ܭΛग़ͨ݁͠Ռɺ • 0.1 %͘Β͍͕௨͡ͳ͍ • ڐ༰Ͱ͖Δཁ݅ͳΒੜͷ wss Ͱྑ͍͔΋

    • ActionCable Λ࢖͏ਓ͸ཹҙ͠·͠ΐ͏Ͷ © Tsukuru Tanimichi (@ttanimichi), 2017 3
  4. WebSocket ͬͯ IE11 Ҏ߱ͳΒ ࢖͑ΔΜ͡Όͳ͔͚ͬͨͬʁ © Tsukuru Tanimichi (@ttanimichi), 2017

    4
  5. ωοτϫʔΫͷ໰୊Ͱ௨͡ͳ͍ • Connection: Upgrade ϔομͰ઀ଓΛམͱ͢ Proxy ΍ LB ΍ Firewall

    • ௕࣌ؒ઀ଓ͞Ε͍ͯΔ TCP ίωΫγϣϯΛམͱ͢ ύʔιφϧϑΝΠΞ΢Υʔϧ ৄ͘͠͸ Jxck ͞ΜͷϒϩάΛಡΜͰ͍ͩ͘͞ https://blog.jxck.io/entries/2016-08-22/websocket- connectivity.html © Tsukuru Tanimichi (@ttanimichi), 2017 5
  6. ߏ੒ͱௐࠪํ๏ • Socket.IO (Node.js) • WebSocket ͕௨͡Ε͹ WebSocket (wss) •

    ௨͡ͳ͚Ε͹ HTTP (polling) ʹϑΥʔϧόοΫ • ΫϥΠΞϯτ͔ΒͷϝοηʔδΛड৴ͨ࣌͠ʹ WebSocket Ͱ௨৴͍ͯ͠Δ͔ɺͦΕͱ΋ HTTP Ͱ ϑΥʔϧόοΫ͍ͯ͠Δͷ͔ϩάʹు͍ͨ © Tsukuru Tanimichi (@ttanimichi), 2017 6
  7. ߏ੒ͱௐࠪํ๏ • ͜ͷൃදͰ͸ɺΫϥΠΞϯτ͕ WebSocket ʹରԠ ͍ͯ͠ͳ͍৔߹͸ର৅ͱ͠·ͤΜ • εϚϗͷωΠςΟϒΞϓϦͰɺsocket.io-client Λ ࢖͍·ͨ͠

    • ϥΠϒϥϦΛ࢖͍ͬͯΔͷͰΫϥΠΞϯτ͸ WebSocket Λඞͣ࢖͑Δ © Tsukuru Tanimichi (@ttanimichi), 2017 7
  8. ౷ܭ݁Ռ transport count websocket 106,592 polling 112 ໿ 0.1 %

    ͕ HTTP (polling) ʹϑΥʔϧόοΫ © Tsukuru Tanimichi (@ttanimichi), 2017 8
  9. མͪͯͨ connection ͷ ISP © Tsukuru Tanimichi (@ttanimichi), 2017 9

  10. ·ͱΊ • ΋͠ HTTP ͰϑΥʔϧόοΫͯ͠ͳ͔ͬͨΒ 0.1 % ͕ ܨ͕Βͳ͍ •

    ΆͭΆͭαϙʔτʹ໰͍߹Θͤͱ͔དྷͦ͏ • ActionCable ʹϑΥʔϧόοΫ௥Ճͯ͘͠ΕΔ gem ͱ͔ͳ͍ΜͰ͔͢Ͷ © Tsukuru Tanimichi (@ttanimichi), 2017 10
  11. ͝ਗ਼ௌ͋Γ͕ͱ͏͍͟͝·ͨ͠ © Tsukuru Tanimichi (@ttanimichi), 2017 11