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
Migrando um legado de 30M de Requests/Dia
Search
Sponsored
·
Your Podcast. Everywhere. Effortlessly.
Share. Educate. Inspire. Entertain. You do you. We'll handle the rest.
→
Gabriel Pereira
November 25, 2020
Programming
150
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
Migrando um legado de 30M de Requests/Dia
Apresentação realizada no primeirto meetup do Ada.rb
Gabriel Pereira
November 25, 2020
More Decks by Gabriel Pereira
See All by Gabriel Pereira
My Journey (so far) as a Software Developer
gabrielpedepera
0
77
RubyConf Brasil - 2018
gabrielpedepera
0
110
Agilidade e Scrum
gabrielpedepera
0
49
Intro - Ruby e Ruby on Rails
gabrielpedepera
0
66
CSM - O que eu aprendi?
gabrielpedepera
0
51
Programadores. Quem são eles? Onde vivem? O que comem?
gabrielpedepera
1
440
Coding Dojo. O que é ? E por que participar ?
gabrielpedepera
0
44
Reuniões Diárias - Você está fazendo isso errado !
gabrielpedepera
0
89
Other Decks in Programming
See All in Programming
Starting & Sustaining Code-Based E2E Testing for Non-Coding QA Teams( #jasstniigata )
teyamagu
PRO
1
1k
AI主導のプログラミング学習アプリを作ってみた
econanringo
0
180
SREの越境 / SRE Collaboration
y0hgi
2
310
なぜCTOを降りてFDEを選んだのか?〜なぜプロダクト企業がFDEで顧客の現場に踏み込むのか〜
gonta
1
210
Web Framework Benchmark Battle 2026, Any%
a_matsuda
2
2k
Rでドレミ/Do-Re-Mi_with_R
florets1
0
130
作れる、でも消せるか?──安全に「枯らして消す」機能削除術 / Drain, Then Delete
chobishiba
2
640
ハーネス設計入門 〜 基礎知識の整理から実務へのステップアップ 〜
kinopeee
28
32k
個人開発者よ、Honoを使え(おじさんver)
tanahiro2010
2
260
AWS CDKのカスタムリソースでContinuum(旧Security Agent)を実装した話 | Implementing Continuum (formerly Security Agent) via AWS CDK Custom Resource
akihisaikeda
2
150
RAG の “R” を Swift で覗いてみる 〜「意味から探す」検索の仕組み〜
nao_randd
0
160
[Rails World 2026] Durable orchestration on Rails: from continuation to workflow
palkan
1
750
Featured
See All Featured
Agile that works and the tools we love
rasmusluckow
331
22k
jQuery: Nuts, Bolts and Bling
dougneiner
66
8.6k
The Straight Up "How To Draw Better" Workshop
denniskardys
239
140k
How to build an LLM SEO readiness audit: a practical framework
nmsamuel
2
950
Leadership Guide Workshop - DevTernity 2021
reverentgeek
1
400
Color Theory Basics | Prateek | Gurzu
gurzu
1
490
Ecommerce SEO: The Keys for Success Now & Beyond - #SERPConf2024
aleyda
1
2.2k
Crafting Experiences
bethany
1
380
ピンチをチャンスに:未来をつくるプロダクトロードマップ #pmconf2020
aki_iinuma
128
56k
It's Worth the Effort
3n
188
29k
技術選定の審美眼(2025年版) / Understanding the Spiral of Technologies 2025 edition
twada
PRO
120
120k
The Cost Of JavaScript in 2023
addyosmani
55
10k
Transcript
25 de Novembro de 2020 Migrando um legado de 30M
de Requests/Dia 1º encontro do ada.rb
Gabriel Pereira @gabrielpedepera
None
None
None
None
None
Disclaimer
None
Domain
None
Challenge
None
Code
Consumer
REST APIs
Good Test Suite
Strategy
ctrl + c ctrl + v
$ bundle exec rails server
Monitoring
How make sure that everything is working correctly?
None
Diffy
Diffy
Diffy Interface
NGINX + Diffy Monitoring
server { listen 80; server_name "nginx-diffy-proxy"; location / { proxy_pass
http://primary; } location /endpoint-to-be-migrated { mirror /mirror; mirror_request_body on; add_header X-Will-Mirror 'Yes'; proxy_pass http://primary; } location = /mirror { internal; proxy_set_header X-Original-Host $host; proxy_pass http://diffy$request_uri; } }
server { listen 80; server_name "nginx-diffy-proxy"; location / { proxy_pass
http://primary; } location /endpoint-to-be-migrated { mirror /mirror; mirror_request_body on; add_header X-Will-Mirror 'Yes'; proxy_pass http://primary; } location = /mirror { internal; proxy_set_header X-Original-Host $host; proxy_pass http://diffy$request_uri; } }
server { listen 80; server_name "nginx-diffy-proxy"; location / { proxy_pass
http://primary; } location /endpoint-to-be-migrated { mirror /mirror; mirror_request_body on; add_header X-Will-Mirror 'Yes'; proxy_pass http://primary; } location = /mirror { internal; proxy_set_header X-Original-Host $host; proxy_pass http://diffy$request_uri; } }
server { listen 80; server_name "nginx-diffy-proxy"; location / { proxy_pass
http://primary; } location /endpoint-to-be-migrated { mirror /mirror; mirror_request_body on; add_header X-Will-Mirror 'Yes'; proxy_pass http://primary; } location = /mirror { internal; proxy_set_header X-Original-Host $host; proxy_pass http://diffy$request_uri; } }
server { listen 80; server_name "nginx-diffy-proxy"; location / { proxy_pass
http://primary; } location /endpoint-to-be-migrated { mirror /mirror; mirror_request_body on; add_header X-Will-Mirror 'Yes'; proxy_pass http://primary; } location = /mirror { internal; proxy_set_header X-Original-Host $host; proxy_pass http://diffy$request_uri; } }
Diffy Interface
NGINX Replacing the APIs
server { listen 80; server_name "nginx-diffy-proxy"; location / { proxy_pass
http://primary; } location /endpoint-to-be-migrated { add_header X-Candidate-Service 'Yes'; proxy_pass http://candidate; } }
server { listen 80; server_name "nginx-diffy-proxy"; location / { proxy_pass
http://primary; } location /endpoint-to-be-migrated { add_header X-Candidate-Service 'Yes'; proxy_pass http://candidate; } }
None
None
Questions?
Thank You !!
References • https://gabrielpereira.dev/pt_br/2020/10/28/migrando-apis-utilizando-diffy-e- nginx • https://travelupdate.com/gladys-ingle-repairing-plane-video • https://blog.twitter.com/engineering/en_us/a/2015/diffy-testing-services- without-writing-tests.html •
https://www.softwaretestingmagazine.com/videos/regression-testing-with- diffy • https://medium.com/@rahulmuthu80/mirroring-incoming-web-traffic-with- nginx-fit-devops-d688ddca7d30