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
ActionCable(Rails5) + Application Load Balancer...
Search
sutetotanuki
August 31, 2016
Programming
0
1.1k
ActionCable(Rails5) + Application Load BalancerでWebSocketをバランシング!
ActionCable(Rails5) + Application Load BalancerでWebSocketをバランシング!
sutetotanuki
August 31, 2016
Tweet
Share
More Decks by sutetotanuki
See All by sutetotanuki
Vercel AI SDK を使って Next.js で AIアプリケーションを 作成する方法のご紹介
sutetotanuki
0
940
WEBエンジニア向けAI活用入門
sutetotanuki
0
580
ブラウザ上で実行され、 AIアシスタント付きデータベース postgres.new を触ってみた
sutetotanuki
0
260
今時のCookie事情
sutetotanuki
0
520
高速案件立ち上げで使われるマッハテンプレートのフロントエンド技術選定
sutetotanuki
2
1.6k
Core Web Vitals を改善する Next.js の機能群
sutetotanuki
1
2.2k
サーバーレスRDBの選択肢
sutetotanuki
0
1.3k
今日から始めるAmplify DataStore
sutetotanuki
0
1.2k
Kotlin Coroutine 基本的な使い方
sutetotanuki
0
730
Other Decks in Programming
See All in Programming
The Evolution of the CRuby Build System
kateinoigakukun
0
710
Fiber Scheduler vs. General-Purpose Parallel Client
hayaokimura
1
100
PHPで書いたAPIをGoに書き換えてみた 〜パフォーマンス改善の可能性を探る実験レポート〜
koguuum
0
160
Make Parsers Compatible Using Automata Learning
makenowjust
1
4.9k
State of Namespace
tagomoris
4
1.7k
Vibe Codingをせずに Clineを使っている
watany
17
6.3k
大LLM時代にこの先生きのこるには-ITエンジニア編
fumiyakume
7
3k
PHP で学ぶ OAuth 入門
azuki
1
200
複雑なフォームの jotai 設計 / Designing jotai(state) for Complex Forms #layerx_frontend
izumin5210
4
990
[NG India] Event-Based State Management with NgRx SignalStore
markostanimirovic
1
160
AWSで雰囲気でつくる! VRChatの写真変換ピタゴラスイッチ
anatofuz
0
160
監視 やばい
syossan27
7
6.3k
Featured
See All Featured
Measuring & Analyzing Core Web Vitals
bluesmoon
7
390
Helping Users Find Their Own Way: Creating Modern Search Experiences
danielanewman
29
2.5k
CoffeeScript is Beautiful & I Never Want to Write Plain JavaScript Again
sstephenson
160
15k
Designing Experiences People Love
moore
141
24k
Into the Great Unknown - MozCon
thekraken
37
1.7k
Keith and Marios Guide to Fast Websites
keithpitt
411
22k
RailsConf 2023
tenderlove
30
1.1k
Writing Fast Ruby
sferik
628
61k
GitHub's CSS Performance
jonrohan
1030
460k
The Psychology of Web Performance [Beyond Tellerrand 2023]
tammyeverts
47
2.5k
Typedesign – Prime Four
hannesfritz
41
2.6k
Stop Working from a Prison Cell
hatefulcrawdad
268
20k
Transcript
"DUJPO$BCMF "-#Ͱόϥϯγϯά
ࣗݾհ αʔόʔαΠυΤϯδχΞ ओʹ3BJMT Ϋϥεϝιουઌ݄ೖࣾ ݱࡏ།ҰͷେࡕۈϞόΠϧόοΫΤϯυάϧʔϓ ऐ͍͠ ઌʑिʹୈೋࢠ͕ੜ·Ε·ͨ͠
ࣗݾհ "84ษڧதʂ ͳͷͰͦͷลԹ͔͍ͰݟͯΒ͑Δͱɹ
͋ͬɺ͋ͱ࠷ۙ͜ΕʹϋϚΓ·ͨ͠
"DUJPO$BCMF "-#ͰόϥϯγϯάΛͬͯΈ·ͨ͠
"DUJPO$BCMFΞʔΩςΫνϟ
4PDLFUͷऔΓѻ͍
3BDLIJKBDLJOH"1*Λར༻͠ 4PDLFUΛ3BDL͔Βड͚औΓ "DUJPO$BCMFͰར༻͢Δ&WFOU-PPQʹొ͢Δ 3BDL "DUJPO$BCMF &WFOU-PPQ *0ΦϒδΣΫτ TPDLFU
ͦ͏͢Δ͜ͱͰ3BDLͷ ௨ৗΞϓϦέʔγϣϯͷॲཧͱ 8FC4PDLFUͷॲཧ͕ಉډͰ͖Δ
ϝοηʔδ৴
αʔόʔͷߏཁૉ 4VCTDSJCFS αʔόʔ 1VCMJTIFS αʔόʔ 1VC4VCαʔόʔ
ϢχΩϟετ class ChatChannel < ApplicationCable::Channel def some_method transmit(action: 'info', message:
"message") end end
1VC4VCαʔόʔ
1VC4VCαʔόʔ
1VC4VCαʔόʔ
ϒϩʔυΩϟετ ActionCable.server.broadcast "chat", "message"
1VC4VCαʔόʔ
1VC4VCαʔόʔ
1VC4VCαʔόʔ
1VC4VCαʔόʔ
1VC4VCαʔόʔ
"DUJPO$BCMFσϑΥϧτͰ1VC4VCͳͷͰ ԣʹฒͯσϒϩΠ͢Δ͚ͩͰ͋Δఔεέʔϧ͍ͯ͘͠
1VC4VCαʔόʔ 3FEJTɺ1PTUHSFTRM͔Β બՄೳ DPOpHDBCMFZNM production: adapter: postgresql(redis)
ࠓճͬͯΈͨܥͳͷͰ͓खܰ͞༏ઌͰ 3BJMTຊମ͕͏1PTUHSFTRM 3%4 Λ 1VC4VCαʔόʔͱͯ͠༻
"QQMJDBUJPO-PBE#BMBODFS
None
8FC4PDLFUΛ͏ʹ͋ͨͬͯ $MBTTJD&-#ͰͰ͖ͳͯ͘ɺ"-#ͰͰ͖Δ͜ͱ
Request: Connection: Upgrade Response Upgrade: websocket &-7W $MBTTJDͰ8FC4PDLFUͷ6QHSBEFʹ ඞཁͳϔομΛૹΔ͜ͱ͕Ͱ͖ͳ͔ͬͨ
&-7W ඵ σϑΥϧτ ແ௨৴͕ଓ͘ͱ λΠϜΞτ͞Εͨ
"-#Ͱ͜ΕΒͷ͕ղফ͞Ε ͙͢ʹ8FC4PDLFUΛ͏͜ͱ͕Ͱ͖Δ
"-#Ͱ-ʹରԠ͠ 8FC4PDLFUαʔόʔͱ ී௨ͷ8FCαʔόʔͱ1BUIͳͲͰ؆୯ʹ ৼΓ͚ΕΔΑ͏ʹͳͬͨ /html/* /socket/*
"-# "DUJPO$BCMFͳΒ ී௨ʹσϓϩΠͯ͠ԣʹฒΔ͚ͩͰ ͱΓ͋͑ͣόϥϯε͢Δʂ
%&.0 ͕࣌ؒ͋Ε
%&.0ͷߏ 8FC4PDLFU༻ͷΠϯελϯε )5.-Λฦ͢Πϯελϯε DBCMF ͦΕҎ֎ɹ
8F"SF)JSJOH େࡕࣄॴͰҰॹʹಇ͖·ͤΜ͔ʂʂ
͝ਗ਼ௌ͋Γ͕ͱ͏͍͟͝·ͨ͠