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
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
620
WEBエンジニア向けAI活用入門
sutetotanuki
0
500
ブラウザ上で実行され、 AIアシスタント付きデータベース postgres.new を触ってみた
sutetotanuki
0
210
今時のCookie事情
sutetotanuki
0
470
高速案件立ち上げで使われるマッハテンプレートのフロントエンド技術選定
sutetotanuki
2
1.5k
Core Web Vitals を改善する Next.js の機能群
sutetotanuki
1
2.1k
サーバーレスRDBの選択肢
sutetotanuki
0
1.3k
今日から始めるAmplify DataStore
sutetotanuki
0
1.2k
Kotlin Coroutine 基本的な使い方
sutetotanuki
0
700
Other Decks in Programming
See All in Programming
仕様変更に耐えるための"今の"DRY原則を考える / Rethinking the "Don't repeat yourself" for resilience to specification changes
mkmk884
0
160
Flutter × Firebase Genkit で加速する生成 AI アプリ開発
coborinai
0
160
なぜイベント駆動が必要なのか - CQRS/ESで解く複雑系システムの課題 -
j5ik2o
10
3.6k
コミュニティ駆動 AWS CDK ライブラリ「Open Constructs Library」 / community-cdk-library
gotok365
2
120
負債になりにくいCSSをデザイナとつくるには?
fsubal
9
2.4k
昭和の職場からアジャイルの世界へ
kumagoro95
1
380
ソフトウェアエンジニアの成長
masuda220
PRO
10
1.1k
データベースのオペレーターであるCloudNativePGがStatefulSetを使わない理由に迫る
nnaka2992
0
150
CI改善もDatadogとともに
taumu
0
120
Multi Step Form, Decentralized Autonomous Organization
pumpkiinbell
1
740
責務と認知負荷を整える! 抽象レベルを意識した関心の分離
yahiru
2
410
Kubernetes History Inspector(KHI)を触ってみた
bells17
0
230
Featured
See All Featured
The Language of Interfaces
destraynor
156
24k
Sharpening the Axe: The Primacy of Toolmaking
bcantrill
40
2k
The Art of Delivering Value - GDevCon NA Keynote
reverentgeek
10
1.3k
RailsConf & Balkan Ruby 2019: The Past, Present, and Future of Rails at GitHub
eileencodes
133
33k
The Illustrated Children's Guide to Kubernetes
chrisshort
48
49k
Testing 201, or: Great Expectations
jmmastey
42
7.2k
GraphQLの誤解/rethinking-graphql
sonatard
68
10k
[Rails World 2023 - Day 1 Closing Keynote] - The Magic of Rails
eileencodes
33
2.1k
The World Runs on Bad Software
bkeepers
PRO
67
11k
Distributed Sagas: A Protocol for Coordinating Microservices
caitiem20
330
21k
Typedesign – Prime Four
hannesfritz
40
2.5k
A Tale of Four Properties
chriscoyier
158
23k
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 େࡕࣄॴͰҰॹʹಇ͖·ͤΜ͔ʂʂ
͝ਗ਼ௌ͋Γ͕ͱ͏͍͟͝·ͨ͠