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
490
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
TypeScriptの次なる大進化なるか!? 条件型を返り値とする関数の型推論
uhyo
2
1.6k
隣接領域をBeyondするFinatextのエンジニア組織設計 / beyond-engineering-areas
stajima
1
270
透過型SMTPプロキシによる送信メールの可観測性向上: Update Edition / Improved observability of outgoing emails with transparent smtp proxy: Update edition
linyows
2
210
OCI Security サービス 概要
oracle4engineer
PRO
0
6.5k
Evangelismo técnico: ¿qué, cómo y por qué?
trishagee
0
360
ISUCONに強くなるかもしれない日々の過ごしかた/Findy ISUCON 2024-11-14
fujiwara3
8
870
SREによる隣接領域への越境とその先の信頼性
shonansurvivors
2
510
【令和最新版】AWS Direct Connectと愉快なGWたちのおさらい
minorun365
PRO
5
750
iOSチームとAndroidチームでブランチ運用が違ったので整理してます
sansantech
PRO
0
130
適材適所の技術選定 〜GraphQL・REST API・tRPC〜 / Optimal Technology Selection
kakehashi
1
170
元旅行会社の情シス部員が教えるおすすめなre:Inventへの行き方 / What is the most efficient way to re:Invent
naospon
2
340
Lexical Analysis
shigashiyama
1
150
Featured
See All Featured
JavaScript: Past, Present, and Future - NDC Porto 2020
reverentgeek
47
5k
YesSQL, Process and Tooling at Scale
rocio
169
14k
Rails Girls Zürich Keynote
gr2m
94
13k
Visualization
eitanlees
145
15k
Practical Tips for Bootstrapping Information Extraction Pipelines
honnibal
PRO
10
720
The Language of Interfaces
destraynor
154
24k
Why You Should Never Use an ORM
jnunemaker
PRO
54
9.1k
A Tale of Four Properties
chriscoyier
156
23k
Statistics for Hackers
jakevdp
796
220k
The World Runs on Bad Software
bkeepers
PRO
65
11k
Templates, Plugins, & Blocks: Oh My! Creating the theme that thinks of everything
marktimemedia
26
2.1k
実際に使うSQLの書き方 徹底解説 / pgcon21j-tutorial
soudai
169
50k
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ͪΐͬͱؤுΕࡉ͔͍୯ҐͰɺ҆શʹ ָͯ͠Γସ͕͑Ͱ͖Δ