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

PHPで運用中のサービスをRubyに切り替える

takanamito
January 18, 2017

 PHPで運用中のサービスをRubyに切り替える

「Rubyエンジニアが語る2016年の振り返りとこれから」での発表資料です。
https://speee.connpass.com/event/47616/

takanamito

January 18, 2017
Tweet

More Decks by takanamito

Other Decks in Technology

Transcript

  1. Kage::ProxyServer.start do |server| server.port = 8090 server.host = '0.0.0.0' server.add_master_backend(:production,

    'xxx.xxx.xxx.xxx', 80) server.add_backend(:sandbox, 'xxx.xxx.xxx.xxx', 80) server.client_timeout = 15 server.backend_timeout = 10 server.on_select_backends do |request, headers| if request[:method] == 'GET' [:production, :sandbox] else [:production] end end ~~ தུ ~~ end def compare(production_res, sandbox_res, url) # ͜ͷลͰresponseݟͯϩάग़ͨ͠Γ͢Δ end
  2. kageͷϩά "Response diff 404, 301, /hoge/joblist" "Response diff 200, 404,

    /fuga/joblist" "Response diff 404, 301, /hoge/fuga/job" ˢ 1)1 ˢ 3VCZ ˢ ֘౰63- ϩάʹग़ྗ͞ΕͨURLΛ 1ͭͣͭ֬ೝ͍ͯ͘͠