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
マイクロサービス化を支える継続的切り替え術
Search
Shia
August 24, 2019
Technology
0
460
マイクロサービス化を支える継続的切り替え術
LL2019 の発表です
https://www.ospn.jp/odc2019/modules/eguide/event.php?eid=23
Shia
August 24, 2019
Tweet
Share
More Decks by Shia
See All by Shia
NewEngineering 2024 - 繋がっていくサービスを支える開発環境作り
riseshia
0
540
Hotspot on Coverage
riseshia
0
140
差分ベースで効率的にテストを実行してみる
riseshia
1
640
Cookpad internship 2020 summer - web
riseshia
0
7.5k
Cleaning up a huge ruby application
riseshia
3
11k
Find out potential dead codes from diff
riseshia
0
6.9k
Other Decks in Technology
See All in Technology
データプロダクトの定義からはじめる、データコントラクト駆動なデータ基盤
chanyou0311
2
350
DynamoDB でスロットリングが発生したとき/when_throttling_occurs_in_dynamodb_short
emiki
0
270
【令和最新版】AWS Direct Connectと愉快なGWたちのおさらい
minorun365
PRO
5
770
あなたの知らない Function.prototype.toString() の世界
mizdra
PRO
2
310
CysharpのOSS群から見るModern C#の現在地
neuecc
2
3.5k
ISUCONに強くなるかもしれない日々の過ごしかた/Findy ISUCON 2024-11-14
fujiwara3
8
880
LINEヤフーにおけるPrerender技術の導入とその効果
narirou
1
120
ExaDB-D dbaascli で出来ること
oracle4engineer
PRO
0
3.9k
【Pycon mini 東海 2024】Google Colaboratoryで試すVLM
kazuhitotakahashi
2
560
複雑なState管理からの脱却
sansantech
PRO
1
160
ドメインの本質を掴む / Get the essence of the domain
sinsoku
2
160
マルチプロダクトな開発組織で 「開発生産性」に向き合うために試みたこと / Improving Multi-Product Dev Productivity
sugamasao
1
310
Featured
See All Featured
[RailsConf 2023] Rails as a piece of cake
palkan
52
4.9k
Adopting Sorbet at Scale
ufuk
73
9.1k
Scaling GitHub
holman
458
140k
How to Ace a Technical Interview
jacobian
276
23k
Building Better People: How to give real-time feedback that sticks.
wjessup
364
19k
"I'm Feeling Lucky" - Building Great Search Experiences for Today's Users (#IAC19)
danielanewman
226
22k
A designer walks into a library…
pauljervisheath
204
24k
Gamification - CAS2011
davidbonilla
80
5k
Six Lessons from altMBA
skipperchong
27
3.5k
Bootstrapping a Software Product
garrettdimon
PRO
305
110k
5 minutes of I Can Smell Your CMS
philhawksworth
202
19k
Building Flexible Design Systems
yeseniaperezcruz
327
38k
Transcript
ϚΠΫϩαʔϏεԽΛࢧ ͑ΔܧଓతΓସ͑ज़ TIJB!ΫοΫύου
ࣗݾհ w γϜαϯϤϯ !TIJB w ΫοΫύουגࣜձࣾ
ࠓͷ wϞόΕͽ ‣ γεςϜ࣌ͷΓସ͑ઓུ
ϞόΕͽͱ wΨϥέʔ͚ͷαʔϏε wػೳՃ΄΅͍ͯ͠ͳ͍ wΞΫςΟϒͳϢʔβʔݮΒͳ͍
ͷ֓ཁ
ͷϙΠϯτ wڊେͳϞϊϦγοΫΞϓϦ͔Βͷ w"1*ܦ༝ͰϦιʔεΛऔಘ͢Δ ‣ %#XJUIOαʔϏεਏ͍ ‣ ͢Ͱʹ͑ΔϦιʔε"1*͕͋Δ
ͷϙΠϯτ DB
ͷϙΠϯτ DB API αʔϏε
ͷϙΠϯτ w݁ՌɺϏδωεϩδοΫ΄΅࠶࣮ʹ
ͷنײ wΤϯυϙΠϯτͷݸ΄Ͳ wݩίʔυສߦ΄Ͳ
Γସ͑ઓུΛߟ͑Δ
ཁ݅ wҰؾʹΓସ͑ͳ͍ʂʂʂʂʂ ‣ ࣄނͬͨ߹ɺ֬ೝ͠ͳ͍ͱ͍͚ͳ͍ίʔ υͷྔ͕ଟ͍ ‣ ͦͦࣄނΔ͕֬ߴ͍͔ΒΊ͓͍ͯ ͨ΄͏͕͍͍
ͭ·ΓɺͲͬͪʹྲྀ͔͢ Ͱ͖Δ͚ͩࡉ੍͔͘ޚ͍ͨ͠
چαʔϏε ཁ݅ ৽αʔϏε GET /recipes
چαʔϏε ཁ݅ ৽αʔϏε ͦΕҎ֎ GET /recipes
ख๏MPDBUJPOͰؤுΔ location /recipes { proxy_pass new_service; } location / {
proxy_pass old_service; }
چαʔϏε ৽αʔϏε ͦΕҎ֎ GET /recipes ख๏MPDBUJPOͰؤுΔ
ख๏MPDBUJPOͰؤுΔ ࣮Λ༻ҙ͢Δ ৽αʔϏεΛσϓϩΠ /(*/9ͷઃఆΛߋ৽ͯ͠Ϧϩʔυ
ख๏MPDBUJPOͰؤுΕͳ͍ wσϓϩΠຖʹ/(*/9ͷઃఆΛॻ͖͠ ͍ͨʁ wύεಉ͚ͩ͡Ͳॲཧҧ͏߹ʁ ‣ (&5SFDJQFTWT1045SFDJQFT
ਅͷཁ݅ wΓସ͑खॱΛ؆୯ʹ͍ͨ͠ wΤϯυϙΠϯτ ΞΫγϣϯ ୯ҐͰ Γସ͍͑ͨ
৽αʔϏεʹΓସ͑ͷ ܾఆݖΛҠৡ͢Δ
w৽αʔϏε ‣ ॲཧՄೳͳΒॲཧͯ͠ฦ͢ ‣ ແཧͳΒແཧͱฦ͢ ख๏Γସ͑ͷܾఆݖΛҠৡ͢Δ
ख๏Γସ͑ͷܾఆݖΛҠৡ͢Δ چαʔϏε ৽αʔϏε
ख๏Γସ͑ͷܾఆݖΛҠৡ͢Δ چαʔϏε ৽αʔϏε GET /recipes 200 OK 200 OK
ख๏Γସ͑ͷܾఆݖΛҠৡ͢Δ چαʔϏε ৽αʔϏε GET /recipes Ҏ֎ ະ࣮ͩΑʂʂ
ख๏Γସ͑ͷܾఆݖΛҠৡ͢Δ چαʔϏε ৽αʔϏε GET /recipes Ҏ֎ 200 OK 200 OK
ະ࣮ͩΑʂʂ
w৽αʔϏεଆΛσϓϩΠ͢Δ͚ͩͰ͢ ͕ͯ݁͢Δ ख๏Γସ͑ͷܾఆݖΛҠৡ͢Δ
ख๏࣮ྫ upstream backend { server new_service max_fails=0; server old_service backup;
} server { location / { proxy_next_upstream http_503 non_idempotent; proxy_pass backend; } } ৄ͍͠આ໌͜͜ͰݟΕ·͢ https://techlife.cookpad.com/entry/2019/03/05/115000
ऴΘΓ wͪΐͬͱؤுΕࡉ͔͍୯ҐͰɺ҆શʹ ָͯ͠Γସ͕͑Ͱ͖Δ