1function mcp_config_pools()
2    mcp.backend_read_timeout(0.25)
3    mcp.backend_connect_timeout(0.5)
4    mcp.backend_failure_limit(1)
5    mcp.backend_retry_waittime(0.5) -- fast retry for test
6    local b1 = mcp.backend('b1', '127.0.0.1', 12131)
7    local b2 = mcp.backend('b2', '127.0.0.1', 12132)
8    local b3 = mcp.backend('b3', '127.0.0.1', 12133)
9    return mcp.pool({b1, b2, b3})
10end
11
12-- not making requests, just opening/closing backends
13function mcp_config_routes(p)
14    fg = mcp.funcgen_new() -- stash in global
15    fg:new_handle(p) -- lock the pool from collection
16    mcp.attach(mcp.CMD_MG, function(r)
17        return "SERVER_ERROR nothing\r\n"
18    end)
19end
20