Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Migrando um legado de 30M de Requests/Dia

Migrando um legado de 30M de Requests/Dia

Apresentação realizada no primeirto meetup do Ada.rb

Gabriel Pereira

November 25, 2020
Tweet

More Decks by Gabriel Pereira

Other Decks in Programming

Transcript

  1. 25 de Novembro de 2020 Migrando um legado de 30M

    de Requests/Dia 1º encontro do ada.rb
  2. 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; } }
  3. 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; } }
  4. 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; } }
  5. 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; } }
  6. 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; } }
  7. 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; } }
  8. 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; } }
  9. 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