Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Sign up for free
Menu
Search
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Pricing
Search
Sign in
Sign up for free
マイクロサービス化を支える継続的切り替え術
Search
Shia
August 24, 2019
Technology
830
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
マイクロサービス化を支える継続的切り替え術
LL2019 の発表です
https://www.ospn.jp/odc2019/modules/eguide/event.php?eid=23
Shia
August 24, 2019
Transcript
29 slides
ϚΠΫϩαʔϏεԽΛࢧ ͑ΔܧଓతΓସ͑ज़ 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ͪΐͬͱؤுΕࡉ͔͍୯ҐͰɺ҆શʹ ָͯ͠Γସ͕͑Ͱ͖Δ
More Decks by Shia
See All by Shia
猫の手も借りたい
riseshia
0
53
Good Enough Types: Heuristic Type Inference for Ruby
riseshia
1
5k
Class.new is all you need
riseshia
1
780
型を書かないRuby開発への挑戦
riseshia
0
6.4k
ひとつの開発環境
riseshia
0
220
Conquering Massive Traffic Spikes in Ruby Applications with Pitchfork
riseshia
0
450
スパイクアクセス対策としての pitchfork 導入
riseshia
0
1.1k
NewEngineering 2024 - 繋がっていくサービスを支える開発環境作り
riseshia
0
2k
Hotspot on Coverage
riseshia
0
320
Other Decks in Technology
See All in Technology
会社説明資料_最新版
demaecan
0
32k
速くなるほど、深く考える AI時代のQAに学ぶ
kobayashiyorimitsu
0
130
Claude Codeで作ったアプリを安全に公開する/Built with Claude Japan 2026
yoshidashingo
0
230
MCPでAIが自分で調べに行く
cdataj
0
160
令和の今、あらためて IAM を考える。アクセスキーを「無くせない現実」との向き合い方
kazzpapa3
0
680
Go初心者のクラウドエンジニアが、デプロイを通して旨味を知っていく話
ryudai
1
180
Ebitengine製iOSアプリ公開ボタンを押す会
eiei114
0
120
Microsoft Entra Kerberos で実現するクラウド デバイス管理
tamaiyutaro
2
670
Claude Codeで新規事業を伸ばせるか? Zennの試行錯誤の記録
wadayusuke
1
150
Context Ontology Accelerator 入門 (業務データの意味を、AI エージェントに渡す)
inariku
PRO
3
660
2026-11-11 Tamachi.sre#7 PaCにインフラリソースの命を救われました。 / PaC saves the infra resource life
masasuzu
0
130
AWSを利用する上で知っておきたい名前解決の話 2026
nagisa53
5
3.5k
Featured
See All Featured
Building a A Zero-Code AI SEO Workflow
portentint
PRO
0
820
Lessons Learnt from Crawling 1000+ Websites
charlesmeaden
PRO
1
1.7k
Marketing Yourself as an Engineer | Alaka | Gurzu
gurzu
0
370
Taking LLMs out of the black box: A practical guide to human-in-the-loop distillation
inesmontani
PRO
3
2.5k
Navigating Team Friction
lara
192
16k
Speed Design
sergeychernyshev
33
2.2k
Understanding Cognitive Biases in Performance Measurement
bluesmoon
32
3.1k
Leveraging LLMs for student feedback in introductory data science courses - posit::conf(2025)
minecr
1
470
Agile Leadership in an Agile Organization
kimpetersen
PRO
0
310
Docker and Python
trallard
47
4.3k
Principles of Awesome APIs and How to Build Them.
keavy
128
18k
How Fast Is Fast Enough? [PerfNow 2025]
tammyeverts
3
980