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
470
マイクロサービス化を支える継続的切り替え術
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
スパイクアクセス対策としての pitchfork 導入
riseshia
0
230
NewEngineering 2024 - 繋がっていくサービスを支える開発環境作り
riseshia
0
700
Hotspot on Coverage
riseshia
0
160
差分ベースで効率的にテストを実行してみる
riseshia
1
650
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
社内イベント管理システムを1週間でAKSからACAに移行した話し
shingo_kawahara
0
180
AIのコンプラは何故しんどい?
shujisado
1
190
.NET 9 のパフォーマンス改善
nenonaninu
0
690
ずっと昔に Star をつけたはずの思い出せない GitHub リポジトリを見つけたい!
rokuosan
0
150
re:Invent をおうちで楽しんでみた ~CloudWatch のオブザーバビリティ機能がスゴい!/ Enjoyed AWS re:Invent from Home and CloudWatch Observability Feature is Amazing!
yuj1osm
0
120
Amazon SageMaker Unified Studio(Preview)、Lakehouse と Amazon S3 Tables
ishikawa_satoru
0
150
スタートアップで取り組んでいるAzureとMicrosoft 365のセキュリティ対策/How to Improve Azure and Microsoft 365 Security at Startup
yuj1osm
0
210
Wantedly での Datadog 活用事例
bgpat
1
420
10分で学ぶKubernetesコンテナセキュリティ/10min-k8s-container-sec
mochizuki875
3
330
社外コミュニティで学び社内に活かす共に学ぶプロジェクトの実践/backlogworld2024
nishiuma
0
250
Qiita埋め込み用スライド
naoki_0531
0
860
Snowflake女子会#3 Snowpipeの良さを5分で語るよ
lana2548
0
220
Featured
See All Featured
Save Time (by Creating Custom Rails Generators)
garrettdimon
PRO
28
900
Become a Pro
speakerdeck
PRO
26
5k
Embracing the Ebb and Flow
colly
84
4.5k
Building an army of robots
kneath
302
44k
Code Reviewing Like a Champion
maltzj
520
39k
Documentation Writing (for coders)
carmenintech
66
4.5k
The Cost Of JavaScript in 2023
addyosmani
45
7k
ピンチをチャンスに:未来をつくるプロダクトロードマップ #pmconf2020
aki_iinuma
111
49k
How STYLIGHT went responsive
nonsquared
95
5.2k
CSS Pre-Processors: Stylus, Less & Sass
bermonpainter
356
29k
The Cult of Friendly URLs
andyhume
78
6.1k
Building a Scalable Design System with Sketch
lauravandoore
460
33k
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ͪΐͬͱؤுΕࡉ͔͍୯ҐͰɺ҆શʹ ָͯ͠Γସ͕͑Ͱ͖Δ