Slide 12
Slide 12 text
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