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
About Rails ConnectionPool
Search
Takahiro Uchiyama
July 22, 2020
Technology
0
170
About Rails ConnectionPool
Quipper社内の「ゆるいRuby LT会 Vol.1」でやった資料です。
Takahiro Uchiyama
July 22, 2020
Tweet
Share
More Decks by Takahiro Uchiyama
See All by Takahiro Uchiyama
日々の意思決定の積み重ねを記録するアーキテクチャ・デシジョン・レコード / Architectural Decision Records
highwide
24
17k
停止性問題と数 / Halting problem and number
highwide
0
980
GraphQLスキーマ設計の悩みどころ/My concerns about GraphQL schema design
highwide
0
1.5k
How about today's coffee?
highwide
0
460
How to choose "best of the best"
highwide
1
650
A question about private method testing
highwide
0
3.3k
A life-changing innovation for my work-style by IoT
highwide
0
640
a-code-to-rhyme
highwide
3
600
よちがや.rb案内スライド
highwide
1
570
Other Decks in Technology
See All in Technology
第3回Snowflake女子会_LT登壇資料(合成データ)_Taro_CCCMK
tarotaro0129
0
180
あの日俺達が夢見たサーバレスアーキテクチャ/the-serverless-architecture-we-dreamed-of
tomoki10
0
430
20241220_S3 tablesの使い方を検証してみた
handy
3
370
Fanstaの1年を大解剖! 一人SREはどこまでできるのか!?
syossan27
2
160
OpenAIの蒸留機能(Model Distillation)を使用して運用中のLLMのコストを削減する取り組み
pharma_x_tech
4
550
KnowledgeBaseDocuments APIでベクトルインデックス管理を自動化する
iidaxs
1
260
Microsoft Azure全冠になってみた ~アレを使い倒した者が試験を制す!?~/Obtained all Microsoft Azure certifications Those who use "that" to the full will win the exam! ?
yuj1osm
2
110
継続的にアウトカムを生み出し ビジネスにつなげる、 戦略と運営に対するタイミーのQUEST(探求)
zigorou
0
530
Jetpack Composeで始めるServer Cache State
ogaclejapan
2
170
5分でわかるDuckDB
chanyou0311
10
3.2k
.NET 9 のパフォーマンス改善
nenonaninu
0
810
alecthomas/kong はいいぞ / kamakura.go#7
fujiwara3
1
300
Featured
See All Featured
Gamification - CAS2011
davidbonilla
80
5.1k
YesSQL, Process and Tooling at Scale
rocio
169
14k
For a Future-Friendly Web
brad_frost
175
9.4k
[Rails World 2023 - Day 1 Closing Keynote] - The Magic of Rails
eileencodes
33
1.9k
Fight the Zombie Pattern Library - RWD Summit 2016
marcelosomers
232
17k
Being A Developer After 40
akosma
87
590k
GraphQLとの向き合い方2022年版
quramy
44
13k
Producing Creativity
orderedlist
PRO
341
39k
I Don’t Have Time: Getting Over the Fear to Launch Your Podcast
jcasabona
29
2k
Creating an realtime collaboration tool: Agile Flush - .NET Oxford
marcduiker
26
1.9k
Principles of Awesome APIs and How to Build Them.
keavy
126
17k
How to train your dragon (web standard)
notwaldorf
88
5.7k
Transcript
Նͩʂ ϓʔϧͩʂ 3VCZͰ-5ͩʂʂʂ Նͩʂ ϓʔϧͩʂ 3VCZͰ-5ͩʂʂʂ 2VJQQFSࣾΏΔ͍3VCZ-5ձ7PM !IJHIXJEF
ίωΫγϣϯ ϓʔϧͷ ࣮ΛͬͯΈͨ ίωΫγϣϯ ϓʔϧͷ ࣮ΛͬͯΈͨ 2VJQQFSࣾΏΔ͍3VCZ-5ձ7PM !IJHIXJEF ͱ͍͏Θ͚Ͱ
"CPVUNF BOEUPEBZTUIFNF ✴ ݄2VJQQFSʹKPJO ✴ ίʔνϯάνʔϜͰ8FC։ൃΛ͍ͬͯΔ ✴ ͜ͳ͍ͩͷVKJIJTBษڧձͰͷGPSLUISFBEͷઆ໌͕େมΘ͔Γ͔ͬͨ͢ͷͰɺۀʹͭͳ͕ ΔܗͰ͏গ͠۷ΓԼ͛ͯΈ͍ͨͱࢥͬͨ ✴
✴ 3BJMTͷ$POOFDUJPO1PPM5ISFBEͱ͕ؔ͋Δͱ͍͏ͳΜͱͳ͘ฉ͍ͨ͜ͱ͕͋Γɺ͜ ΕΛ۷ΓԼ͛Δͷʮࣗʹͱͬͯ৽نੑʯ͕͋Γͦ͏
ͱ͍͏͍ܰؾ࣋ͪͰ࢝ΊͨΒ ऩर͕͔ͭͳ͘ͳͬͨͷͰ ੜஆ͔͍ͰݟकͬͯΒ͑Δͱ͏Ε͍͠Ͱ͢ ˞͜ͷϖʔδൃදલʹͲ͏͢Μͩ͜Εͬͯؾ࣋ͪʹͳͬͯՃ͠·ͨ͠
Foo.find(1) ௐࠪΛελʔτ͢Δ্Ͱͷ࠷ॳͷϞνϕʔγϣϯ ࠓ3BJMTͷ͜ͷཪଆͰ ίωΫγϣϯ͕Ͳ͏ΘΕ͍͔ͯ͘ίʔυΛ͍ͬͯͧ͘ʂ
ͱ͜Ζ͕ʮ'PPGJOEʯͰίωΫγϣϯϓʔϧ͕ Ͳ͏ΘΕΔ͔ݟΔલʹ 3BJMTΛىಈͨ͠ͱ͜Ζ͔Β͍ͬͯ͘ඞཁ͕͋Δͱɺ ࠓճֶΜͰ͍ͯΘ͔ͬͨɻ
SBJMTىಈ࣌ʹBDUJWFSFDPSESBJMUJF͕SFRVJSF͞ΕΔ IUUQTSBJMTHVJEFTKQJOJUJBMJ[BUJPOIUNM
BDUJWFSFDPSEMJCBDUJWF@SFDPSEDPOOFDUJPO@IBOEMJOHSC DPOGJHͷಡΈࠐΈׂѪɻ
BDUJWFSFDPSEMJCBDUJWF@SFDPSESBJMUJFSC ·ͣ͜͜ͰFTUBCMJTI@DPOOFDUJPO͕ݺΕΔɻ
BDUJWFSFDPSEMJCBDUJWF@SFDPSEDPOOFDUJPO@IBOEMJOHSC ͜͜ͷFTUBCMJTI@DPOOFDUJPO͕ݺΕΔɻ
DPOOFDUJPOͷઃఆΛಡΈࠐΜͰ
ʮDPOOFDUJPO@IBOEMFSʯͷɺFTUBCMJTI@DPOOFDUJPOΛݺͿɻ DPOOFDUJPO@IBOEMFSͬͯԿʁ
BDUJWFSFDPSEMJCBDUJWF@SFDPSEDPSFSC ࠓͷ5ISFBEʹઃఆ͞Ε͍ͯΕɺͦͷDPOODUJPO@IBOEMFSΛ͏ɻ ·ͩઃఆ͞Εͯͳ͔ͬͨΒɺ$POOF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FDUJPO1PPMΛಥͬࠐΜͰ͍Δ͜ͱ͕Θ͔Δɻ
IUUQTBQJSVCZPOSBJMTPSH ͜͜ͰυΩϡϝϯτΛݟ͓ͯ͘ɻ
ᐌ͘ ✴ ίωΫγϣϯϓʔϧɺσʔλϕʔεଓΛߦ͏εϨουͱಉظ͢Δ ✴ ͦΕͧΕͷεϨουσʔλϕʔεͷίωΫγϣϯΛίωΫγϣϯϓʔϧ͔ΒνΣοΫΞ τ͠ɺίωΫγϣϯΛ͍ɺ͍ऴΘͬͨΒνΣοΫΠϯ͢Δ ฦ͢ ɻ ✴ $POOFDUJPO1PPMશʹUISFBETBGFͰɺҰͭͷίωΫγϣϯͭͷεϨου͔Βಉ࣌ʹ
͑ͳ͍ɻ ✴ ίωΫγϣϯΑΓεϨου͕ଟ͍ͱ͖ʹɺεϨου্͕ݶΛ͑ͯίωΫγϣϯΛ νΣοΫΞτ͠Α͏ͱͨ͠ͱ͖ɺ$POOFDUJPO1PPM5ISFBE͕ίωΫγϣϯΛฦͯ͘͠ ΔͷΛͭ
BDUJWFSFDPSEMJCBDUJWF@SFDPSEDPOOFDUJPO@BEBQUFSTBCTUSBDUDPOOFDUJPO@QPPMSC
ίωΫγϣϯΛΩϟογϡ͢Δ͍ΕͷΛ࡞͓ͬͯ͘
ίωΫγϣϯऔಘͪ ͷΩϡʔΛ࡞͓ͬͯ͘
None
IUUQTBQJSVCZPOSBJMTPSHDMBTTFT"DUJWF3FDPSE$POOFDUJPO"EBQUFST$POOFDUJPO1PPM3FBQFSIUNM EBUBCBTFZNMͰઃఆ͞ΕͨGSFRVFODZͷඵ ͘͠σϑΥϧτͷඵ ͝ͱʹ ίωΫγϣϯϓʔϧͷGMVTIͱSFBQΛݺΜͰ͍Δ
None
None
None
None
✴ EBUBCBTFZNM͔ΒಘΒΕͨTQFDΛͱʹ$POOFDUJPO1PPMΛ࡞͍ͬͯΔ ✴ $POOFDUJPO1PPMࣗମ࡞Δͷͷɺ·ͩ$POOFDUJP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PMSC Ωϡʔʹ͕͍ͪΕͦΕΛ͍ɺͦ͏Ͱͳ͚Εɺ৽͍͠ίωΫγϣϯΛνΣοΫΞτ͢Δ
BDUJWFSFDPSEMJCBDUJWF@SFDPSEDPOOFDUJPO@BEBQUFSTBCTUSBDUDPOOFDUJPO@QPPMSC OFX@DPOOFDUJPOࣗମɺ֤%#ͷBEBQUFS͔ΒಘΒΕΔ
BDUJWFSFDPSEMJCBDUJWF@SFDPSEDPOOFDUJPO@BEBQUFSTBCTUSBDUDPOOFDUJPO@QPPMSC 5ISFBEಉظͷதͰɺ৽͍͠DPOOFDUJPO͕QPPMʹొ͞ΕΔ
BDUJWFSFDPSEMJCBDUJWF@SFDPSEDPSFSC ͱ͍͏Θ͚ͰɺDPOFODUJPOऔಘͷཱྀ͍͕ऴΘΓɺGJOEͰ͏ͨΊͷDPOOFDUJPO͕֬อͰ͖ͨʂ
ײ ✴ ࣮ɺ·ͱʹ3BJMTͷίʔυΛಡΜͰ͍͘ܦݧ͕͋·Γͳ͔ͬͨͷͰָ͋ͬͨ͘͠ ✴ εϥΠυʹసه͠ͳ͕ΒίʔυϦʔσΟϯά͍ͯ͘͠ͷɺҙ֎ͱϝϞϦ͕εϥΠυʹ ΔͷͰͪΐͬͱ͚ͩศར ✴ $POOFDUJPO1PPMͷ2VFVFͱ3FBQFSपΓͷཧղ͕·ͩઙ͍ ✴ 3BJMTͷ"84ͷ"VSPSBͷϑΣΠϧΦʔόʔ$POOFDUJPO1PPMपΓͰ૬ੑ͕ѱ͍ͱ͍͏ʹͭ
͍ͯฉ͍ͨ͜ͱ͕͋Γɺͦͷ͋ͨΓͷݟ͕ࣝਂ·ͬͨ ✴ ࢀߟIUUQNBUTVLB[IBUFOBCMPHDPNFOUSZ
-FUTEJWFJOUPUIFQPPM 5IBOLT