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
940
GraphQLスキーマ設計の悩みどころ/My concerns about GraphQL schema design
highwide
0
1.4k
How about today's coffee?
highwide
0
460
How to choose "best of the best"
highwide
1
640
A question about private method testing
highwide
0
3.2k
A life-changing innovation for my work-style by IoT
highwide
0
640
a-code-to-rhyme
highwide
3
600
よちがや.rb案内スライド
highwide
1
560
Other Decks in Technology
See All in Technology
Amazon Personalizeのレコメンドシステム構築、実際何するの?〜大体10分で具体的なイメージをつかむ〜
kniino
1
100
B2B SaaSから見た最近のC#/.NETの進化
sansantech
PRO
0
750
Platform Engineering for Software Developers and Architects
syntasso
1
520
BLADE: An Attempt to Automate Penetration Testing Using Autonomous AI Agents
bbrbbq
0
300
[FOSS4G 2024 Japan LT] LLMを使ってGISデータ解析を自動化したい!
nssv
1
210
OCI Vault 概要
oracle4engineer
PRO
0
9.7k
【Pycon mini 東海 2024】Google Colaboratoryで試すVLM
kazuhitotakahashi
2
500
Can We Measure Developer Productivity?
ewolff
1
150
初心者向けAWS Securityの勉強会mini Security-JAWSを9ヶ月ぐらい実施してきての近況
cmusudakeisuke
0
120
AWS Media Services 最新サービスアップデート 2024
eijikominami
0
200
20241120_JAWS_東京_ランチタイムLT#17_AWS認定全冠の先へ
tsumita
2
250
Taming you application's environments
salaboy
0
180
Featured
See All Featured
Visualizing Your Data: Incorporating Mongo into Loggly Infrastructure
mongodb
42
9.2k
Faster Mobile Websites
deanohume
305
30k
Adopting Sorbet at Scale
ufuk
73
9.1k
Optimising Largest Contentful Paint
csswizardry
33
2.9k
[RailsConf 2023 Opening Keynote] The Magic of Rails
eileencodes
28
9.1k
Making the Leap to Tech Lead
cromwellryan
133
8.9k
Reflections from 52 weeks, 52 projects
jeffersonlam
346
20k
Principles of Awesome APIs and How to Build Them.
keavy
126
17k
BBQ
matthewcrist
85
9.3k
The MySQL Ecosystem @ GitHub 2015
samlambert
250
12k
Being A Developer After 40
akosma
86
590k
Let's Do A Bunch of Simple Stuff to Make Websites Faster
chriscoyier
506
140k
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Λ͏ɻ ·ͩઃఆ͞Εͯͳ͔ͬͨΒɺ$POOFDUJPO"EBQUFST$POOFDUJPO)BOEMFSΛ5ISFBEʹొ͓ͯ͘͠ɻ $POOFDUJPO)BOEMFS5ISFBE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υΩϡϝϯτΛݟ͓ͯ͘ɻ
ᐌ͘ ✴ ίωΫγϣϯϓʔϧɺσʔλϕʔεଓΛߦ͏εϨουͱಉظ͢Δ ✴ ͦΕͧΕͷεϨουσʔλϕʔεͷίωΫγϣϯΛίωΫγϣϯϓʔϧ͔ΒνΣοΫΞ τ͠ɺίωΫγϣϯΛ͍ɺ͍ऴΘͬͨΒνΣοΫΠϯ͢Δ ฦ͢ ɻ ✴ $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ࣗମ࡞Δͷͷɺ·ͩ$POOFDUJPOࣗମཱ͍֬ͯ͠ͳ͍͜ͱ͕Θ͔Δ "DUJWF3FDPSE$POOFDUJPO"EBQUFST$POODFUJPO)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Ξτ͢Δ
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