1function mcp_config_pools() 2 mcp.backend_depth_limit(3) 3 mcp.backend_connect_timeout(60) 4 mcp.backend_read_timeout(60) 5 mcp.backend_retry_timeout(60) 6 local b1 = mcp.backend('b1', '127.0.0.1', 12161) 7 return mcp.pool({b1}) 8end 9 10-- not making requests, just opening/closing backends 11function mcp_config_routes(p) 12 local fg = mcp.funcgen_new() 13 local h = fg:new_handle(p) 14 fg:ready({ 15 n = "depth", f = function(rctx) 16 return function(r) 17 return rctx:enqueue_and_wait(r, h) 18 end 19 end 20 }) 21 mcp.attach(mcp.CMD_MG, fg) 22end 23