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
巨大化したモノリスApplicationの安全なRubyバージョンアップ🚀
Search
Takashi Miyahara
October 30, 2019
Programming
4
8k
巨大化したモノリスApplicationの安全なRubyバージョンアップ🚀
Meetup for Rails engineers -メドピア×リンカーズ×Classi開発事例-にて発表した資料です。
https://connpass.com/event/150554/
Takashi Miyahara
October 30, 2019
Tweet
Share
More Decks by Takashi Miyahara
See All by Takashi Miyahara
プルリク毎の検証環境を建てよう
takashimiyahara
0
5.1k
Image processing tips using ruby-vips
takashimiyahara
0
10k
Other Decks in Programming
See All in Programming
令和7年版 あなたが使ってよいフロントエンド機能とは
mugi_uno
10
5.2k
歴史と現在から考えるスケーラブルなソフトウェア開発のプラクティス
i10416
0
300
知られざるDMMデータエンジニアの生態 〜かつてツチノコと呼ばれし者〜
takaha4k
1
450
Внедряем бюджетирование, или Как сделать хорошо?
lamodatech
0
940
盆栽転じて家具となる / Bonsai and Furnitures
aereal
0
1.9k
20241217 競争力強化とビジネス価値創出への挑戦:モノタロウのシステムモダナイズ、開発組織の進化と今後の展望
monotaro
PRO
0
290
為你自己學 Python
eddie
0
520
ErdMap: Thinking about a map for Rails applications
makicamel
1
660
Azure AI Foundryのご紹介
qt_luigi
1
210
[JAWS-UG横浜 #80] うわっ…今年のServerless アップデート、少なすぎ…?
maroon1st
0
100
Fibonacci Function Gallery - Part 2
philipschwarz
PRO
0
210
Alba: Why, How and What's So Interesting
okuramasafumi
0
210
Featured
See All Featured
How To Stay Up To Date on Web Technology
chriscoyier
790
250k
What’s in a name? Adding method to the madness
productmarketing
PRO
22
3.2k
What's in a price? How to price your products and services
michaelherold
244
12k
4 Signs Your Business is Dying
shpigford
182
22k
GraphQLとの向き合い方2022年版
quramy
44
13k
Building an army of robots
kneath
302
45k
Thoughts on Productivity
jonyablonski
68
4.4k
Bootstrapping a Software Product
garrettdimon
PRO
305
110k
Build your cross-platform service in a week with App Engine
jlugia
229
18k
Dealing with People You Can't Stand - Big Design 2015
cassininazir
365
25k
Designing Experiences People Love
moore
139
23k
How to train your dragon (web standard)
notwaldorf
89
5.8k
Transcript
ڊେԽͨ͠ϞϊϦε Applicationͷ҆શͳRuby όʔδϣϯΞοϓ Takashi, Miyahara MedPeer, Inc. DCP Division, Platform
Development Group. 2019/10/30 Meetup for Rails engineers
ࣗݾհ Nameɿٶݪ ਸࢤ(@TakashiMiyahara) Jobɿҩࢣઐ༻ίϛϡχςΟαΠτ ʮMedPeerʯͷ։ൃ Hobbyɿࣗ࡞ΩʔϘʔυ One ThingɿॳొஃͰ͢ʂʂ
ձࣾհ
ձࣾհ
ձࣾհ
ձࣾհ
None
None
! όʔδϣϯΞοϓͷखॱ 1. ։ൃڥΛRuby2.6Խɺ֤छهड़Λमਖ਼ 2. ECSͷΠϝʔδΛϏϧυˍΞοϓϩʔυ 3. खݩɾCIʹͯಈ࡞֬ೝˍςετ 4. stagingڥʹө͠ɺಈ࡞ݕূ
5. productionڥʹө
! όʔδϣϯΞοϓ։࢝ ʮRubyͷόʔδϣϯΞοϓؤுΔͧͬ ! ʯ
! खݩɾCIʹͯಈ࡞֬ೝˍςετ ʮϩʔΧϧɾCIڥͰςετશ෦ύε͠ ͨͧʂ ! ʯ
! 8݄ CI͕ίέͨʂʂ
None
! 8݄ ʮͨ·ʹམͪΔςετ͔ͳʁʯ CIʮReceived 'killed' signalʯ ʮ....ʯ
! 8݄
None
! 8݄ ݪҼͷίʔυΛൃݟ
! Durationͷόά Range#stepʹ ActiveSupport::DurationΛ͍ͯ͠Δ ෦Ͱɺੑೳ͕ेഒʙඦഒʹѱԽ Rubyɿ2.6.3, 2.6.4, 2.6.5 Railsɿ5.2.3 ActiveSupportɿ5.2.3
! ࠶ݱͤ͞ΔͨΊͷ࠷খͷίʔυ
! Rubyຖͷ࣮ߦͷ֬ೝ Ruby 2.5.3 Ruby 2.6.3 2.1e-05 s 11.550944 s
ʮRuby 2.6Λ͏ͱѹతʹ͘ͳΔ ͳ͊...ʯ
! Range#stepͷݕূ
None
! ࣮ߦ݁Ռ Ruby2.6ܥͱRails5.2ܥͷΈ߹ΘͤͰɺ ύϑΥʔϚϯε͕ѹతʹѱԽ͠·͢
! όάͷݪҼ Ruby 2.6͔Βrange.step(n)͕ Enumerator::ArithmeticSequenceΛ ฦ͢Α͏ʹͳͬͨ → ҙਤ͠ͳ͍σʔλߏʹมԽ → DurationͷՃࢉܭࢉྔ͕ϧʔϓؔʹ
ରͯ͠ࢦؔతʹ૿Ճ
! όάͷݱঢ় Rails6Ͱमਖ਼͞Ε͍ͯΔΑ͏Ͱ͢
! όάͷमਖ਼ํ๏
! ͬͨʂ
None
! 9݄
! 9݄
None
! 9݄ ʮBatchαʔόʔΛ҆શʹ࠶ىಈ͠ͳ͍ ͱɺJobΛਖ਼࣮͘͠ߦͰ͖ͳ͍ͧ...ʯ
! Sidekiq Jobͷ҆શͳ࠶ىಈ 1. ࣮ߦதͷJobΛ࣮ͯ͢ߦ͖ͤ͞Δ 2. Sidekiqͷleaderϓϩηε্ཱ͕͕ͪΒͳ ͤ͘͞Δ 3. SidekiqͷleaderϓϩηεΛఀࢭ
4. Masterϓϩηε͔ΒleaderϓϩηεΛى ಈ
! ಈ͍͍ͯΔJobΛ֬ೝ
! Sidekiqͷleaderϓϩηε্ཱ͕͕ͪΒͳ ͤ͘͞Δ
! Sidekiq Jobͷঢ়ଶΛࢹ
! SidekiqͷleaderϓϩηεΛఀࢭ
! SidekiqͷleaderϓϩηεΛఀࢭˠىಈ
! Sidekiqͷঢ়ଶΛ֬ೝ
! Batchαʔόʔͷ҆શͳ࠶ىಈ͕֬ೝͰ͖ ͨʂ
None
! productionڥʹө
! medpeer.jpͷRubyόʔδϣϯΞοϓΛ࣮ ࢪʂ 201910݄15ʢՐʣʹόʔδϣϯΞοϓ ྃ
None