diff --git a/internal/file/bindata.go b/internal/file/bindata.go index 4a48f059e6..01d0b182a4 100644 --- a/internal/file/bindata.go +++ b/internal/file/bindata.go @@ -1,7 +1,7 @@ // Code generated by go-bindata. // sources: -// rootfs/etc/nginx/lua/balancer/chash.lua // rootfs/etc/nginx/lua/balancer/ewma.lua +// rootfs/etc/nginx/lua/balancer/resty.lua // rootfs/etc/nginx/lua/balancer.lua // rootfs/etc/nginx/lua/configuration.lua // rootfs/etc/nginx/lua/sticky.lua @@ -80,47 +80,47 @@ func (fi bindataFileInfo) Sys() interface{} { return nil } -var _etcNginxLuaBalancerChashLua = []byte("\x1f\x8b\x08\x00\x00\x00\x00\x00\x00\xff\x9c\x54\xd1\x8e\x9b\x30\x10\x7c\xe7\x2b\x46\xa8\x52\x13\x29\x20\xb5\x8f\x27\xf1\x09\xd7\x1f\x88\x22\xcb\xc0\x42\x56\xe1\x16\x6a\x1b\x92\xe8\x74\xff\x5e\xd9\x18\x48\x2f\xbd\x97\x3e\x59\xf6\x4e\x66\x66\x67\x37\x74\x7d\xa5\x3b\x18\xb2\xee\xae\xaa\xb3\xb6\x67\x14\x30\xf4\x7b\x64\x43\xbb\x34\x3c\xe7\xe1\x39\xdd\x27\x33\x74\x74\xdc\x3d\x62\xfc\x7d\x2d\x5a\x67\x58\x5a\x65\xc7\x12\x45\xbc\xe4\x76\x2c\x93\x58\x56\xaf\x28\xf0\xfe\x11\x6f\x2c\xd6\x69\xa9\xc8\xce\x8f\x49\x96\xa1\xe5\x89\x04\x5a\xf0\xab\x65\xb9\x61\xd2\x86\x75\xd9\x11\x38\x27\x7c\xf3\x92\x64\x9d\x1a\x0d\x7b\x2c\x3b\x18\x72\xa3\x11\x8b\x49\x77\x23\xa1\x6f\x20\xed\x2d\x9f\xb4\x39\x3e\x40\x4f\x51\xad\x19\xa5\x72\xdc\x0b\x5a\x72\xaa\x1b\xb5\x92\xf6\xa6\x26\x6d\x76\xf1\xdc\x27\xc0\x8c\x9c\xb4\x51\xa2\xdf\x68\x6d\xc1\xf7\xb3\xc0\x0e\xf8\xe9\x91\xb3\xf2\xaa\xb7\xfc\xe4\x94\x90\xd4\x49\xb2\x6a\xa9\xd7\xbc\xd4\x9d\x6f\x72\x57\xea\xea\x42\x52\x6f\x32\x4b\xfb\x28\xb6\x24\x8e\x11\x95\xcf\x64\x00\x37\x90\xde\x6d\x58\x77\x26\x49\x80\xcd\x00\x77\x09\x10\x44\x17\xde\x0b\xdd\x51\x3c\x75\x19\x89\x8f\xe9\x38\x58\x67\x48\xbf\x65\x7e\xaa\x59\x79\x4f\x4f\x9b\x25\x92\x7a\xe8\x59\x9c\x9a\xfb\x7e\x70\xf6\xd2\xb0\xd4\xbb\x0b\xdd\xf7\x9b\x90\xae\x6b\x43\xd6\x1e\x30\xf4\xc6\xa1\x08\x9b\x91\xdb\xa1\x63\xa7\x06\xcd\x66\xf7\x89\xed\x80\xf4\x25\x7d\xc8\xee\x7d\x21\x40\xf1\x44\x15\x8e\x8f\xe7\x30\x0d\xb1\xb0\xfb\xaf\x2c\x57\xac\xf4\xf5\xb2\x72\x40\x96\xe1\x4a\xa8\x7b\xf9\xee\x60\xc7\x21\xe8\x5e\x89\xdb\xb3\xa3\x1a\x55\x2f\x96\xad\x23\x71\xf0\x61\xb1\xb4\x2b\xc9\x8c\x41\x81\x1f\x9e\xb8\xe9\x0d\xd4\x61\x8d\x0f\x2c\xf0\x09\xd8\xc5\x68\xbe\x54\xec\x1e\x75\x1f\xe6\xf7\x55\xe0\xcb\x4b\xbe\x84\x93\xe7\x3e\x37\x7f\xac\x25\xef\x32\x90\x84\x56\x8e\x9f\x48\x4e\x28\xa2\xbd\x6d\x33\xb8\xf9\xc7\x0a\xad\xb3\x8d\xa9\x06\x36\x9f\x29\x75\x96\xfe\x42\x84\xff\xfb\xfa\x85\x78\x11\xba\x6e\x60\x7c\x95\xf8\xc3\x2c\xa2\x91\x60\x26\x4e\x5f\xbd\x26\x7f\x02\x00\x00\xff\xff\x65\x9c\xfb\x0e\x7b\x04\x00\x00") +var _etcNginxLuaBalancerEwmaLua = []byte("\x1f\x8b\x08\x00\x00\x00\x00\x00\x00\xff\xb4\x57\x6d\x6f\xdb\x38\x12\xfe\xee\x5f\x31\xf0\x21\x77\x72\x2b\xcb\x76\x9a\xf6\x52\xa3\x5e\x20\xdb\x75\x81\xa0\x9b\x36\x48\x0a\x14\xdd\x22\x10\x68\x69\x64\x71\x2d\x91\x5a\x92\x8a\x12\x14\xed\x6f\x5f\x0c\xa9\x37\xdb\x49\xb3\x69\xb1\x5f\x1c\x91\x9c\xb7\xe7\x99\xe1\x70\x32\x1e\xc3\x7b\xc5\xd7\x5c\xb0\x0c\x4e\x4a\x93\x4a\xa5\xe7\x70\x99\xf2\x6b\x78\xc7\xd6\x4c\xb1\x3f\x99\x80\xff\xc2\x65\x24\x8d\x81\x37\x8a\x89\x88\xeb\xc1\x78\x0c\x27\x51\x84\x5a\x63\x3c\x87\x33\xa6\xa2\x14\x66\x87\x3e\x1c\x4e\x67\xc7\x74\x76\x2a\x74\xc1\x15\x33\x5c\x0a\x88\x15\xab\x04\x24\x4a\xe6\x73\x3a\x4a\x8d\x29\xf4\x7c\x32\x59\x73\x93\x96\xab\x20\x92\xf9\xc4\x54\xdc\x18\x54\x93\x84\x0b\xb6\xce\x70\xb2\xca\xe4\x6a\x32\x5b\x45\xc7\xcf\xfe\x1f\x1d\x25\xc8\x92\x68\x3a\x7d\xf9\x02\x8f\x9e\x45\x53\x7c\x79\xfc\x7c\xf6\x82\x1d\xe3\x2c\x7a\x3e\x8d\x8e\x8e\x0e\x67\x64\x13\xa0\xd1\x1d\x47\x52\xe1\x44\xab\x68\x92\x33\x2e\x26\x3a\x62\x19\x9b\xdc\xe5\x23\x93\x2c\x5e\xb1\x8c\x89\x08\xd5\xe4\x1c\xd9\x66\x59\xe5\x2c\xb0\xf2\x83\xc1\x20\x93\x11\xcb\x40\xa1\x36\xb7\x61\x26\xa3\x0d\x2c\x40\xe1\x5f\x25\x57\xe8\x0d\xed\x6e\x40\xbb\xc3\x51\x2d\x58\x1a\x9e\xf5\x45\x68\x3d\x1c\x35\x66\x7e\x5b\xbe\x3e\xf9\x14\x7e\x38\x3d\x5b\xc2\x02\x66\x53\x18\x8f\xc1\xa4\x5c\xc3\x35\xcb\x4a\x04\xae\x81\x0b\xd0\x18\x49\x11\xeb\x5a\xe3\xf7\xf7\xaf\xdf\x86\x6f\x97\x9f\x60\x01\xc3\x39\x56\x39\x0b\x37\x78\x3b\xac\x0f\xcf\x4f\x5f\xbf\x0d\x2f\x97\x1f\xc2\xcb\xd3\x3f\xc8\xe2\x61\xe3\xc7\x0a\xb6\xd1\x36\xa1\xcf\x05\x56\xde\x90\xbe\xf4\xd0\x87\x2f\x86\xe7\x28\x4b\x03\x0b\x98\xfa\x80\x37\x05\xad\x69\x11\xcc\xbe\xb6\x01\x87\x67\xb0\x80\x2f\x5f\x9b\x65\x52\x8a\xc8\x66\x92\x8c\x78\x65\xa1\x8d\x42\x96\x8f\x06\x00\xb5\xb8\x0f\xa8\x14\x2c\xba\x00\xe6\x5b\x92\x10\x04\x2d\x22\xd2\xe2\x89\x95\x37\x29\x8a\x01\x40\xbb\xfe\xb6\x80\x61\x1d\xdd\xb0\x3b\x04\x10\xeb\x9b\x20\x93\x6b\x8f\xfe\x2e\x2f\x2e\x7c\xd0\x46\x71\xb1\x0e\x12\xa9\x72\x66\xbc\xe1\xf2\xe3\xd9\x09\xfc\x5a\xa7\x12\x12\xc6\x33\x8c\xc1\x48\x1b\xed\x1c\x0e\x08\xb5\x91\x4e\xc7\x43\xa5\x46\xa3\x91\x35\x8c\x22\x1e\xb8\xdf\x01\x80\x42\x53\x2a\x41\x61\x0c\xec\xce\x0e\xf0\x52\x58\x40\x1d\x64\xb9\xd9\xc7\xdc\x13\xe2\x09\x08\x69\x40\x6e\x3a\x1c\x3f\x8a\xc2\x59\xbd\x17\xc7\x3f\x8b\x3f\xc6\x88\xdd\x86\x14\xaa\x47\x3f\x3e\x64\x4c\x9b\xd0\xc8\x32\x4a\x31\x0e\x99\xf1\x41\x19\xe3\x83\x90\x55\x07\xd1\xc4\xb0\xa0\x1d\x18\xef\x4a\x0f\xc0\x1d\x7a\x26\x86\x5f\x60\x3a\x02\x26\x62\xda\x91\x0a\xa6\xad\x7a\x85\x7c\x9d\x52\x99\xe5\xcc\xa4\x01\xde\x14\xde\xd8\xc4\x93\xee\x2a\x8c\x28\x6c\x0a\xa6\xe6\x10\x9e\x34\x2a\x4f\x29\x18\x78\x02\xde\x2c\x98\xc2\xb8\xde\x1d\xf5\x40\x56\x39\xbb\x13\xe5\x1a\x4d\x28\x55\x58\x16\x31\x33\xe8\xd0\x36\x25\x58\x03\x74\x47\x1d\x46\xa2\x36\x74\x79\x14\x3c\x73\x89\x73\x32\x5d\xe2\x7a\x32\x7b\xf5\xef\x6a\xa8\xbb\x7d\x64\x67\x7d\x13\xe8\x94\x29\x8c\x83\xa6\xbd\xd8\x50\xe6\x6b\x34\x9d\x6e\xc3\x15\x4f\x3a\xfb\xdf\x6c\x10\x9d\xe3\x1e\x5c\xbf\x95\xea\x52\xee\xbc\x52\x82\x9c\x53\x21\xab\x5e\x81\xee\xa4\xec\x3b\x81\x85\x3b\xa2\x77\x07\x5a\xa3\x7b\x4c\x21\x75\xf7\x60\x97\xd2\x2d\x64\x8e\xf8\x2d\x50\xba\xb4\x4f\x8b\xbd\x62\x3e\x24\x52\x45\x7c\x95\xe1\x63\x30\xe8\x1e\x86\xb6\xae\xeb\x68\x6a\xeb\x77\x5f\xcd\x8f\x27\x17\xef\x7c\x18\x3e\x68\xbd\xb9\xa1\x43\x6a\x6e\x74\x1b\xdb\x6a\xe0\x49\x17\xf1\xcf\xb9\xb8\x66\x19\x8f\x81\x1b\xcc\x75\x63\xf2\x16\xe4\x35\xaa\x4a\xd1\x5b\x26\x86\xbd\x06\xf0\x68\xca\x76\x28\xa2\xad\x9f\xe1\xe8\x5f\xe0\xe4\xd1\x1c\xf4\x1a\xf0\x5e\x85\x59\x91\xdd\x86\xa1\x69\x58\xd8\xba\xd0\xfd\x51\x88\xe7\x45\x86\x39\x0a\xe3\xc6\x98\x52\x63\x0c\x82\xe5\xa8\x9d\xdc\x52\xc4\x85\xe4\xc2\x68\x88\xa5\xf8\x9f\x81\x94\x5d\xa3\x3b\xf7\x41\x4b\x28\x98\xd6\x5c\xac\xe9\x6d\x3f\x3d\x9f\x9f\x4b\x65\x80\x69\xd8\xe0\x2d\x70\xa1\x0d\xb2\xae\x71\x34\xfe\x43\x52\x86\x45\xbb\x0e\x58\x1c\x2b\x4a\x42\x10\xc0\x70\x6e\x49\x6d\x8f\x0a\xa9\x4c\x07\xf3\x3b\x8d\xcf\x1a\xf5\xe9\xad\x4f\x58\xa6\x71\xe4\x88\x18\x8f\x77\xd1\x69\x9e\xf3\x8c\x29\x7a\x71\x9a\x01\x0d\x45\x50\xf1\x0d\x2f\x30\xe6\x2c\x90\x6a\x3d\xa1\xd5\xe4\x0d\xd7\x29\xaa\x83\xe5\xe1\xc1\xf1\xf4\xe0\xe5\xb3\x4f\xcc\xa0\x0e\x75\x5a\x26\x49\x86\x64\x57\xaa\x07\x0c\x5c\x30\x11\xcb\x3c\x2c\x50\xe5\xa5\x73\x4e\x6a\x99\x94\x85\x9d\x11\x61\x46\x40\x37\xb4\x57\xf0\x68\x03\x0c\x94\x55\xa8\xa7\x25\xe5\x84\x4c\x8a\xa0\x90\x46\x3c\xe2\x98\x0a\x45\x26\x50\x0a\xd2\xc0\xd8\x89\x6a\xf0\x38\x99\x12\x23\xb2\xa5\x2b\x56\x58\x2d\x67\x86\x19\x28\xa4\xe6\x16\x3a\x87\x8a\x9b\xf4\x9e\x43\xb5\x57\x33\x0e\x6a\x58\x20\x2a\xed\xd9\x5f\x1f\x36\x54\x3b\x89\x54\xc0\x17\x33\x1f\x36\x10\xcb\xe6\xe9\xa0\x29\x92\x89\x38\xe4\x22\xc6\x9b\xe6\x35\x74\x88\x3c\xee\xff\xc7\xea\xbb\x79\xc4\x7e\x7e\xe6\x57\x7e\xfd\xd5\xa9\x5d\xc1\x62\x7f\xcf\x6f\x15\xda\x5b\x46\x94\xd9\x3d\x47\xe1\x15\x54\x3c\x73\x2f\x44\x24\x85\x61\x5c\xb4\x64\x66\xb7\xa0\x31\xc3\xc8\x60\x0c\x1b\xc7\xa8\x0b\xe5\xce\x77\x95\x58\x0d\xc9\xb3\xbb\x2f\x7d\xcc\xf7\xb3\xd1\x3c\xb0\x15\x6a\xe3\x14\x5b\x0e\x66\x77\x1e\xc3\x02\x7a\xf6\x3f\xef\x6b\x5e\xb5\x24\xd3\xd0\xbb\x47\xb3\xc0\xea\x4e\x43\xfc\x6a\xd4\x4c\x99\x9d\xc8\xab\x6d\xd7\xbd\x69\x73\xdf\xaf\xbf\x1b\x26\xf7\x3b\x4b\x3b\xa3\x64\x7b\x25\xef\x05\xe1\x18\x6e\xb9\x0d\xcf\x9a\xb6\xec\xb5\xb5\xc0\x93\x3a\x1b\xb0\x58\xc0\x6c\xef\xd9\xac\x73\x7c\xb5\x33\x7f\xd0\xd4\xef\xd5\x7a\xaf\xb6\xff\x49\x70\x13\x5a\x7d\x26\xd5\xf6\x61\x6b\x80\x8e\xc3\x48\x16\xb7\xd4\x83\x0c\xcf\x82\x18\xb1\xa0\x75\x17\x59\x13\xc1\x7e\x41\x58\x45\x9b\xfa\x3d\x7c\x2c\x31\xa8\xc2\x06\x65\x57\x1b\x0a\x75\x21\x85\xc6\xb0\xfe\x17\xc4\x48\x51\xe6\x2b\x54\x9e\x75\x4e\x3d\x2d\xe1\x4a\x9b\xd0\x5e\x4a\xfb\x4a\x5c\x33\x15\xb4\x8d\x6d\x4b\x7d\x34\xda\x9e\x3e\x23\x29\x04\x46\xe6\x07\x4d\xf7\xb5\x77\x2d\xd3\x6c\xba\xd8\xb6\xff\x74\x1b\xca\x5e\x63\x6f\xf8\x7c\xd0\x2f\x35\xfc\x66\x6e\xb2\x1a\x5c\x87\xab\x8c\x89\xde\xd0\xb9\x5b\x0d\x6d\x11\x3c\x3c\xfc\x1a\x55\x36\xfd\xbf\xce\x63\x78\x36\xf8\x3b\x00\x00\xff\xff\x3b\x53\x47\x97\xfc\x0f\x00\x00") -func etcNginxLuaBalancerChashLuaBytes() ([]byte, error) { +func etcNginxLuaBalancerEwmaLuaBytes() ([]byte, error) { return bindataRead( - _etcNginxLuaBalancerChashLua, - "etc/nginx/lua/balancer/chash.lua", + _etcNginxLuaBalancerEwmaLua, + "etc/nginx/lua/balancer/ewma.lua", ) } -func etcNginxLuaBalancerChashLua() (*asset, error) { - bytes, err := etcNginxLuaBalancerChashLuaBytes() +func etcNginxLuaBalancerEwmaLua() (*asset, error) { + bytes, err := etcNginxLuaBalancerEwmaLuaBytes() if err != nil { return nil, err } - info := bindataFileInfo{name: "etc/nginx/lua/balancer/chash.lua", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)} + info := bindataFileInfo{name: "etc/nginx/lua/balancer/ewma.lua", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)} a := &asset{bytes: bytes, info: info} return a, nil } -var _etcNginxLuaBalancerEwmaLua = []byte("\x1f\x8b\x08\x00\x00\x00\x00\x00\x00\xff\xb4\x57\x6d\x6f\xdb\x38\x12\xfe\xee\x5f\x31\xf0\x21\x77\x72\x2b\xcb\x76\x9a\xf6\x52\xa3\x5e\x20\xdb\x75\x81\xa0\x9b\x36\x48\x0a\x14\xdd\x22\x10\x68\x69\x64\x71\x2d\x91\x5a\x92\x8a\x12\x14\xed\x6f\x5f\x0c\xa9\x37\xdb\x49\xb3\x69\xb1\x5f\x1c\x91\x9c\xb7\xe7\x99\xe1\x70\x32\x1e\xc3\x7b\xc5\xd7\x5c\xb0\x0c\x4e\x4a\x93\x4a\xa5\xe7\x70\x99\xf2\x6b\x78\xc7\xd6\x4c\xb1\x3f\x99\x80\xff\xc2\x65\x24\x8d\x81\x37\x8a\x89\x88\xeb\xc1\x78\x0c\x27\x51\x84\x5a\x63\x3c\x87\x33\xa6\xa2\x14\x66\x87\x3e\x1c\x4e\x67\xc7\x74\x76\x2a\x74\xc1\x15\x33\x5c\x0a\x88\x15\xab\x04\x24\x4a\xe6\x73\x3a\x4a\x8d\x29\xf4\x7c\x32\x59\x73\x93\x96\xab\x20\x92\xf9\xc4\x54\xdc\x18\x54\x93\x84\x0b\xb6\xce\x70\xb2\xca\xe4\x6a\x32\x5b\x45\xc7\xcf\xfe\x1f\x1d\x25\xc8\x92\x68\x3a\x7d\xf9\x02\x8f\x9e\x45\x53\x7c\x79\xfc\x7c\xf6\x82\x1d\xe3\x2c\x7a\x3e\x8d\x8e\x8e\x0e\x67\x64\x13\xa0\xd1\x1d\x47\x52\xe1\x44\xab\x68\x92\x33\x2e\x26\x3a\x62\x19\x9b\xdc\xe5\x23\x93\x2c\x5e\xb1\x8c\x89\x08\xd5\xe4\x1c\xd9\x66\x59\xe5\x2c\xb0\xf2\x83\xc1\x20\x93\x11\xcb\x40\xa1\x36\xb7\x61\x26\xa3\x0d\x2c\x40\xe1\x5f\x25\x57\xe8\x0d\xed\x6e\x40\xbb\xc3\x51\x2d\x58\x1a\x9e\xf5\x45\x68\x3d\x1c\x35\x66\x7e\x5b\xbe\x3e\xf9\x14\x7e\x38\x3d\x5b\xc2\x02\x66\x53\x18\x8f\xc1\xa4\x5c\xc3\x35\xcb\x4a\x04\xae\x81\x0b\xd0\x18\x49\x11\xeb\x5a\xe3\xf7\xf7\xaf\xdf\x86\x6f\x97\x9f\x60\x01\xc3\x39\x56\x39\x0b\x37\x78\x3b\xac\x0f\xcf\x4f\x5f\xbf\x0d\x2f\x97\x1f\xc2\xcb\xd3\x3f\xc8\xe2\x61\xe3\xc7\x0a\xb6\xd1\x36\xa1\xcf\x05\x56\xde\x90\xbe\xf4\xd0\x87\x2f\x86\xe7\x28\x4b\x03\x0b\x98\xfa\x80\x37\x05\xad\x69\x11\xcc\xbe\xb6\x01\x87\x67\xb0\x80\x2f\x5f\x9b\x65\x52\x8a\xc8\x66\x92\x8c\x78\x65\xa1\x8d\x42\x96\x8f\x06\x00\xb5\xb8\x0f\xa8\x14\x2c\xba\x00\xe6\x5b\x92\x10\x04\x2d\x22\xd2\xe2\x89\x95\x37\x29\x8a\x01\x40\xbb\xfe\xb6\x80\x61\x1d\xdd\xb0\x3b\x04\x10\xeb\x9b\x20\x93\x6b\x8f\xfe\x2e\x2f\x2e\x7c\xd0\x46\x71\xb1\x0e\x12\xa9\x72\x66\xbc\xe1\xf2\xe3\xd9\x09\xfc\x5a\xa7\x12\x12\xc6\x33\x8c\xc1\x48\x1b\xed\x1c\x0e\x08\xb5\x91\x4e\xc7\x43\xa5\x46\xa3\x91\x35\x8c\x22\x1e\xb8\xdf\x01\x80\x42\x53\x2a\x41\x61\x0c\xec\xce\x0e\xf0\x52\x58\x40\x1d\x64\xb9\xd9\xc7\xdc\x13\xe2\x09\x08\x69\x40\x6e\x3a\x1c\x3f\x8a\xc2\x59\xbd\x17\xc7\x3f\x8b\x3f\xc6\x88\xdd\x86\x14\xaa\x47\x3f\x3e\x64\x4c\x9b\xd0\xc8\x32\x4a\x31\x0e\x99\xf1\x41\x19\xe3\x83\x90\x55\x07\xd1\xc4\xb0\xa0\x1d\x18\xef\x4a\x0f\xc0\x1d\x7a\x26\x86\x5f\x60\x3a\x02\x26\x62\xda\x91\x0a\xa6\xad\x7a\x85\x7c\x9d\x52\x99\xe5\xcc\xa4\x01\xde\x14\xde\xd8\xc4\x93\xee\x2a\x8c\x28\x6c\x0a\xa6\xe6\x10\x9e\x34\x2a\x4f\x29\x18\x78\x02\xde\x2c\x98\xc2\xb8\xde\x1d\xf5\x40\x56\x39\xbb\x13\xe5\x1a\x4d\x28\x55\x58\x16\x31\x33\xe8\xd0\x36\x25\x58\x03\x74\x47\x1d\x46\xa2\x36\x74\x79\x14\x3c\x73\x89\x73\x32\x5d\xe2\x7a\x32\x7b\xf5\xef\x6a\xa8\xbb\x7d\x64\x67\x7d\x13\xe8\x94\x29\x8c\x83\xa6\xbd\xd8\x50\xe6\x6b\x34\x9d\x6e\xc3\x15\x4f\x3a\xfb\xdf\x6c\x10\x9d\xe3\x1e\x5c\xbf\x95\xea\x52\xee\xbc\x52\x82\x9c\x53\x21\xab\x5e\x81\xee\xa4\xec\x3b\x81\x85\x3b\xa2\x77\x07\x5a\xa3\x7b\x4c\x21\x75\xf7\x60\x97\xd2\x2d\x64\x8e\xf8\x2d\x50\xba\xb4\x4f\x8b\xbd\x62\x3e\x24\x52\x45\x7c\x95\xe1\x63\x30\xe8\x1e\x86\xb6\xae\xeb\x68\x6a\xeb\x77\x5f\xcd\x8f\x27\x17\xef\x7c\x18\x3e\x68\xbd\xb9\xa1\x43\x6a\x6e\x74\x1b\xdb\x6a\xe0\x49\x17\xf1\xcf\xb9\xb8\x66\x19\x8f\x81\x1b\xcc\x75\x63\xf2\x16\xe4\x35\xaa\x4a\xd1\x5b\x26\x86\xbd\x06\xf0\x68\xca\x76\x28\xa2\xad\x9f\xe1\xe8\x5f\xe0\xe4\xd1\x1c\xf4\x1a\xf0\x5e\x85\x59\x91\xdd\x86\xa1\x69\x58\xd8\xba\xd0\xfd\x51\x88\xe7\x45\x86\x39\x0a\xe3\xc6\x98\x52\x63\x0c\x82\xe5\xa8\x9d\xdc\x52\xc4\x85\xe4\xc2\x68\x88\xa5\xf8\x9f\x81\x94\x5d\xa3\x3b\xf7\x41\x4b\x28\x98\xd6\x5c\xac\xe9\x6d\x3f\x3d\x9f\x9f\x4b\x65\x80\x69\xd8\xe0\x2d\x70\xa1\x0d\xb2\xae\x71\x34\xfe\x43\x52\x86\x45\xbb\x0e\x58\x1c\x2b\x4a\x42\x10\xc0\x70\x6e\x49\x6d\x8f\x0a\xa9\x4c\x07\xf3\x3b\x8d\xcf\x1a\xf5\xe9\xad\x4f\x58\xa6\x71\xe4\x88\x18\x8f\x77\xd1\x69\x9e\xf3\x8c\x29\x7a\x71\x9a\x01\x0d\x45\x50\xf1\x0d\x2f\x30\xe6\x2c\x90\x6a\x3d\xa1\xd5\xe4\x0d\xd7\x29\xaa\x83\xe5\xe1\xc1\xf1\xf4\xe0\xe5\xb3\x4f\xcc\xa0\x0e\x75\x5a\x26\x49\x86\x64\x57\xaa\x07\x0c\x5c\x30\x11\xcb\x3c\x2c\x50\xe5\xa5\x73\x4e\x6a\x99\x94\x85\x9d\x11\x61\x46\x40\x37\xb4\x57\xf0\x68\x03\x0c\x94\x55\xa8\xa7\x25\xe5\x84\x4c\x8a\xa0\x90\x46\x3c\xe2\x98\x0a\x45\x26\x50\x0a\xd2\xc0\xd8\x89\x6a\xf0\x38\x99\x12\x23\xb2\xa5\x2b\x56\x58\x2d\x67\x86\x19\x28\xa4\xe6\x16\x3a\x87\x8a\x9b\xf4\x9e\x43\xb5\x57\x33\x0e\x6a\x58\x20\x2a\xed\xd9\x5f\x1f\x36\x54\x3b\x89\x54\xc0\x17\x33\x1f\x36\x10\xcb\xe6\xe9\xa0\x29\x92\x89\x38\xe4\x22\xc6\x9b\xe6\x35\x74\x88\x3c\xee\xff\xc7\xea\xbb\x79\xc4\x7e\x7e\xe6\x57\x7e\xfd\xd5\xa9\x5d\xc1\x62\x7f\xcf\x6f\x15\xda\x5b\x46\x94\xd9\x3d\x47\xe1\x15\x54\x3c\x73\x2f\x44\x24\x85\x61\x5c\xb4\x64\x66\xb7\xa0\x31\xc3\xc8\x60\x0c\x1b\xc7\xa8\x0b\xe5\xce\x77\x95\x58\x0d\xc9\xb3\xbb\x2f\x7d\xcc\xf7\xb3\xd1\x3c\xb0\x15\x6a\xe3\x14\x5b\x0e\x66\x77\x1e\xc3\x02\x7a\xf6\x3f\xef\x6b\x5e\xb5\x24\xd3\xd0\xbb\x47\xb3\xc0\xea\x4e\x43\xfc\x6a\xd4\x4c\x99\x9d\xc8\xab\x6d\xd7\xbd\x69\x73\xdf\xaf\xbf\x1b\x26\xf7\x3b\x4b\x3b\xa3\x64\x7b\x25\xef\x05\xe1\x18\x6e\xb9\x0d\xcf\x9a\xb6\xec\xb5\xb5\xc0\x93\x3a\x1b\xb0\x58\xc0\x6c\xef\xd9\xac\x73\x7c\xb5\x33\x7f\xd0\xd4\xef\xd5\x7a\xaf\xb6\xff\x49\x70\x13\x5a\x7d\x26\xd5\xf6\x61\x6b\x80\x8e\xc3\x48\x16\xb7\xd4\x83\x0c\xcf\x82\x18\xb1\xa0\x75\x17\x59\x13\xc1\x7e\x41\x58\x45\x9b\xfa\x3d\x7c\x2c\x31\xa8\xc2\x06\x65\x57\x1b\x0a\x75\x21\x85\xc6\xb0\xfe\x17\xc4\x48\x51\xe6\x2b\x54\x9e\x75\x4e\x3d\x2d\xe1\x4a\x9b\xd0\x5e\x4a\xfb\x4a\x5c\x33\x15\xb4\x8d\x6d\x4b\x7d\x34\xda\x9e\x3e\x23\x29\x04\x46\xe6\x07\x4d\xf7\xb5\x77\x2d\xd3\x6c\xba\xd8\xb6\xff\x74\x1b\xca\x5e\x63\x6f\xf8\x7c\xd0\x2f\x35\xfc\x66\x6e\xb2\x1a\x5c\x87\xab\x8c\x89\xde\xd0\xb9\x5b\x0d\x6d\x11\x3c\x3c\xfc\x1a\x55\x36\xfd\xbf\xce\x63\x78\x36\xf8\x3b\x00\x00\xff\xff\x3b\x53\x47\x97\xfc\x0f\x00\x00") +var _etcNginxLuaBalancerRestyLua = []byte("\x1f\x8b\x08\x00\x00\x00\x00\x00\x00\xff\x9c\x54\x4d\x8b\xdc\x30\x0c\xbd\xe7\x57\x88\x9c\x12\xc8\x06\x7a\x5d\xc8\xa5\xd0\x42\xa1\xdb\xc2\x5e\x97\xc1\x38\x89\x92\x98\x49\xe4\xa9\xed\x74\x66\x58\xb6\xbf\xbd\xf8\x23\x9f\x33\xb4\xdb\x9e\x42\x64\xe9\xf9\x3d\xe9\xc9\xbd\xac\x78\x0f\x0a\xb5\xb9\x32\x25\x47\xaa\x95\x2c\x05\x41\x01\x0a\x7f\x8c\x42\x61\x12\xbb\xb3\x7c\x39\x8b\xd3\x68\x5d\x54\x75\x5c\x77\xb7\xf9\x2e\x3c\xa7\x8e\x46\xf4\xeb\x1c\xfb\x1f\xa7\x51\x38\x65\x4f\x50\xc0\xeb\x5b\xf8\x13\xa4\x0d\xa7\x0a\xb5\x0f\x86\x68\x33\x52\x65\x84\x24\x68\xd1\x30\x7f\x73\xc9\x7b\x9b\xa7\x18\xc9\x1a\x75\x82\x54\x9f\xa4\x20\xa3\xd3\x08\xc0\x17\xb9\x03\x0f\x33\x85\xce\x28\xda\xce\x40\x01\x1f\xa2\x08\xa0\x91\x0a\x58\x06\x53\x29\x08\x82\x13\x17\x6a\x0d\x06\xb5\x8c\x00\xa6\xf2\x29\xce\xb4\x51\x82\x5a\x28\xe6\x48\xce\xeb\x5a\xa1\xd6\x90\xe7\x10\x3f\xc6\xf6\x33\x1f\x9d\xa4\x32\x0e\xc4\x11\x7a\xd9\x81\x1c\xa0\x08\xb4\x22\xb0\x35\x96\x98\x42\x33\x2a\xf2\xf9\x91\x8b\xed\xda\x20\x48\xec\xfb\x90\x34\xbc\x32\x52\x5d\xb3\xb9\x85\x8b\xb2\x3b\x4d\x79\x4f\x23\x23\x00\xd1\xcc\x70\x60\x3a\x24\xa7\x63\x8a\x3c\x2a\xb4\x44\x12\x57\x68\xaf\xc0\x5e\xe3\x26\x03\x0a\x08\xb4\x1e\x09\xcf\xab\xc4\x8d\xce\x29\xdb\x4b\x9d\x45\xb2\xa7\x3c\x70\x4b\x4a\x5e\x1d\x91\xea\x45\xc6\xea\x82\xd9\x31\x2f\x21\x2b\x27\x3e\xe0\xc1\x93\x27\x69\xee\x08\xa0\xf6\x92\xf7\xb2\x4d\xec\xf7\xd3\xf3\x73\x06\x31\x49\xf8\xfa\x11\x78\xdf\x4a\x25\x4c\x37\x2c\x35\x67\xae\xa1\xb1\xee\x8f\x53\x57\x3a\x8d\x46\xf4\x8b\x8c\xbb\xe6\xf0\xf7\x07\x4a\x2f\xf1\x78\xd2\x46\x21\x1f\x1e\xec\x66\x3c\x94\xd7\xf8\xb0\xd0\xf1\xf5\x47\xbc\x42\xe1\x76\x25\xef\x47\xce\xa8\xbd\xb0\x9f\x5c\x25\x7f\x40\xf0\x8c\x6e\x4d\x39\xcf\xa7\x11\x54\x27\x47\xbc\x6e\x66\xf3\xb7\xfc\x74\x2f\x2c\x58\x3b\x03\x6b\xe4\x89\xa2\x3e\xf5\xc2\x30\xbb\x2e\xc9\x0e\x30\xb3\x0b\x90\x2e\xd3\x7d\x9d\x00\xa0\xb8\x81\x72\x9f\xb7\xdb\xb9\x07\x63\xfd\xdf\xd8\xc3\xae\x78\xdf\xb9\x77\x67\xfb\xbc\xfd\xc3\x64\xf6\x20\xee\x5d\x5b\xfa\x73\x77\x3b\xfc\xf5\x83\xf1\x4b\x36\xa0\xe1\x86\x97\x3d\x26\x53\xa6\x9f\x9a\x68\x60\x30\x39\x63\x82\x6a\xbc\xc0\xaf\x79\x4f\x16\x9c\xad\x4d\xbf\x7c\xfb\xfc\x3d\x83\x78\x63\xd2\x8e\x6b\x28\x11\x09\xaa\x8e\x53\x8b\x75\x66\x59\xa2\x31\x76\xaa\xa6\xc3\x99\x5b\xb0\xee\x66\x2d\xbd\x81\xbd\x92\x45\xcf\xfd\x9e\xba\x6e\xbf\xeb\xc1\x99\xca\x56\x8f\x88\x83\x0e\x56\x60\x4f\xd1\xef\x00\x00\x00\xff\xff\xdd\x37\x9c\x81\x72\x06\x00\x00") -func etcNginxLuaBalancerEwmaLuaBytes() ([]byte, error) { +func etcNginxLuaBalancerRestyLuaBytes() ([]byte, error) { return bindataRead( - _etcNginxLuaBalancerEwmaLua, - "etc/nginx/lua/balancer/ewma.lua", + _etcNginxLuaBalancerRestyLua, + "etc/nginx/lua/balancer/resty.lua", ) } -func etcNginxLuaBalancerEwmaLua() (*asset, error) { - bytes, err := etcNginxLuaBalancerEwmaLuaBytes() +func etcNginxLuaBalancerRestyLua() (*asset, error) { + bytes, err := etcNginxLuaBalancerRestyLuaBytes() if err != nil { return nil, err } - info := bindataFileInfo{name: "etc/nginx/lua/balancer/ewma.lua", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)} + info := bindataFileInfo{name: "etc/nginx/lua/balancer/resty.lua", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)} a := &asset{bytes: bytes, info: info} return a, nil } -var _etcNginxLuaBalancerLua = []byte("\x1f\x8b\x08\x00\x00\x00\x00\x00\x00\xff\xac\x58\x5f\x6f\x1b\xb9\x11\x7f\xd7\xa7\x18\xec\x93\x16\x95\x16\x71\xd1\x27\xa3\x2a\xa0\x24\xba\xd6\x88\x23\x1f\x14\x27\x87\xc3\x21\x20\xa8\xdd\x91\xc4\x13\x45\x6e\x49\xae\x65\xf7\x70\xf9\xec\xc5\x70\x97\xdc\x3f\x5a\xdb\x09\xda\x17\x5b\x22\x87\xf3\x7f\x7e\x33\x23\xa9\x73\x2e\x41\xed\x1f\xd9\x96\x4b\xae\x72\x34\xb0\x00\x83\xff\xae\x84\xc1\x69\xa2\xf6\x8f\x59\x38\x4f\xd2\x49\x4d\xfc\xbb\xd5\xaa\x4b\x94\xd3\x41\xbc\xcd\xb5\xda\x89\x7d\x65\xb8\x13\x03\xb2\xee\x45\x24\xaf\x9c\x90\x5d\x2a\xfa\x1e\x2f\xa5\xa9\x72\x9e\x1f\xb0\x4b\x60\xd0\xba\xa7\x2c\xdc\x44\x52\x7f\xcc\xa4\xce\x8f\x23\xc4\x3a\x3f\x46\x42\x3c\x9f\x78\x97\x24\x98\x97\xd1\x45\xa4\xb2\x4e\xe4\xc7\xa7\x2e\x5d\x7d\xd2\x9a\x79\xe0\xf6\x30\xca\xc7\xdf\x24\xe9\x64\x32\x9f\xc3\x09\xb9\xad\x0c\x16\x20\x14\x58\xcc\xb5\x2a\x2c\x1d\xef\xb4\x01\xae\x60\xbd\x17\xea\x11\xce\xda\x1c\xd1\x80\xd3\x50\x8a\xfc\x08\x55\x09\xee\x80\xa0\xf0\x0c\x52\x58\x07\x7a\x07\x55\x69\x9d\x41\x7e\x82\x12\xd1\x78\x06\xc2\xc1\x59\x48\x09\x8e\x1f\x11\xfe\x4e\xf4\x05\x4a\xfe\x04\x95\x22\x77\xe6\x5a\x39\xa3\xa5\x44\x03\x3f\xdf\x7d\xba\xc7\xc2\x73\xdc\xf2\xfc\x88\xaa\x00\xbd\xfd\x1d\x73\x47\xf2\xe8\xb4\xd6\x01\x55\x51\x6a\xa1\xdc\x3f\xe0\x2f\xf0\x76\xf9\xee\xc3\x6a\xfd\xfe\x13\xfb\xf4\xeb\xfa\x1d\xbb\x59\xdf\xaf\x36\x5f\x96\xb7\x8d\xd9\xe3\x97\xb0\x80\xab\x49\x43\xb1\xb9\xfb\xbc\x7e\xcf\x36\x77\x6f\x6f\xd6\xec\xf6\xee\xdd\x07\xf6\x61\xf5\x2b\x2c\x20\x31\xba\x52\x05\x33\x7a\x2b\x54\xd2\x90\xbe\x5f\xfd\xb4\xfc\x7c\x7b\xcf\x6e\xdf\xb2\xe5\xed\x3f\x2f\x88\x42\x64\xdb\x33\x66\x1d\x77\x94\x0d\x94\x97\xf6\xc0\x0d\x16\xd9\xc5\x75\x78\xc7\x3e\xc2\x02\xfe\xf8\x73\x8c\x4d\x4c\x93\x90\x33\xd7\x0a\xcf\xd3\x84\x3e\xd9\x64\x06\x7f\x38\x71\x42\x5d\x39\x58\xc0\x9b\x19\xe0\x63\x49\xdf\xe9\x4b\x76\xf5\x67\x1a\xf8\x35\xee\xb4\x33\x40\x43\x35\x13\x32\x32\x23\x56\x57\x6f\xfe\xfa\xb7\x74\x22\x76\xa0\xb4\x8b\x94\xe4\x6f\x35\x01\x30\xe8\x2a\xa3\xe8\x99\x36\xd3\x64\xc7\x85\xa4\x08\x69\xc8\x0d\x92\x75\x14\x95\x3a\xeb\x29\x4d\xc2\xe3\x6b\x48\x20\xcb\x60\x4a\xc2\xb4\x81\xa4\x52\x47\xa5\xcf\x2a\x49\xd3\x09\xaa\x22\x28\xb5\xab\x54\xee\xeb\x6e\x8f\x8e\xe5\x95\x31\xa8\x1c\x6b\x58\x4c\xd3\x09\x40\x4f\x77\xa6\xf8\x29\x78\xf3\x81\x9b\xac\x34\xfa\xf1\x89\x85\x6c\xf3\xb7\xc3\x27\xb0\x68\x35\xda\xa3\x9b\x76\x39\xa5\x93\x09\x40\xdf\xe6\x60\x32\x78\x19\x52\xef\xa7\xf4\xff\x97\xe5\x66\x3d\x83\x44\xe9\x48\xd6\x07\x8d\x1d\x85\xca\x5b\xef\x6d\x76\xda\x3a\x23\xd4\xbe\x2f\x8c\xac\xf1\x96\x47\x87\x36\xd7\xaf\xfa\x43\x6e\x19\x97\xfb\x4b\x77\xc0\xe2\x59\xb7\x3d\x67\x55\x23\x59\x09\xf9\x9c\x36\xbf\x25\x52\xf3\x62\xde\xa0\x43\xf2\x95\x82\xd7\xcf\xfb\x51\x7d\x1b\xfa\xff\xb3\x92\xb3\x8e\xa6\x81\x6f\xed\x8d\x01\xdb\x0b\x17\x09\xcb\x22\x24\xd6\x1f\xb2\x78\x14\xe2\x12\xe2\xdf\xd2\x46\x15\x1a\xe8\x6d\x50\xa6\xe5\x41\x32\xc3\x69\xcb\x86\x5e\x88\x5d\x4b\xfe\x6d\x41\x7a\xb7\xdc\xda\x12\x6a\x28\x32\x5e\x14\x06\x2d\xd5\x62\x38\x29\xb5\x71\x9e\xb8\xb6\x15\x5a\x3b\xfb\x20\x13\xc3\x26\x76\x6d\xc8\x42\x09\xcc\x09\xca\xe7\xdb\xa7\xe4\xeb\x0b\xa6\x78\xbc\x0f\x5d\xb2\x6f\xc4\x77\xab\xd9\xea\x10\xd4\x5c\x40\x22\x4a\xe6\x5b\x49\x2b\x7b\x3e\x87\xfb\xbb\xf7\x77\x53\x94\x0f\x42\xe1\x0e\x55\x21\x52\x10\xa7\x52\xe2\x09\x95\x03\x5f\xae\xc3\x04\xcc\x82\x2c\xfb\xdb\x9b\xaf\xad\x06\xa3\xb7\x41\x1b\x69\xb1\xaf\x8a\xef\x8d\x2f\xf8\x80\xee\x87\x2e\x68\x59\xff\xaf\xce\xf8\xb6\x18\xb6\x8a\x17\x60\x25\xa2\x45\xfd\x38\x25\x04\x49\x40\x58\x5f\x1b\xb6\x2a\x49\x08\x16\x33\xd8\x71\x29\x85\xda\x7b\x47\x10\xfa\x7a\xa8\xe9\x8b\xe9\x40\xcc\x7c\x0e\x1b\x4a\x9b\xf9\x86\xd2\x86\xaa\x7c\xd0\x4e\xae\xe9\x4f\x34\xdd\x03\x6b\x96\x8d\x36\xc3\xb6\xa8\x24\xb7\x8e\x09\x55\xe0\x23\x35\xa3\x61\x1f\xeb\xe2\x6b\x56\xe3\x6b\xac\x46\x7a\x33\xeb\x06\x40\xe1\xa3\xbb\x74\xfc\xac\x23\xa2\x83\x10\xb5\xc8\xe8\xc3\xa0\xc1\x55\xa8\x97\xc0\xf4\x32\x47\x3c\xe9\xd7\x01\x82\xd8\x2a\xcf\x7d\x20\x77\xda\xe4\x62\x2b\x29\x0b\xe3\x19\x1a\xd3\x5e\x8c\x9a\x69\x07\x66\xce\x60\xa8\x6f\xc3\xec\xc5\x66\x32\xca\x17\x9a\xe6\xea\x63\x8b\xc6\xa4\x51\x73\xb1\x6b\x95\xfa\x71\xb6\x0f\x5c\x8a\x02\x84\xc3\x93\x0d\x6c\x9e\x40\x3f\xa0\x39\x1b\xe1\x1c\xd2\x74\xdb\x11\x34\x82\x87\x0d\xfc\xd9\x2e\xfc\x85\x0f\xb1\x36\x5b\x26\x17\xc9\x56\xa9\x1f\x48\xb7\xc9\x77\xd7\xde\x58\x27\xb2\x4f\x2a\x8f\x6d\xa6\xa3\x59\x1c\x03\x2e\xe3\xd7\xed\x07\xf3\x39\x70\x69\x35\xcd\x5a\xe8\xfc\x6c\x63\xd0\x96\x98\x3b\xf1\x80\x10\x57\x8e\x7a\xae\xb3\x42\xe5\xed\x9c\x7a\xe0\x96\xb0\x55\xed\x71\xe8\x82\x3a\x10\x05\x4a\x74\x38\xa8\x90\x49\x04\xc9\x6b\xd8\x78\x91\x35\x6b\xbd\x83\xd5\x2f\x1f\x97\x50\x62\x1c\xa9\x2e\x3b\xe0\xf7\xb7\xec\x21\x54\x0f\xf0\xb1\x33\x9e\x06\x13\x19\x91\x5c\xef\x64\x65\x0f\x8c\x4b\x39\x4d\x5f\x24\x64\xbe\x6e\x9d\xae\xf2\x03\x16\x8c\xbb\xc1\xc3\x16\x94\x6a\xb7\xd6\xcb\x08\x0d\x4c\xee\x20\x6c\xc7\xc0\xef\x6d\x6a\x75\x0f\x33\x28\x94\xe8\xf5\xe1\x46\x50\xb7\x30\x6e\xd6\x3f\xdd\xcd\x20\xa1\xb4\x30\x5a\x89\xff\xd4\x23\x5b\xae\xa9\x0b\x39\xf4\x63\x5b\x33\xab\xf6\x23\xf3\x5a\x6e\xd9\xcb\x59\xc7\xb2\x82\x3b\x5a\xd6\x7a\xe3\xa1\x1f\x1a\x7a\x14\x23\xd3\x4f\xf3\x74\x30\x03\xb5\x16\xd5\x72\xf4\x71\x46\x8b\x56\xe4\x06\x0b\x28\x73\x72\x32\x6d\xb4\x59\x81\xb9\x2e\xda\x74\xae\x59\x76\x44\xe9\xe3\x38\x74\xac\x36\x9b\x19\x40\x92\xeb\x4a\x16\x9e\xb0\xe4\xc6\x62\xbb\x06\x10\x9b\xeb\xc1\x68\xdb\xd5\x22\x4d\x47\x55\xa6\xf0\xb2\x9e\xbe\xb4\x55\x96\x5c\x18\xdb\x7f\x0e\x85\xee\x74\xe9\x67\x06\xf7\xce\x8b\xd8\x5c\x86\xeb\x41\x53\x7d\xb0\x00\x67\x2a\x9c\x84\xb9\xec\x62\xc0\x84\x91\x17\x64\x37\xed\xf2\x59\x81\x58\x32\x4a\x0f\x6e\x62\xb1\xf6\xac\x48\xe3\x98\x36\x10\x10\xb9\x75\x04\xf5\xd0\x68\x94\x49\xfd\x77\x2c\xdb\xf8\xce\xa1\x61\x97\x93\xf5\x6b\x13\xf0\x8b\xa5\xee\x27\x9f\x4b\xce\x51\x87\x28\x9d\x7d\xcc\xa8\xba\x58\xbd\xee\x7b\x22\x16\x76\x47\xca\x1a\xda\x31\x4d\x86\x0f\x68\x9e\xa6\xe3\x5b\xf6\xac\x5f\x2f\x8d\x6a\xc4\xe1\xf9\x34\x4c\xfc\x96\x09\xe7\x03\x2a\xb0\xe8\x1c\x4d\x3c\x55\x09\x1d\x61\x3e\xaf\x7a\x8c\x87\xb9\x49\x8d\xf3\x59\x9b\xf2\x80\x49\xb5\x2f\xcb\x03\xb7\x61\xa5\x24\x77\xfa\xef\xc1\x8b\xcd\xe5\x02\x12\xa9\xf7\x1d\x1f\x5e\xba\x6f\x90\xfd\x9d\xd7\xdf\x16\x10\x7f\x6a\x49\x2e\x76\x9c\x66\xa7\x3e\x55\xd6\xc1\x96\xd6\x68\x29\xeb\x1f\x5f\x62\xa7\xd1\x06\xa4\xde\xcf\x60\x5b\x39\x38\x53\x87\x09\x24\x8d\xd5\x5e\x4a\x1f\xfa\xe2\x2f\x63\xbe\x5f\x9f\xb4\x41\xe6\x8c\x40\x3b\xbd\x4a\x5b\x28\x39\x68\xeb\x66\x40\x5d\xd4\x57\x5a\x6b\x4a\x03\x16\x74\x3f\x68\x10\x8e\xbb\xca\x36\xbe\xfa\xd7\xfd\xfd\xcf\xec\xd3\x6a\xf3\xe5\xe6\xdd\x8a\x7d\x5e\x2f\xbf\x2c\x6f\x6e\x97\x6f\x6f\x57\x2f\x82\xd7\x04\x3c\x82\xc5\x1c\xea\x2b\x1a\x32\xb9\x44\x34\xd3\x56\xbd\x46\xa7\x31\xf0\x6a\x6a\x2c\xa2\x7c\xf3\x3d\x69\x38\xf9\x9f\x9f\x68\x92\xf6\x9d\xbc\x99\x98\xbd\x5d\x34\x62\x5f\xd7\xee\x23\x07\xf8\x89\xbb\xb2\x94\x6b\x4d\xe1\xf4\x13\x6a\xac\xce\xea\xa8\xa7\xcd\xf6\xf1\x4a\x32\x0b\x89\x31\x9b\x83\x72\xbd\x1f\xc9\xc0\xe9\x57\xb3\xb8\x49\x19\xf6\x71\xf2\xdf\x00\x00\x00\xff\xff\xdd\xf8\x0c\xad\x04\x15\x00\x00") +var _etcNginxLuaBalancerLua = []byte("\x1f\x8b\x08\x00\x00\x00\x00\x00\x00\xff\xac\x58\x5b\x6f\x1b\xbb\x11\x7e\xd7\xaf\x18\x2c\x10\x40\x8b\xca\x8b\xa6\xe8\x93\x51\x15\x50\x12\xa5\x35\xea\x4b\x60\x3b\x09\x8a\x22\x20\xa8\xdd\x59\x89\x11\x45\x6e\x49\xae\x65\xa1\x68\x7e\xfb\xc1\x50\x4b\x2e\x57\x17\xfb\xe4\x9c\xf3\x14\x6b\x39\x9c\xeb\x37\xdf\x0c\x23\x75\xc9\x25\xa8\xe5\x33\x5b\x70\xc9\x55\x89\x06\xa6\x60\xf0\xbf\xad\x30\x38\xce\xd4\xf2\xb9\x08\xdf\xb3\x7c\xb4\x17\xfe\x6e\xb5\x4a\x85\x4a\xfa\x10\x4f\x4b\xad\x6a\xb1\x6c\x0d\x77\xe2\x40\x2c\x3d\x88\xe2\xad\x13\x32\x95\xa2\xdf\xf1\x50\x9a\xb6\xe4\xe5\x0a\x53\x01\x83\xd6\xed\x8a\x70\x12\x45\x71\xbb\xe1\xa9\x58\xf0\xba\xa0\x83\x28\x65\x9d\x28\xd7\xbb\x54\x6e\xff\x25\x0a\x78\xed\x27\x53\x11\x15\x7a\x91\x2c\x1f\x8d\x2e\x2e\x60\x83\xdc\xb6\x06\x2b\x10\x0a\x2c\x96\x5a\x55\x96\x3e\xd7\xda\x00\x57\x70\xbb\x14\xea\x19\xb6\xda\xac\xd1\x80\xd3\xd0\x88\x72\x0d\x6d\x03\x6e\x85\xa0\x70\x0b\x52\x58\x07\xba\x86\xb6\xb1\xce\x20\xdf\x40\x83\x68\xbc\x02\xe1\x60\x2b\xa4\x04\xc7\xd7\x08\x7f\x23\xf9\x0a\x25\xdf\x41\xab\x28\x5d\xa5\x56\xce\x68\x29\xd1\xc0\xa7\xbb\x87\x47\xac\xbc\xc6\x05\x2f\xd7\xa8\x2a\xd0\x8b\xef\x58\x3a\xb2\x47\x5f\xf7\x3e\xa0\xaa\x1a\x2d\x94\xfb\x3b\xfc\x09\xde\xcd\xde\xff\x6b\x7e\xfb\xe1\x81\x3d\xfc\xfb\xf6\x3d\xbb\xba\x7d\x9c\xdf\x7f\x99\x5d\x77\xf1\x9f\x3e\x84\x29\xbc\x1d\x75\x12\x1f\xe6\x1f\x67\x9f\xaf\x1f\xd9\xf5\x3b\x36\xbb\xfe\x07\x4c\x21\x33\xba\x55\x15\x33\x7a\x21\x54\x16\xa4\xd8\x0d\x4c\xe1\x7f\xff\xf7\x49\x7a\xbc\xfb\x70\x37\x46\xf9\x24\x14\xd6\xa8\x2a\x91\xc3\x16\xa1\xe4\x0a\x1a\xa3\x17\x7c\x21\x77\xc0\x9f\xb4\xa8\xc0\x3a\x6d\x84\x5a\x02\x97\x32\x04\x63\x61\x85\x06\x0b\xf8\x8a\xc0\xa5\x41\x5e\xed\xbc\x14\x52\x68\x1b\x4a\xba\x5b\xa1\x30\x54\xb5\x06\x4b\x27\x9e\x90\xec\x49\xcd\x2b\x88\x25\x14\x9b\x46\xe2\x06\x95\xf3\xb8\xb3\x9d\x7f\x41\xff\x04\xd0\x50\x99\x03\x9e\x0a\x85\xdb\xf1\xdb\x3f\xff\xe5\xaf\xf9\x48\xd4\xa0\xb4\xeb\x3d\x71\x2b\x54\x23\x00\x83\xae\x35\x8a\xae\x69\x33\xce\x6a\x2e\x24\xe5\x5f\x43\x69\x90\x3b\xef\x18\xec\x31\x4b\x20\x08\x97\x2f\x21\x83\xa2\x80\x31\x19\xd3\x06\xb2\x56\xad\x95\xde\xaa\x2c\xcf\x47\xa8\xaa\x90\xb4\xba\x55\xa5\xef\x9a\x25\x3a\x56\xb6\xc6\xa0\x72\xac\x53\x31\xce\x47\x00\x03\xdf\x99\xe2\x1b\xea\x0c\xea\xd1\x27\x6e\x8a\xc6\xe8\xe7\x1d\x0b\x58\xf2\xa7\x87\x57\x60\xda\x7b\xb4\x44\x37\x4e\x35\xe5\xa3\x11\xc0\x30\xe6\x10\x32\x78\x1b\x52\x2f\xc7\xf4\xef\xd7\xd9\xfd\xed\x04\x32\xa5\xa3\xd8\xb0\xe5\x6b\x82\x83\x8f\xde\xc7\xec\xb4\x75\x54\xd6\xa1\x31\x8a\xc6\x47\x1e\x13\xda\x1d\xbf\x9a\x0f\xb9\x60\x5c\x2e\x8f\xd3\x01\xd3\xb3\x69\x3b\x17\x55\x67\x59\x09\x79\xce\x9b\xff\x64\x04\xa6\x8b\x0e\x4c\xd9\x37\x2a\xde\xb0\x01\x4e\xfa\xdb\xc9\xff\xc1\x4e\x4e\x12\x4f\x83\xde\x7d\x36\x0e\xd4\x1e\xa5\x48\x58\x16\x99\x6f\xff\x47\x11\x3f\x85\xba\x84\xfa\xf7\xb2\xd1\x85\x8e\x61\x3b\x0e\xe9\x75\x90\xcd\xf0\xb5\x57\x43\x37\x44\xdd\x8b\xff\x98\x92\xdf\xbd\xb6\xbe\x85\x3a\x89\x82\x57\x95\x41\x4b\xbd\x18\xbe\x34\xda\x38\x2f\xbc\x8f\x15\xfa\x38\x87\x6c\x13\xcb\x26\xea\xbe\x64\xa1\x05\x2e\x56\xdc\xae\x2e\x16\xbb\xec\xdb\x0b\xa1\x0c\x09\x3f\x0c\xbb\xa3\x68\xa8\x34\xf1\xd6\x71\x28\x49\x75\xa2\x4b\x3f\x11\x67\x1f\x44\x88\x73\x0a\x99\x1f\x5c\x2f\x78\x4e\xe7\x87\xfe\x16\xe1\xdc\xe6\xbf\xd3\x83\x1f\xd3\x43\xa6\x7f\x81\x0c\xf6\x1d\x5e\xd4\xda\x6c\xb8\x1b\x67\x6f\x2c\x08\xeb\x53\x66\xdb\x86\x0c\x60\x35\x81\x9a\x4b\x49\xec\x4e\x9e\x12\x5f\xbe\xb1\xd9\xa4\x27\x87\xbd\xd5\x7c\x72\x60\x34\xe5\x89\xdf\x50\xba\xb3\x85\x3b\xdd\x54\x67\x1b\xa0\xc3\xbb\x4d\xf1\x1e\xfe\x98\x40\x62\x70\x48\x22\xaf\xa5\xfd\x14\x75\xd8\x9d\x2a\x23\x2f\x24\x9a\x23\x6f\xdb\x9e\xb7\x0b\xa2\xd2\xc4\xfe\x31\x2b\xfc\x7a\x1a\x7b\xbd\x87\xb4\x49\xd1\x99\xb6\x61\x9a\xd7\x41\x49\x0c\x0a\x25\x06\xd4\xd0\x25\xa8\xdb\x0a\x2e\xe1\x1e\x2d\x3a\xb0\x8e\x46\xa7\xae\x61\xfe\xf5\x66\x06\x0d\xc6\xc1\xf9\x5a\x53\x10\x04\xed\x8a\x1b\xac\xe2\x9a\xca\x48\xe4\xb2\x96\xad\x5d\x31\x2e\xe5\x38\x7f\x51\x90\x49\x6e\x1d\x73\xba\x2d\x57\x58\x31\xee\x0e\x2e\x9e\x1b\x48\x69\x95\xec\x31\xcd\x5b\x56\x71\x47\xeb\xe8\x60\x32\x7a\xbe\x1c\x48\x9c\x20\xfe\xee\xea\x01\x52\x0f\xbb\x40\xaf\x27\xb4\x41\x46\x6d\x30\x85\xa6\x24\xa7\x69\x15\x2f\x2a\x2c\x75\xd5\x03\x63\xaf\x32\x31\xa5\xd7\xa7\x9b\x79\x7e\x7f\x3f\x01\xc8\x4a\xdd\xca\xca\x0b\x36\xdc\x58\xec\x37\x20\x52\x73\x79\x30\xd5\x53\x2f\xf2\xfc\xa4\xcb\xb4\x0a\xb0\x81\xbf\xb4\xb9\x35\x5c\x18\x3b\xbc\x0e\x95\x4e\xa8\xee\xcc\xce\x92\xdc\x28\xf6\x7b\xcb\xd1\x15\x56\xae\xb8\x5a\x22\x5d\x75\xa6\xc5\x51\x20\xf1\xa3\xd9\x0a\x27\x6e\x50\xdc\xf4\x08\x29\x2a\xc4\x86\x95\x7a\xd3\x70\x13\x49\x65\x10\x45\x3e\x64\xfb\xde\x40\xd4\x96\x18\x1a\xf4\xf5\x49\x25\xe7\xd1\xc6\x6b\x87\x86\x1d\x2f\x15\xaf\x0d\xff\x17\x5b\xc7\x8f\x8f\x63\xcd\xd1\x87\x68\x9d\xdd\x14\xd4\xc5\x6c\xff\x8e\xf1\x42\x2c\xac\xcd\x84\x1a\x27\x36\xf4\xcc\x7a\x42\xb3\x1b\x9f\x7e\x3e\x4c\x86\xfd\xd2\xb9\x46\x1a\xce\xc3\xf0\x60\xa4\xf8\x75\x1b\xb6\x2b\xa4\x77\x96\x73\x34\x48\xe8\x21\xd5\x9b\xf6\x28\x1b\x98\xb9\x3c\x18\x31\x68\x4c\x9e\x9f\x0d\xb1\x0c\x2d\xbf\x4f\x6d\xb3\xe2\x36\x2c\xd7\x94\x5d\xff\x3b\x24\xb5\x3b\x9c\x42\x26\xf5\x32\x49\xe9\x71\x36\x0f\x9a\x21\xb9\xfd\x63\x0a\xf1\x49\x99\x1d\x0d\xa6\xee\x75\xb1\x69\xad\x83\x05\x3d\x28\xa4\xdc\x3f\x32\xe3\xb3\x86\xd8\x58\x2f\x27\xb0\x68\x1d\x6c\xb9\xed\x45\xba\x06\xf5\x56\x12\xc6\x4d\x5f\xf8\x7e\x90\x6d\xb4\x41\xe6\x8c\x40\x3b\x7e\x9b\x8c\x8e\x95\xb6\x6e\x02\x34\x9e\x7c\xe3\xf5\xa1\x74\xdc\x41\xe7\x07\xfc\xeb\xb8\x6b\x6d\x97\xab\x7f\x3e\x3e\x7e\x62\x0f\xf3\xfb\x2f\x57\xef\xe7\xec\xf3\xed\xec\xcb\xec\xea\x7a\xf6\xee\x7a\xfe\x22\x97\x8d\xc0\x13\x5a\x84\xd4\xd0\xd1\x00\x6c\x7a\x1c\x8f\x7b\xf7\x3a\x9f\xce\x71\xd9\xd5\xed\xc7\xbb\x49\xe8\xbd\x21\x96\x3a\x85\xfe\xb5\x4d\x8b\x0a\x4d\x20\xbf\x90\x5c\xbe\xb1\xd0\x5a\xc2\x56\xd7\x36\x1e\x40\xbd\xc9\x04\x4c\xa7\x3a\xae\x43\x97\xb4\xf8\x53\x90\x16\x12\x23\xa6\x83\x6b\x83\xff\x11\x38\xde\x96\x8e\xa1\xdc\xe1\x86\xdd\x8c\x7e\x09\x00\x00\xff\xff\x2d\x0a\xc0\x52\xd1\x11\x00\x00") func etcNginxLuaBalancerLuaBytes() ([]byte, error) { return bindataRead( @@ -200,7 +200,7 @@ func etcNginxLuaTestBalancerChash_testLua() (*asset, error) { return a, nil } -var _etcNginxLuaTestBalancer_testLua = []byte("\x1f\x8b\x08\x00\x00\x00\x00\x00\x00\xff\xec\x5a\xdd\x6f\xe4\xb6\x11\x7f\xdf\xbf\x62\xa0\x97\x48\x85\x2a\xdb\x39\x04\x08\x5c\x2c\x8a\x6b\x71\x6d\x0f\x08\xae\xc5\x35\x4d\x1f\x0e\x81\xc0\x95\x66\x77\xd9\xa5\x49\x85\xa4\xbc\x36\x8c\xfd\xdf\x0b\x92\x12\x45\x4a\xda\x0f\xa3\x71\xd2\xbb\x38\xc0\xc5\x2b\x6a\xbe\x38\x1f\xbf\xa1\x46\x62\xa2\x22\x0c\xaa\x7d\x0d\x4b\xa0\xa2\x68\x44\x83\x3c\x4d\x9a\x7d\x9d\x64\xb7\x12\x49\x9d\x7e\xf5\x3b\xf6\x55\xb6\x68\x48\xb5\x23\x1b\x2c\x1a\xa2\xb7\xb0\xb4\xf4\x45\x01\xc9\x95\x14\x42\xaf\xd5\x15\xea\xea\x8a\x6f\x28\x7f\xb8\x62\x2d\xb9\xfa\x63\xc1\x5a\xf2\x87\xc4\x50\x84\x7c\x8b\x85\x53\xb6\x22\x8c\xf0\x0a\x65\x0e\x77\xa2\xda\x95\xd5\x7f\x94\xe0\xfd\x6f\xc1\xd7\x74\xd3\x5d\x28\x4d\xab\xdd\x63\x77\xb1\x22\xd5\x0e\x79\xad\xba\x4b\x26\xdb\x8a\x54\x5b\xcc\x81\x89\x6a\xd7\x2f\x9a\x9f\x0b\x70\x17\x7c\xf3\x50\x8e\x34\xe1\xfe\x8e\xf4\x46\xac\x5b\x5e\x69\x2a\x38\xd4\xb4\xd2\xe5\x06\x39\x4a\xa2\x85\x4c\xef\x09\x53\xd9\x02\xc0\x51\x95\xe6\x2e\x2c\xe1\x09\xca\x92\xf2\x1a\x1f\xcc\xef\x05\xd8\xff\x36\x68\xee\xf4\x72\x52\x85\x6c\x9d\xc3\x0e\x1f\xb3\xee\x3e\x80\x44\xdd\x4a\x0e\xe6\x4e\x51\x1a\xc1\x9f\x76\xf8\xf8\x63\x77\x1b\x79\x9d\x77\x3f\xd5\x11\x49\x39\xdc\x13\x36\x88\x83\xb1\x24\x58\x1a\x82\xe0\x7e\xa7\x50\xcb\x16\x73\xe0\x94\xe5\xb0\x26\x4c\xe1\x54\x63\x8d\x0c\x35\x5e\x6e\xfe\xad\x42\x9d\x5a\x8b\x38\xf5\x16\x05\xf2\xd6\xac\x55\xdb\x92\x30\x36\x16\x39\x96\x36\x65\xb5\xdb\x71\x3b\x51\x76\xe9\xb0\x70\xff\xbc\x7a\x7d\x87\x9a\x68\xb2\x62\x98\x3e\x85\xd4\x87\xdc\xc5\x27\x5b\x20\xaf\x27\x71\xed\x12\x26\x08\x2d\x27\x77\x98\x1b\xd5\x8d\xa0\x5c\xab\x1c\xd8\xaa\x24\x6c\x93\x0d\xba\x5c\x68\x0d\x1d\x2c\xed\x1f\x67\xa4\x67\x81\x65\xc0\x6e\x6f\x7d\x4a\x98\x20\xf5\xef\xbb\x44\x4b\x4c\x48\x9c\xd4\xdc\xee\x22\x30\xac\xc6\x35\x69\x99\x2e\x43\x61\x46\xdf\x13\xa9\x6b\x89\xca\x5c\x26\xd7\xd7\xd7\x45\xf7\x2f\xc9\xa1\x11\xd2\xe4\x45\xf2\xed\xf5\xb7\xd7\xc9\x21\x3f\x4a\x7b\x13\xd3\xde\x18\xda\xc3\x58\x6d\x5f\x3f\x9d\x56\x5b\x0f\x52\xf6\xcb\xb0\x9c\xf1\x57\x32\x22\x4a\xf2\xe9\x26\x72\x48\xa4\x68\x79\x5d\x4a\xb1\xa2\x3c\xc9\x7c\xf9\x99\x5a\xbb\x40\x7a\x48\x76\x44\xbe\x21\x31\x82\x0f\x93\x10\x53\x4e\x75\x9a\xf5\x1a\x2d\x8e\x98\xed\x1d\xfc\x8a\x45\x93\x68\xc9\x61\x4a\xb4\x14\x02\x45\x74\xc3\x28\x8e\xe5\x6d\x89\xda\x46\x2b\x81\x57\x47\x38\x32\xf6\xbb\x37\xb3\x47\x2e\x8f\x24\x1c\xf7\x41\xd5\x40\x9a\xf5\xd9\x18\x6b\x30\xa9\xe4\x0a\xc3\xc0\x9c\xe7\xee\x2e\x7c\xd1\x79\x6e\x5f\x62\x2d\x3f\x45\xd3\xc9\xf4\xf8\x79\xde\x2c\x4b\x35\x70\x96\x7f\x2d\xf8\x66\xc0\x45\xb5\x25\x12\xeb\x00\x26\x83\xf4\x28\x95\x26\x16\x75\x46\xbe\x7a\x3a\x64\x3d\x1a\xf4\x81\xe8\x9d\x7f\x21\x65\xc9\x88\xd2\xa5\x16\x6d\xb5\xc5\xba\x24\xfa\x04\xe7\xc1\xfd\xb9\x27\x2e\xd8\x79\xe7\xc5\xcd\x69\x27\xfe\xfb\xed\xc7\x0f\xa6\xbe\xf6\x44\xf2\xc4\x2d\xbd\xff\xf0\x97\xbf\x9b\x25\xca\xd7\xa2\x5b\x7a\xf7\xf1\xa3\x59\x41\x29\xbb\x85\xbf\x7d\xff\xfd\x3f\xca\x7f\xbe\xfb\xf8\xc3\xfb\x3f\xbf\x2b\xff\xf5\xe1\xed\x0f\x6f\xdf\x7f\xf7\xf6\x4f\xdf\xbd\x83\x25\x7c\x73\xfd\xa6\xf3\x60\xdf\x23\x0d\x92\x60\xfd\x29\xe1\x9b\x87\xa2\xdf\x9d\x45\x94\x49\x9a\xce\x30\x49\x54\xfa\xb1\xe8\x93\x6b\x60\xeb\x57\x66\x58\x6c\xc1\x0c\x94\xf6\xf2\xb8\x64\x51\xed\x02\xa9\xa2\xda\xcd\x90\xf6\xf6\x15\xb6\x66\x3d\xb5\xed\xbb\x27\xa8\x6d\x5d\x05\x86\x98\xcb\x39\x7b\x6d\x39\xb7\x92\x98\x18\x05\xe4\x76\x79\x86\xde\xd5\xfa\x40\xe8\xae\x17\x43\xea\xc0\x12\x24\xfe\xd4\x52\x89\xa9\x37\x26\xe9\xba\x49\x8d\xaa\x92\x74\x85\x69\xf2\xc9\x67\x9a\x46\xa5\x7f\x4c\xf2\x20\x4f\x16\xb6\x79\xb7\x4d\x1a\x2d\xc1\x80\x4c\xc8\xeb\x6c\xb1\x00\xd0\x48\x64\x2d\xf6\x7c\x4c\xe8\x10\xad\xb3\xdc\x82\x73\x1c\x7e\x83\xaf\x71\x64\xf3\x2e\x6e\xc3\x1d\x13\x99\x1c\x46\xce\xcf\x47\xee\xca\xa1\xf7\xc7\xc1\x2a\x5e\x0b\x09\x34\xef\x35\x97\xb6\xe7\x51\x0e\xb4\x21\x54\xaa\xb4\x37\x28\x83\x5a\x74\xf5\x36\xf2\x6e\xc8\x68\x3c\xcc\x29\xeb\x7b\x65\xb0\xed\xc1\x8b\x43\xb0\x09\x63\x69\x76\x3b\x76\xe3\x11\x47\xce\x60\x74\xa1\x50\x97\x77\x42\x62\xa9\x25\xb5\x3e\x9b\x01\x29\x67\xc6\x71\xfe\xaa\x95\x12\xb9\x2e\x1b\xb4\x69\x70\x5e\x82\x71\x6a\x41\xd6\x1a\x65\x2f\xe8\x34\x5b\xef\x01\x80\x15\xae\x8d\xb1\x48\xaa\xed\x74\x77\x0e\x3d\x8b\x0d\xea\xb2\xd9\x12\x85\x81\x27\xfd\x4d\x07\xa9\xc5\x04\x48\x8b\xfe\x30\xf4\x74\x88\x19\x7a\x6c\x0b\xed\xef\xfb\x88\x67\x1a\x37\xa8\x90\xd8\x65\x4a\x41\xd5\xd0\x2f\xbd\xe5\x2b\xbf\x55\x7b\xb6\x9c\xd9\xf0\x10\x74\xbb\xa5\x25\x13\x9b\x69\xb4\xcf\xf8\x65\xd6\x33\x53\x7c\x4e\x8c\xec\x20\x54\x83\x11\x00\x54\xa7\x89\x3b\x8b\x2d\x4d\xf0\x72\xb0\x8d\x22\x0e\xe1\x9e\x28\x30\x09\x89\xf5\x9c\x85\xa1\x43\x8b\x46\x8a\x87\xc7\xb2\x6d\x94\x96\x48\xee\xca\xee\x90\x38\x73\x8a\x59\x78\x6e\x57\xdc\x53\xb5\xa5\x6a\x8c\x4b\x55\xf3\x58\x08\x9e\x7a\x09\x39\x24\x11\x59\x92\x0d\xa2\x88\x52\x28\x75\xb1\x25\xaa\xe4\xa2\x44\x29\x85\x54\x69\x54\x53\xd9\x98\x56\x35\x8f\xe9\xbc\xee\xac\xd8\x13\x55\xba\x7d\xa7\xd9\x69\xd7\x05\x59\x77\xd4\x83\x5c\xe8\x9f\xc3\x8b\xc1\x49\xf3\x73\xf1\x21\x17\x7a\xd6\x8f\xa7\x0b\x22\x40\xf7\x97\xa9\x0a\xaf\xe0\x7c\x69\x44\xf1\xb5\x68\x68\x22\xaa\xda\xaa\x42\xa5\xd6\x2d\x63\x8f\x06\x98\x5f\x2a\xae\xc3\x63\x81\x9e\x09\xe8\xf0\xcc\x9f\x6c\x50\x27\xd9\x88\x39\xee\x03\x33\xfc\xf1\x08\x20\x89\xe9\x67\xc5\x85\x6d\xe1\x32\x81\x21\xc7\xcf\x90\x6c\x23\x87\x84\x95\x5a\xee\xa9\xde\xa6\x77\x44\x57\x5b\x83\xcc\xee\x81\x38\xcb\xa7\x4e\x9e\x15\x3c\x75\xd6\x54\xf6\xcd\x51\xce\xb1\x5f\xa6\xbc\xa3\x67\x57\xf7\xd0\x1a\xf8\x23\x6e\x42\x1b\xd4\xb7\x15\x43\x22\x83\x6c\x3a\xd7\xe8\x2f\x64\x08\x4d\xf5\x2c\xaf\x61\x71\x63\x02\x37\x1f\x38\x03\xf9\x0e\x47\x5f\x06\x0b\x8e\x74\xca\xe1\x88\x35\x3d\x5c\x05\x27\x8e\xb9\xf9\xc7\xcd\xcd\x68\xfe\xf1\x26\x39\x58\xd8\x7b\x85\x9a\x17\xca\xe9\x28\x86\xbf\x6e\x56\xbb\xe0\xbb\xa8\x1f\xcb\x6a\x77\x84\x5d\xba\xa1\xa8\x4b\x24\x05\x4a\x0b\x89\x75\x30\xd9\x23\xbc\xfe\x25\xdb\xdf\x33\x8e\xd9\xc6\xf0\xa0\x8f\xc7\xbc\x26\x78\xfd\x26\x66\xcf\x02\xb3\x23\xc3\x71\xc9\x7c\xfd\x5a\x32\xbf\x95\x36\xe0\x0b\xe6\xeb\xcb\x0a\xa6\x16\xe8\x0e\xf8\xfd\x38\x7e\x54\x38\x7e\x66\xab\x40\x0b\x37\xec\x03\x37\x0b\xfe\x7c\x6b\x86\x53\x76\x94\x59\x1d\x61\x5e\x45\x13\x80\xd7\x42\xfa\xe2\x0b\x29\x3a\xe6\xce\x17\xd2\x9a\x50\xa6\x60\xbf\x45\x0e\x5c\xf4\x49\x00\xf8\x40\x95\x56\x2f\x54\x1e\x93\x31\xcf\xd3\xe1\x35\x19\x4f\x24\x23\x31\xcf\xda\x3f\xb5\x84\xa5\x76\xd2\xa6\x89\x6e\x55\x0e\xdf\x5c\xbf\xf9\xfc\xd3\xf6\xb9\xb3\x09\x03\xf2\x94\x83\x1b\x2b\x30\xb1\x01\x21\xe1\xd4\xa4\xc2\x64\x78\x7f\x9c\x72\xbe\x3e\x99\xd3\x67\x46\x16\x5c\x34\x98\x44\xa8\x1b\x44\xd3\x8a\x8f\x23\x69\x3c\xdb\x2a\x0d\x2b\xec\x46\x4f\xc6\x76\x3f\xd8\x17\xd2\xec\x20\x87\x55\xab\x83\x19\x1f\x50\x7e\x0b\x56\xd1\xbc\x43\x4e\xce\xad\x29\xa7\xba\xdc\x0b\xb9\x43\xf9\x9c\xf1\x75\xb7\x7b\x4d\xef\xdc\xdb\x45\xbf\x3d\xbc\x47\x19\x75\x2f\xca\x35\xca\x7b\xc2\x9c\xe4\x61\xca\xda\xf2\x2a\xcd\x02\xcf\x44\x63\x5d\xfb\x2e\xa0\xa8\xb1\x12\x75\xe4\xd8\x07\xcf\xff\xf0\xdc\x91\xf4\x33\xc6\xc5\x73\x69\xa4\x1e\x79\xe5\xa9\x66\x3d\xd5\x9d\x32\xcc\x19\x1b\xeb\x01\x1f\x0d\x23\x50\xd5\xbf\x92\x39\x32\x4b\x0c\x5e\xf9\xd8\x94\xea\x35\x95\x35\xd1\x64\x36\xb5\x26\x6f\xc0\x4f\x34\x68\x75\x0e\x13\x95\xc5\xc4\x0b\x11\x27\x48\x99\x93\x70\xa2\x42\x38\x39\x56\xb6\x67\x46\x77\x6d\x53\x13\x8d\xca\x77\x19\xeb\xd5\x97\x72\xe9\xd3\xc4\xa9\xc5\xf8\x83\x82\xc3\xf4\x04\x35\xd7\x9b\x46\x20\x71\xf6\x55\xc7\x39\xbd\xff\x63\x60\x63\x66\x29\x4b\xf7\xa1\x4c\xcc\x7a\xc6\xd6\x1c\x12\xc7\x35\x91\x67\x1f\x9c\xdd\xa7\x32\x27\x04\x46\x2f\xb6\x73\x48\xfc\xb7\x35\xf3\xf2\x98\x7e\xae\xcc\xf1\xcb\xf2\x91\x8e\x17\x4a\x6e\x4f\x03\x70\x41\xdb\x3c\x17\xe7\xc2\x7d\xcc\x33\x66\x9c\xb5\x24\x0a\xe3\x25\x3d\xfb\x22\xe5\xc7\xdf\x15\xf8\x68\x1c\x2d\xe8\x29\x4f\x14\xc5\xe7\x02\x81\x4b\x94\xff\x0b\x04\x88\x3e\xfb\xf9\x45\x31\x20\xd4\xfc\x8a\x02\x5f\x32\x0a\x84\x91\xfe\x15\x70\x60\xa2\xfe\x62\x24\x38\xa5\xed\x59\xd0\x70\x89\xa0\xd9\xa3\xad\xfd\xdf\x7f\x03\x00\x00\xff\xff\x3f\x47\xc5\x71\xf3\x2b\x00\x00") +var _etcNginxLuaTestBalancer_testLua = []byte("\x1f\x8b\x08\x00\x00\x00\x00\x00\x00\xff\xec\x5a\x5b\x8f\xdb\xb8\x15\x7e\xf7\xaf\x38\xd0\xcb\x4a\x85\xaa\x99\xd9\x60\x81\xc5\x14\x46\x91\x16\x69\x1b\x60\x91\x16\xe9\x76\xfb\x10\x2c\x04\x5a\x3a\xb6\x59\x73\x48\x2d\x49\x8d\xc7\x18\xf8\xbf\x17\x24\x25\x8a\xba\xf9\xb2\xdd\x49\x13\x24\x01\x26\xb6\xa8\x73\xe3\x77\xae\xa2\xcc\x44\x41\x18\x14\xfb\x12\x96\x40\x45\x56\x89\x0a\x79\x1c\x55\xfb\x32\x4a\xee\x25\x92\x32\xfe\xe6\x77\xec\x9b\x64\x51\x91\x62\x47\x36\x98\x55\x44\x6f\x61\x69\xe9\xb3\x0c\xa2\x1b\x29\x84\x5e\xab\x1b\xd4\xc5\x0d\xdf\x50\xfe\x74\xc3\x6a\x72\xf3\xc7\x8c\xd5\xe4\x0f\x91\xa1\x08\xf9\x16\x0b\xa7\x6c\x45\x18\xe1\x05\xca\x14\x1e\x44\xb1\xcb\x8b\xff\x28\xc1\xdb\xef\x82\xaf\xe9\xa6\xb9\x50\x9a\x16\xbb\x43\x73\xb1\x22\xc5\x0e\x79\xa9\x9a\x4b\x26\xeb\x82\x14\x5b\x4c\x81\x89\x62\xd7\x2e\x9a\xaf\x0b\x70\x17\x7c\xf3\x94\x0f\x34\xe1\xfe\x81\xb4\x46\xac\x6b\x5e\x68\x2a\x38\x94\xb4\xd0\xf9\x06\x39\x4a\xa2\x85\x8c\x1f\x09\x53\xc9\x02\xc0\x51\xe5\xe6\x2e\x2c\xe1\x19\xf2\x9c\xf2\x12\x9f\xcc\xf7\x05\xd8\x7f\x1b\x34\x77\x5a\x39\xb1\x42\xb6\x4e\x61\x87\x87\xa4\xb9\x0f\x20\x51\xd7\x92\x83\xb9\x93\xe5\x46\xf0\x87\x1d\x1e\x7e\x6e\x6e\x23\x2f\xd3\xe6\xab\x9a\x91\x94\xc2\x23\x61\x9d\x38\x18\x4a\x82\xa5\x21\x08\xee\x37\x0a\xb5\xac\x31\x05\x4e\x59\x0a\x6b\xc2\x14\x8e\x35\x96\xc8\x50\xe3\xe5\xe6\xdf\x2b\xd4\xb1\xb5\x88\x53\x6f\x51\x20\x6f\xcd\x6a\xb5\xcd\x09\x63\x43\x91\x43\x69\x63\x56\xbb\x1d\xb7\x13\x65\x97\x8e\x0b\xf7\xe7\xd5\xeb\x07\xd4\x44\x93\x15\xc3\xf8\x39\xa4\x3e\xa6\xce\x3f\xc9\x02\x79\x39\xf2\x6b\x13\x30\x81\x6b\x39\x79\xc0\xd4\xa8\xae\x04\xe5\x5a\xa5\xc0\x56\x39\x61\x9b\xa4\xd3\xe5\x5c\x6b\xe8\x60\x69\x3f\x9c\x91\x9e\x05\x96\x01\xbb\xbd\xf5\x21\x62\x82\x94\xbf\x6f\x02\x2d\x32\x2e\x71\x52\x53\xbb\x8b\xc0\xb0\x12\xd7\xa4\x66\x3a\x0f\x85\x19\x7d\xcf\xa4\x2c\x25\x2a\x73\x19\xdd\xde\xde\x66\xcd\x5f\x94\x42\x25\xa4\x89\x8b\xe8\xfb\xdb\xef\x6f\xa3\x63\x3a\x4b\x7b\xd7\xa7\xbd\x33\xb4\xc7\xa1\xda\x36\x7f\x1a\xad\x36\x1f\xa4\x6c\x97\x61\x39\x81\x57\x34\x20\x8a\xd2\xf1\x26\x52\x88\xa4\xa8\x79\x99\x4b\xb1\xa2\x3c\x4a\x7c\xfa\x99\x5c\xbb\x40\x7a\x48\x36\x23\xdf\x90\x18\xc1\xc7\x91\x8b\x29\xa7\x3a\x4e\x5a\x8d\xb6\x8e\x98\xed\x1d\xfd\x8a\xad\x26\xbd\x25\x57\x53\x7a\x4b\x61\xa1\xe8\xdd\x30\x8a\x7b\x0b\x12\x95\x3e\x4c\xd3\x06\xf0\x0e\x0a\xca\xd0\x01\xde\xde\xb6\x84\xf9\x92\xc2\x71\x1f\xa4\x0f\xc4\x49\x1b\x96\x7d\x0d\x26\xa6\x5c\x86\x98\x7a\xe7\xb9\x9b\x0b\x9f\x7d\x9e\xdb\xe7\x5a\xcd\x4f\xd1\x34\x32\x7d\x21\x3d\x6f\x96\xa5\xea\x38\xf3\xbf\x66\x7c\xd3\x15\x48\xb5\x25\x12\xcb\xa0\x5e\xb6\xb8\xb5\xb8\x0e\x70\x7a\x3e\x26\xe9\x14\x65\xce\x88\xd2\xb9\x16\x75\xb1\xc5\x32\x27\xfa\x04\xe7\xd1\x7d\x3c\x12\xe7\x9b\xb4\xc1\x65\x73\x1a\x96\x7f\xbf\x7e\xff\xce\xa4\xce\x9e\x48\x1e\xb9\xa5\xb7\xef\xfe\xf2\x77\xb3\x44\xf9\x5a\x34\x4b\x6f\xde\xbf\x37\x2b\x28\x65\xb3\xf0\xb7\x1f\x7f\xfc\x47\xfe\xcf\x37\xef\x7f\x7a\xfb\xe7\x37\xf9\xbf\xde\xbd\xfe\xe9\xf5\xdb\x1f\x5e\xff\xe9\x87\x37\xb0\x84\xef\x6e\x5f\x35\x98\xb4\xed\xcf\x14\x09\x2c\x3f\x44\x7c\xf3\x94\xb5\xbb\xb3\xc5\x62\x14\x81\x13\x4c\x36\xec\xb2\x36\x5c\x3a\xb6\x76\x65\x82\xc5\xe6\x42\x47\x69\x2f\xe7\x25\x8b\x62\x17\x48\x15\xc5\x6e\x82\xb4\xb5\x2f\xb3\xe9\xe8\xa9\x6d\x4b\x3d\x41\x6d\x35\x74\xe4\xfd\x0c\x9a\x32\xdc\xa6\x6c\x2d\x89\x71\x56\xb0\x01\xbb\x3c\x41\xef\xf2\xb9\x23\x74\xd7\x8b\x2e\x86\x60\x09\x12\x7f\xa9\xa9\xc4\xd8\x5b\x15\x35\x1d\xa3\x44\x55\x48\xba\xc2\x38\xfa\xe0\x43\x4e\xa3\xd2\x3f\x47\x69\x10\x30\x0b\xdb\xa0\xeb\x2a\xee\x2d\x41\x57\x7d\x90\x97\xc9\x62\x01\xa0\x91\xc8\x52\xec\xf9\x90\xd0\x55\xad\xc6\x72\x5b\x80\xfb\x71\x60\x6a\x68\xdf\xc5\x69\xe3\xc0\xee\x8e\x71\x51\x0a\x03\x2f\xa4\x03\xb8\x52\x68\xf1\x38\x5a\xc5\x6b\x21\x81\xa6\xad\xe6\xdc\xf6\x35\xca\x81\x56\x84\x4a\x15\xb7\x06\x25\x50\x8a\x26\xf1\x06\xe8\x86\x8c\x06\x61\x4e\x59\xdb\x0f\x83\x6d\x77\x28\x7a\xeb\x0a\xc2\x58\x9c\xdc\x0f\x61\x9c\x01\x72\xa2\x0e\x67\x0a\x75\xfe\x20\x24\xe6\x5a\x52\x8b\xd9\x44\xfd\x71\x66\xcc\xf3\x17\xb5\x94\xc8\x75\x5e\xa1\x0d\x83\xf3\x12\x0c\xa8\x19\x59\x6b\x94\xad\xa0\xd3\x6c\x2d\x02\x00\x2b\x5c\x1b\x63\x91\x14\xdb\xf1\xee\x5c\x61\xcc\x36\xa8\xf3\x6a\x4b\x14\x06\x48\xfa\x9b\x6d\xcd\x0a\xcd\x69\x2b\x7e\xd6\x0e\x3d\xc3\x56\x12\x12\x3b\xc7\x67\x54\x75\x2d\xce\x1b\xb2\xf2\x96\xdb\x71\x70\xc2\xfe\xce\x87\xd6\xc2\x25\x13\x9b\xb1\xf3\xce\x6c\x73\x72\xa3\xe3\xba\x1b\x19\xd9\x01\xf2\x9d\x11\x00\x54\xc7\x91\x1b\x9f\x96\xc6\x17\x29\xd8\x06\xd0\xf7\xc8\x9e\x28\x30\xf1\x85\xe5\x94\x85\x21\xa0\x59\x25\xc5\xd3\x21\xaf\x2b\xa5\x25\x92\x87\xbc\x99\xeb\x26\x06\x8f\x85\xe7\x76\xb9\x3a\x56\x9b\xab\xca\x40\xaa\xaa\x43\x26\x78\xec\x25\xa4\x10\xf5\xc8\xa2\xa4\x13\x45\x94\x42\xa9\xb3\x2d\x51\x39\x17\x39\x4a\x29\xa4\x8a\x7b\x29\x92\x0c\x69\x55\x75\x88\xa7\x75\x27\xd9\x9e\xa8\xdc\xed\x3b\x4e\x4e\x43\x17\x0c\x64\xb3\x08\x72\xa1\x7f\x0b\x14\x83\xe1\xf0\x73\xc1\x90\x0b\x3d\x89\xe3\xe9\x84\x08\x8a\xf5\xcb\x64\x85\x57\x70\x3e\x35\x7a\xfe\xb5\xc5\xcd\x78\x54\xd5\x45\x81\x4a\xad\x6b\xc6\x0e\xa6\xce\xbe\x94\x5f\xbb\x49\x5e\x4f\x38\xb4\x7b\x4c\x8f\x36\xa8\xa3\x64\xc0\xdc\x2f\xeb\x13\xfc\xfd\xa7\xf6\xa8\x4f\x3f\x29\x2e\xac\xf2\x97\x09\x0c\x39\xc2\x60\x9b\x98\x50\xb2\x71\x1f\x08\xaa\xe9\xa5\x8f\x6e\x81\x4b\x7f\x75\x48\x0f\x60\x0f\xeb\x41\xbe\xa7\x7a\x1b\x3f\x10\x5d\x6c\x4d\xfd\x77\x4f\xca\x49\x3a\x76\xe5\xa4\xe0\xb1\x4b\xc6\xb2\xef\x66\x39\x87\xe8\x8f\x79\x07\xc8\x38\x48\x86\xa8\xfb\x56\xb7\x41\x7d\x5f\x30\x24\x32\x88\xd9\x73\xd3\xc1\x85\x0c\xa1\xa9\x9e\xe5\xb7\x76\xfe\xf8\x59\xfc\xab\xf3\x3b\x64\x1c\x24\x67\xda\x97\xeb\x09\x2f\x53\xd7\x66\xba\x7e\x37\xfd\x5d\xed\xf2\xbb\xbb\x81\xcb\x5f\x35\x2e\xff\x62\xca\xe6\xc7\x8e\xe9\x9e\x0f\xff\xbf\x51\xed\x9c\xef\xbc\x3e\x17\xd5\x6e\x1c\x5f\xba\x33\x59\x17\x48\x0a\x94\x16\x12\xcb\xe0\x60\x91\xf0\xf2\x63\xb6\xf2\x2b\x1e\x19\x8c\xe1\xbd\x1a\x16\xf2\x1a\xe7\xb5\x9b\x98\x9c\x6b\x26\xab\xe4\x30\x65\xbe\xfd\x9a\x32\x5f\x4a\x1b\xf0\x09\xf3\xed\x65\x09\x53\x0a\x74\x0f\x2b\xed\xdb\x80\x41\xe2\xf8\x23\x63\x05\x5a\x80\x9d\x8c\xc1\x1d\x45\x7f\xbe\x39\xc3\x29\x9b\x65\x56\x33\xcc\xab\xde\xe1\xc4\x17\x93\x48\x5f\x47\xf6\x8f\x38\xb2\x4f\xa7\xeb\x9a\x50\xa6\x60\xbf\x45\x0e\x5c\xb4\xa1\x06\xf8\x44\x95\x56\x2f\x94\x84\xa3\x83\xb1\xe7\xe3\x97\x13\xf2\xbf\x22\x18\x89\xc4\x1c\x7f\xa9\x09\x8b\x0d\xee\x4a\x13\x5d\xab\x14\xbe\xbb\x7d\xf5\xf9\x87\xed\xb5\xa7\x39\xa6\x95\x50\x0e\xee\x20\x86\x89\x0d\x08\x09\xa7\xce\x76\x4c\x84\xb7\x43\x9b\xc3\xfa\x64\x4c\x9f\x39\xe4\xe1\xa2\xc2\x68\xae\xb4\x58\xf1\x7d\x4f\x1a\x64\x6b\xa5\x61\x85\xcd\x61\x9d\xb1\xdd\xbf\xd9\x10\xd2\xec\x20\x85\x55\xad\x83\x53\x51\xa0\xfc\x1e\xac\xa2\x69\x40\x4e\x1e\xdc\x53\x4e\x75\xbe\x17\x72\x87\xf2\x9a\xf3\xfb\x66\xf7\x9a\x3e\xb8\xd7\xa2\x7e\x7b\xf8\x88\xb2\xd7\x23\x29\xd7\x28\x1f\x09\x73\x92\xbb\x73\xe9\x9a\x17\x71\x12\x20\xd3\x3b\x08\xb7\x2f\x43\xb2\x12\x0b\x51\xf6\x80\x7d\xf2\xfc\x4f\xd7\x9e\xc9\x5f\x71\xc0\x3e\x15\x46\xea\xc0\x0b\x4f\x35\x89\x54\x33\xcb\x98\x49\x1e\xcb\xae\x3e\x1a\x46\xa0\xaa\x7d\x27\x35\x73\xfa\x1a\xbc\xf3\xb2\x21\xd5\x6a\xca\x4b\xa2\xc9\x64\x68\x8d\x5e\xf3\x9f\x18\x03\xd4\xb9\x9a\xa8\x6c\x4d\xbc\xb0\xe2\x04\x21\x73\xb2\x9c\xa8\xb0\x9c\xcc\xa5\xed\x99\xc3\xce\xba\x2a\x89\x46\xe5\xbb\x8c\x45\xf5\xa5\x20\x7d\x1e\x81\x9a\x0d\x7f\x35\x71\x1c\xcf\x69\x57\xf4\xa6\x0b\xfd\xd0\x67\xb6\x4f\xbf\xee\xe7\x36\x3d\xde\x26\x05\xdd\x5b\xf7\xac\xf7\x06\x3d\x85\xc8\xff\x3e\x67\x5a\x1e\xd3\xd7\xca\x1c\xbe\x95\x1f\xe8\xf8\xc8\x03\xda\x94\x16\x89\x26\x32\xe7\x67\xe4\x97\x89\x6e\x4f\x03\x70\x41\xdf\x3c\x17\x60\x99\xfb\xc9\xd2\x90\x71\xfe\x9d\x87\x77\xe2\x6c\x9a\x8d\x79\x7a\xce\xbf\x36\x3d\x5d\x7c\x7d\x12\x79\xd9\xfb\xc5\xd1\xd7\xcc\x3c\x97\x99\x9f\x5e\xdc\x87\x0e\xfc\x5f\x23\xff\x94\xfe\xab\x52\xe1\x12\x41\x93\x03\x96\xfd\xef\xbf\x01\x00\x00\xff\xff\x35\x19\x10\x9e\x5e\x2b\x00\x00") func etcNginxLuaTestBalancer_testLuaBytes() ([]byte, error) { return bindataRead( @@ -240,7 +240,7 @@ func etcNginxLuaTestUpSh() (*asset, error) { return a, nil } -var _etcNginxLuaUtilLua = []byte("\x1f\x8b\x08\x00\x00\x00\x00\x00\x00\xff\xa4\x56\x4d\x6f\xe3\x36\x10\xbd\xfb\x57\x0c\x12\x14\xeb\x60\x65\x7d\xd9\xd9\x34\x02\x7c\x08\xb6\x05\x7a\x68\x4e\x5d\xec\xc5\x48\x05\x5a\x1a\xc9\xac\x29\x52\x25\x47\x4a\x82\x7e\xfc\xf6\x62\x28\xc9\x96\x77\xb3\x45\x81\x2e\xb0\x96\x34\x7c\x7c\x33\x9c\x79\x33\x8c\x32\x85\x50\x90\x3f\xc2\x16\xfe\xf8\x6b\x31\x7c\x39\xb2\x52\xd7\xb9\x42\x0d\xdb\xf1\x23\x54\xa8\x17\x8b\xaa\xd3\x05\x49\xa3\x21\x7f\x0c\x5d\xab\x24\xe5\xad\x90\x76\xc9\x3f\x01\x38\x6c\xd1\x0a\x32\xf6\x66\x01\x30\x10\x49\xd8\x02\x2f\x66\x95\xd4\xe5\xf2\x02\x20\x2b\x5e\xdd\x82\x96\x0a\xe8\x80\x7a\x01\x00\x60\x91\x3a\xab\x61\xe0\xd3\x52\x2d\x00\x50\x39\xf4\x6b\x03\xa3\x16\x0d\x4e\xa4\xae\xdb\x2f\x93\x00\x24\xac\x20\xb9\x99\x61\x7a\xa1\xba\x0b\x90\x84\xf7\x90\x04\xb0\x1a\x51\xa3\x17\xa6\x0a\x06\x30\xfb\xd1\xe5\x82\xff\x2f\x56\x2b\xa0\x83\x74\x20\x9b\x56\x61\x83\x9a\x84\x3f\xb1\x74\x40\xe2\x88\x1a\x2a\x6b\x1a\x06\x1d\x88\x5a\x97\x45\xd1\x33\xee\x43\x61\x8b\x83\xec\x31\x34\xb6\xe6\xef\x28\x8d\x93\x75\x92\xa6\xb7\xf1\x5d\xbc\x59\x6f\x22\x86\x66\x51\xe4\xb4\x6c\x5b\x24\x17\xaa\x4e\x14\xa6\x1c\xe0\x93\x31\xfa\x01\xb1\xcd\x3f\x9a\xa6\x15\x56\x3a\xa3\x73\x53\xe5\x9f\x9e\x4d\xfe\x99\xe3\x73\xf9\x9a\x5d\x0a\x5d\x42\x63\x4a\x59\x49\x2c\xa1\x32\x16\x3a\x87\x20\xf5\x10\x6f\x6b\xcd\x6f\x58\xd0\x58\xc2\x53\xa5\x4a\xa6\x2d\x3c\x2d\x2e\x29\x09\x80\xd2\x00\x64\xad\x8d\xc5\xbc\xa1\x73\xa9\xe8\x35\x81\x2d\xd0\x6b\xcb\xa8\xb9\x39\x3d\x99\xd3\xb1\x6e\x0c\xfd\x7b\xeb\x97\xb8\x72\x53\x3e\x2b\xa1\x1c\xfa\x3c\x02\xac\x56\xa0\x8d\x5e\x91\xd8\x2b\xf4\xbb\x1d\x14\x42\xc3\x1e\xa1\x94\x16\x0b\x52\xaf\x30\xc6\x54\x5e\x70\xbe\xf3\x3b\xde\xf9\x93\x32\xff\xcc\x34\x77\x45\x09\x4b\x87\xd2\xb3\x37\xe1\xe0\x19\x95\xe2\xa7\xc7\x3b\x78\x3e\xc8\xe2\x00\x07\xd1\x23\x6f\x85\x06\x49\x34\x48\x07\x53\x42\x9e\xe3\xef\xa7\x03\x36\x04\x5b\xa8\x91\x78\xdd\xef\x1c\x8f\x2f\x2b\xd0\x86\xce\x99\x1a\x92\x3f\x3d\x42\xe6\xf8\xb7\x90\xb8\x3a\xc7\x24\xe8\x13\xae\x0f\x0b\xd1\x31\x2f\x94\x66\xae\x53\x9f\xda\x74\x77\x4c\x9e\xbc\x55\x56\xde\x34\xf4\x84\xb1\xde\xff\x45\xf9\xfa\x24\xe8\xd3\x9b\x6f\x26\x7d\xe6\x39\x0d\xfa\x74\xe6\x39\xfd\xd2\xb3\xaf\x75\xb2\x3b\xa6\x67\xcf\xc9\xff\xf6\x3c\x65\xc2\x76\xe8\x5b\x29\x7f\x0c\xe7\x24\xb0\xbd\xe0\xbc\x9c\x26\xd2\xe5\x7b\x25\xf4\x71\xe9\xc8\x8f\x87\x91\xcb\x91\x9d\x85\x75\x9e\x4b\x1e\xc6\x2b\xf1\xa9\x69\xc7\x26\xd3\xb5\xd4\x2f\xbe\xb3\x50\x47\xa5\x29\x9c\xef\xbe\x48\xd7\x2f\x39\xbf\xe4\x5d\xeb\xc8\xa2\x68\xf2\xc6\x94\x9d\xc2\xf0\x40\x8d\xba\xc6\x17\xc1\xdd\xce\x34\x1f\x1f\x3e\xff\xf8\xf0\x29\x03\xcf\xc3\x5d\x5f\xcb\x5e\xea\x1a\x4c\x47\x90\x81\xd4\x8e\x50\x94\x60\x2a\x08\xc0\x19\xaf\x2c\x76\x02\x7c\xbe\x67\x6b\x74\xcd\x1c\x49\x7a\x17\xc6\x61\x1c\x26\x59\xfa\x21\xb9\xbd\x83\xec\x2b\x4b\x00\xba\x7e\x09\x7b\x61\xc3\x53\x3c\xa2\x2c\x2d\x6f\x4e\xe3\x18\x32\xff\xfb\x06\xc8\x91\xa0\xce\x31\x2c\x0e\x3d\x8e\x1f\x6f\xe0\x2c\xba\xd6\x68\x87\x39\xc9\x06\xdf\x18\xdb\x27\x60\x2f\xec\xb2\x17\x76\xa6\xf8\x5e\xd8\xaf\x06\xb2\x96\xea\x34\x8f\x7d\xa9\xc7\xe1\x30\x5c\x1a\x83\xe6\x7a\xd6\x5b\x2f\x6c\x56\x37\x82\x8a\xc3\xf2\x6a\xf7\xeb\x77\xee\xcf\xe0\xe9\xfd\xd5\x49\x7c\x2c\x33\x6e\xe9\xab\xec\xea\xec\x02\x80\x76\xd7\xf4\x3e\x79\x82\x2d\xf4\xde\xf2\x96\xa6\x86\x32\xcf\x0f\x52\x23\xe5\x95\xb4\x8e\x72\x3f\xc2\xa7\x53\x9c\x23\xfb\xf6\x61\x59\x4b\x3e\x6e\x59\xc1\x35\x79\x19\x5d\x48\x9b\xe5\x76\xe9\x7e\x97\x3c\xfd\xf7\xdb\x21\x9b\x5f\x0f\xb5\xa4\x43\xb7\x0f\x0b\xd3\x44\xaa\x13\x55\xa7\xa7\xc7\x5e\x99\x7d\xd4\x08\x47\x68\xa3\xaa\xd3\x7c\x29\x5c\xff\xbc\xf6\x73\xfe\x97\x9f\x1e\x32\x88\x37\xc5\xfd\x7d\x75\x5f\xac\xef\xd7\x78\xbb\x11\x1f\xe2\x8d\x28\x4b\xdc\xec\xd3\xdb\xfd\xdd\xfd\xa6\xda\x7c\x9f\xc4\x1b\x8c\xcb\xf8\xad\x81\x5f\x98\xf6\x75\x69\xac\xac\xcf\x19\xe1\xaf\x9c\x27\xf1\x34\xce\x2f\x97\x79\xc7\x90\x90\x19\xf0\x72\xf8\x8e\xd5\x62\xe4\x54\x77\xfe\xc7\xb5\xf7\x7b\x8e\xf8\x1a\x0c\x6f\xc3\x05\x2c\x35\x68\x7c\xa1\xc1\xe6\xe5\x33\xe9\xe0\x4c\xb4\xbb\x88\x96\x29\x6e\x9e\xc6\x39\x71\xb6\x7a\xba\x9b\x71\xe7\x28\x8e\xe9\xaf\x82\x53\x3c\x8c\xfc\x52\x35\xfe\x50\xb3\x49\x34\x42\xa7\xd7\xc5\x62\xc4\xe5\x8f\x8b\x7f\x02\x00\x00\xff\xff\x3c\xac\x02\x53\x07\x09\x00\x00") +var _etcNginxLuaUtilLua = []byte("\x1f\x8b\x08\x00\x00\x00\x00\x00\x00\xff\xa4\x56\x4d\x6f\xe3\x36\x13\xbe\xeb\x57\x0c\x92\xf7\xc5\x3a\x58\x59\x5f\x76\x36\x8d\x00\x1f\x82\x6d\x81\x1e\x9a\x5e\xba\xd8\x8b\xe1\x12\xb4\x34\x92\x59\x4b\xa4\x96\xa4\x94\x04\xfd\xf8\xed\xc5\x50\x1f\x96\x36\xd9\xa2\x40\x73\xb0\xa4\xe1\xc3\x99\xe1\xcc\xc3\x67\x52\xa9\x8c\x57\xc0\x1e\x61\x07\xbf\xff\xe9\xf5\x5f\xc6\x6a\x21\x4b\x56\xa1\x84\xdd\xf0\x11\x54\x28\x97\xab\xa6\x3d\x5e\x56\x4d\x7b\xf4\xbc\xf5\x1a\x4a\xd1\xa1\x04\x2e\xe1\xe7\x52\xc8\x67\xe8\xb8\x16\xfc\x58\x21\x88\x00\xe1\x7f\x1a\xbf\xb4\x68\x2c\x6b\xb5\x20\xac\xb0\xa0\xd1\xb6\x5a\x1a\xe8\x78\xd5\x22\xa8\x02\x64\xf9\x1c\x74\x5c\xef\x67\xd0\x83\x57\xb4\x32\xb3\x42\x49\x60\x8f\x41\xd5\x72\x26\xcb\x67\xd6\x71\xbd\x1a\x9e\x37\x1e\x40\x9f\x59\xc7\x35\x93\xbc\xc6\x29\x2f\x4a\x72\x84\xf9\x90\x10\xb2\x0f\x39\x05\x1a\xb7\x1c\x3c\x94\xb9\xb7\x08\x65\x9a\x4a\x58\xd6\x70\xa1\x57\xf4\xe3\x83\xc1\x06\x35\xb7\x6a\x16\x51\xc0\x0e\x68\x31\x2d\x84\xcc\x57\x0b\x80\x28\x68\x75\x07\x52\x54\x60\x4f\x28\x3d\x80\x29\x7a\xef\x4f\x8a\xca\x03\xc0\xca\xa0\x5b\xeb\x3d\x0e\xf9\x3b\xa7\x94\x7d\xec\x83\x80\x35\xc4\x37\x33\x4c\x5f\xae\x19\x48\xc0\x7b\x88\x7d\x58\x0f\xa8\xf1\x8c\xbc\x46\xbf\x07\x53\x1c\x99\xf7\x67\x5c\xaf\xc1\x9e\x84\x01\x51\x37\x15\xd6\x28\x2d\x77\x27\x16\x06\x2c\x3f\xa3\x84\x42\xab\x9a\x40\x27\x6b\x1b\x93\x86\xe1\x13\x1e\x03\xae\xb3\x93\xe8\x30\x50\xba\xa4\xef\x30\x89\xe2\x4d\x9c\x24\xb7\xd1\x5d\xb4\xdd\x6c\x43\x82\xa6\x61\x68\xa4\x68\x1a\xb4\x86\xba\x94\xa9\xbc\x87\x8f\xc6\xf0\x7b\xc4\x86\x7d\x54\x75\xc3\xb5\x30\x4a\x32\x55\xb0\x4f\x4f\x8a\x7d\xa6\xfc\x0c\xdb\x50\x48\x2e\x73\xa8\x55\x2e\x0a\x81\x39\x14\x4a\x43\x6b\x10\x84\xec\xf3\x6d\xb4\xfa\x0d\x33\x3b\xb0\x70\xea\x54\x4e\x6e\x33\xe7\x16\x57\x36\xf6\xc1\x26\x3e\x88\x52\x2a\x8d\xac\xb6\x97\x56\xd9\x97\x18\x76\x60\x5f\x1a\x42\xcd\xcd\xc9\x64\x4e\x86\xbe\x11\xf4\xaf\x9d\x5b\xa2\xce\x8d\xf5\x2c\x78\x65\xd0\xd5\x11\x60\xbd\x06\xa9\xe4\xda\x3a\x76\xd3\x6e\x03\x19\x97\x70\x44\xc8\x85\xc6\xcc\x56\x2f\x30\xe4\x94\x2f\x7c\xbe\x73\x3b\xde\xb9\x93\x92\xff\x99\x69\x1e\xca\xc6\x44\x1d\x9b\x5c\xa2\x71\x03\x4f\x58\x55\xf4\x74\x78\x03\x4f\x27\x91\x9d\xe0\xc4\x3b\xa4\xad\x50\xa3\xe5\x35\xda\x93\xca\x81\x31\xfc\x32\x1d\xb0\xb6\xb0\x83\x12\x2d\xad\xbb\x9d\xc3\xf1\x45\x01\x52\xd9\x4b\xa5\xfa\xe2\x8f\x8f\x80\x7c\xfc\x53\x4a\xd4\x9d\x73\xec\x77\x31\xf5\x87\x88\x68\xc8\x2f\xe4\x6a\xce\x53\x57\xda\x64\x7f\x8e\x0f\xce\x2a\x0a\x67\xea\xef\x84\xd2\x2e\xfe\xa2\x7d\x5d\xec\x77\xc9\xcd\x37\x8b\x3e\x8b\x9c\xf8\x5d\x32\x8b\x9c\x7c\x1d\xd9\xf5\x3a\xde\x9f\x93\x4b\xe4\xf8\x3f\x47\x1e\x2b\xa1\x5b\x74\x57\x89\x3d\x06\x73\x27\xb0\x5b\xf8\x5c\xaa\x89\x30\xec\x58\x71\x79\x5e\x19\xab\x67\x3a\x64\xac\x9e\xa5\x75\x11\x5e\x07\xa3\x95\x68\xba\xb4\xc3\x25\x93\xa4\xac\xee\x66\xa1\x0c\x73\x95\x19\x77\xfb\x42\x52\x39\x7a\x61\x6d\x63\xac\x46\x5e\xb3\x5a\xe5\x6d\x85\xc1\xc9\xd6\xd5\x35\x3e\x73\xba\xed\xe4\xe6\xe3\xc3\xe7\x1f\x1e\x3e\xa5\xe0\xfc\xd0\xad\x2f\x45\x27\x64\x09\xaa\xb5\x90\x82\x90\xc6\x22\xcf\x49\x8b\x7d\x30\xca\x31\x8b\x82\x00\x9d\xef\x49\x2b\x59\x92\x8f\x38\xb9\x0b\xa2\x20\x0a\xe2\x34\xf9\x10\xdf\xde\x41\xfa\xca\xe2\x8f\x0a\x1b\x4c\xf9\xf0\x3c\xd7\xb4\x39\x89\x22\x48\xdd\xef\x1b\x20\x63\xb9\x6d\x0d\xc1\xa2\xc0\xe1\xe8\xf1\x06\x4e\xa3\x69\x94\x34\xc8\xac\xa8\xf1\x0d\xd9\x9e\x80\x34\x28\x86\x21\x31\x30\xbe\xe3\xfa\x95\x20\x4b\x51\x4d\x7a\xec\x5a\x3d\x88\x43\x3f\x15\x7b\xce\x75\xc4\xb7\x8e\xeb\xb4\xac\xb9\xcd\x4e\xab\xab\xfd\xaf\xff\x37\x7f\xf8\x87\xf7\x57\x13\xf9\x88\x66\x74\xa5\xaf\xd2\xab\x4b\x08\x00\xbb\xbf\xb6\xef\xe3\x03\xec\xa0\x73\x96\xb7\x38\xf5\x7a\xfe\x94\x68\x59\x21\xb4\xb1\xcc\x49\xf8\x6a\x31\xea\x28\xb3\x6f\x1f\x96\xb8\xe4\xf2\x16\x05\x5c\x5b\x47\xa3\x05\xb5\x89\x6e\xcb\xf0\xfb\xf8\xf0\xef\xa7\x43\x3a\x1f\x0f\xa5\xb0\xa7\xf6\x18\x64\xaa\x0e\xab\x96\x17\xad\x1c\x1f\xc7\x4a\x1d\xc3\x9a\x1b\x8b\x3a\x2c\x5a\x49\x43\xe1\xfa\xa7\x8d\xd3\xf9\x5f\x7e\x7c\x48\x21\xda\x66\xf7\xf7\xc5\x7d\xb6\xb9\xdf\xe0\xed\x96\x7f\x88\xb6\x3c\xcf\x71\x7b\x4c\x6e\x8f\x77\xf7\xdb\x62\xfb\x5d\x1c\x6d\x31\xca\xa3\xb7\x04\x3f\x53\xcd\xcb\x4a\x69\x51\x5e\x2a\x42\x5f\x8c\x94\x78\x94\xf3\xe5\x32\xed\xe8\x0b\x32\x03\x2e\xc5\x77\xe8\x16\x21\xc7\xbe\xd3\x1f\xf5\xde\xed\x39\xe3\x8b\xdf\xbf\xf5\x03\x58\x48\x90\xf8\x6c\x7b\x9b\xa3\xcf\xc8\x83\x8b\xa3\xfd\x22\x5b\x72\x71\x73\x18\x74\xe2\x62\x75\xee\x6e\x86\x9d\x03\x39\xc6\xff\x0a\xa6\x7c\x08\xf9\x35\x6b\xdc\xa1\x66\x4a\x34\x40\xc7\x57\xcf\x1b\x70\xec\xd1\xfb\x3b\x00\x00\xff\xff\x49\x67\x72\xb9\xe8\x09\x00\x00") func etcNginxLuaUtilLuaBytes() ([]byte, error) { return bindataRead( @@ -392,8 +392,8 @@ func AssetNames() []string { // _bindata is a table, holding each asset generator, mapped to its name. var _bindata = map[string]func() (*asset, error){ - "etc/nginx/lua/balancer/chash.lua": etcNginxLuaBalancerChashLua, "etc/nginx/lua/balancer/ewma.lua": etcNginxLuaBalancerEwmaLua, + "etc/nginx/lua/balancer/resty.lua": etcNginxLuaBalancerRestyLua, "etc/nginx/lua/balancer.lua": etcNginxLuaBalancerLua, "etc/nginx/lua/configuration.lua": etcNginxLuaConfigurationLua, "etc/nginx/lua/sticky.lua": etcNginxLuaStickyLua, @@ -451,8 +451,8 @@ var _bintree = &bintree{nil, map[string]*bintree{ "nginx": &bintree{nil, map[string]*bintree{ "lua": &bintree{nil, map[string]*bintree{ "balancer": &bintree{nil, map[string]*bintree{ - "chash.lua": &bintree{etcNginxLuaBalancerChashLua, map[string]*bintree{}}, "ewma.lua": &bintree{etcNginxLuaBalancerEwmaLua, map[string]*bintree{}}, + "resty.lua": &bintree{etcNginxLuaBalancerRestyLua, map[string]*bintree{}}, }}, "balancer.lua": &bintree{etcNginxLuaBalancerLua, map[string]*bintree{}}, "configuration.lua": &bintree{etcNginxLuaConfigurationLua, map[string]*bintree{}}, diff --git a/internal/ingress/controller/template/template.go b/internal/ingress/controller/template/template.go index 68ef01961e..f1cff1abd0 100644 --- a/internal/ingress/controller/template/template.go +++ b/internal/ingress/controller/template/template.go @@ -189,7 +189,6 @@ func buildLuaSharedDictionaries(s interface{}, dynamicConfigurationEnabled bool, if dynamicConfigurationEnabled { out = append(out, "lua_shared_dict configuration_data 5M", - "lua_shared_dict round_robin_state 1M", "lua_shared_dict locks 512k", "lua_shared_dict balancer_ewma 1M", "lua_shared_dict balancer_ewma_last_touched_at 1M", diff --git a/rootfs/etc/nginx/lua/balancer.lua b/rootfs/etc/nginx/lua/balancer.lua index 7e88406833..b7d104a193 100644 --- a/rootfs/etc/nginx/lua/balancer.lua +++ b/rootfs/etc/nginx/lua/balancer.lua @@ -3,25 +3,21 @@ local json = require("cjson") local configuration = require("configuration") local util = require("util") local lrucache = require("resty.lrucache") -local resty_lock = require("resty.lock") local ewma = require("balancer.ewma") local sticky = require("sticky") -local chash = require("balancer.chash") +local resty_balancer = require("balancer.resty") -- measured in seconds -- for an Nginx worker to pick up the new list of upstream peers -- it will take + BACKENDS_SYNC_INTERVAL local BACKENDS_SYNC_INTERVAL = 1 -local ROUND_ROBIN_LOCK_KEY = "round_robin" local DEFAULT_LB_ALG = "round_robin" -local round_robin_state = ngx.shared.round_robin_state - local _M = {} -local round_robin_lock = resty_lock:new("locks", {timeout = 0, exptime = 0.1}) - +-- TODO(elvinefendi) we can probably avoid storing all backends here. We already store them in their respective +-- load balancer implementations local backends, err = lrucache.new(1024) if not backends then return error("failed to create the cache for backends: " .. (err or "unknown")) @@ -64,42 +60,31 @@ local function balance() end if backend["upstream-hash-by"] then - local endpoint = chash.balance(backend) + local endpoint = resty_balancer.balance(backend) + if not endpoint then + return nil, nil + end + return endpoint.address, endpoint.port end - if lb_alg == "ip_hash" then - -- TODO(elvinefendi) implement me - return backend.endpoints[0].address, backend.endpoints[0].port - elseif lb_alg == "ewma" then + if lb_alg == "ewma" then local endpoint = ewma.balance(backend.endpoints) return endpoint.address, endpoint.port end if lb_alg ~= DEFAULT_LB_ALG then - ngx.log(ngx.WARN, tostring(lb_alg) .. " is not supported, falling back to " .. DEFAULT_LB_ALG) + ngx.log(ngx.WARN, string.format("%s is not supported, falling back to %s", tostring(lb_alg), DEFAULT_LB_ALG)) end - -- Round-Robin - round_robin_lock:lock(backend.name .. ROUND_ROBIN_LOCK_KEY) - local last_index = round_robin_state:get(backend.name) - local index, endpoint = next(backend.endpoints, last_index) - if not index then - index = 1 - endpoint = backend.endpoints[index] - end - local success, forcible - success, err, forcible = round_robin_state:set(backend.name, index) - if not success then - ngx.log(ngx.WARN, "round_robin_state:set failed " .. err) - end - if forcible then - ngx.log(ngx.WARN, "round_robin_state:set valid items forcibly overwritten") + local endpoint = resty_balancer.balance(backend) + if not endpoint then + return nil, nil end + if is_sticky then sticky.set_endpoint(endpoint, backend) end - round_robin_lock:unlock(backend.name .. ROUND_ROBIN_LOCK_KEY) return endpoint.address, endpoint.port end @@ -107,22 +92,17 @@ end local function sync_backend(backend) backends:set(backend.name, backend) - -- also reset the respective balancer state since backend has changed - round_robin_state:delete(backend.name) + local lb_alg = backend["load-balance"] or DEFAULT_LB_ALG + + if backend["upstream-hash-by"] or lb_alg == "round_robin" then + resty_balancer.reinit(backend) + end -- TODO: Reset state of EWMA per backend - local lb_alg = backend["load-balance"] or DEFAULT_LB_ALG if lb_alg == "ewma" then ngx.shared.balancer_ewma:flush_all() ngx.shared.balancer_ewma_last_touched_at:flush_all() end - - -- reset chash for this backend - if backend["upstream-hash-by"] then - chash.reinit(backend) - end - - ngx.log(ngx.INFO, "syncronization completed for: " .. backend.name) end local function sync_backends() @@ -161,7 +141,7 @@ end function _M.init_worker() _, err = ngx.timer.every(BACKENDS_SYNC_INTERVAL, sync_backends) if err then - ngx.log(ngx.ERR, "error when setting up timer.every for sync_backends: " .. tostring(err)) + ngx.log(ngx.ERR, string.format("error when setting up timer.every for sync_backends: %s", tostring(err))) end end @@ -186,12 +166,10 @@ function _M.call() local ok ok, err = ngx_balancer.set_current_peer(host, port) if ok then - ngx.log( - ngx.INFO, - "current peer is set to " .. host .. ":" .. port .. " using lb_alg " .. tostring(get_current_lb_alg()) - ) + ngx.log(ngx.INFO, + string.format("current peer is set to %s:%s using lb_alg %s", host, port, tostring(get_current_lb_alg()))) else - ngx.log(ngx.ERR, "error while setting current upstream peer to: " .. tostring(err)) + ngx.log(ngx.ERR, string.format("error while setting current upstream peer to %s", tostring(err))) end end diff --git a/rootfs/etc/nginx/lua/balancer/chash.lua b/rootfs/etc/nginx/lua/balancer/chash.lua deleted file mode 100644 index 493b51b8c6..0000000000 --- a/rootfs/etc/nginx/lua/balancer/chash.lua +++ /dev/null @@ -1,48 +0,0 @@ -local resty_chash = require("resty.chash") -local util = require("util") -local string_sub = string.sub - -local _M = {} -local instances = {} - --- given an Nginx variable i.e $request_uri --- it returns value of ngx.var[request_uri] -local function get_lua_ngx_var(ngx_var) - local var_name = string_sub(ngx_var, 2) - return ngx.var[var_name] -end - -function _M.balance(backend) - local instance = instances[backend.name] - if not instance then - return nil - end - - local key = get_lua_ngx_var(backend["upstream-hash-by"]) - local endpoint_string = instance:find(key) - - local address, port = util.split_pair(endpoint_string, ":") - return { address = address, port = port } -end - -function _M.reinit(backend) - local instance = instances[backend.name] - - local nodes = {} - -- we don't support weighted consistent hashing - local weight = 1 - - for _, endpoint in pairs(backend.endpoints) do - local endpoint_string = endpoint.address .. ":" .. endpoint.port - nodes[endpoint_string] = weight - end - - if instance then - instance:reinit(nodes) - else - instance = resty_chash:new(nodes) - instances[backend.name] = instance - end -end - -return _M diff --git a/rootfs/etc/nginx/lua/balancer/resty.lua b/rootfs/etc/nginx/lua/balancer/resty.lua new file mode 100644 index 0000000000..4ecef9a760 --- /dev/null +++ b/rootfs/etc/nginx/lua/balancer/resty.lua @@ -0,0 +1,69 @@ +local resty_roundrobin = require("resty.roundrobin") +local resty_chash = require("resty.chash") +local util = require("util") + +local _M = {} +local instances = {} + +local function get_resty_balancer_nodes(endpoints) + local nodes = {} + local weight = 1 + + for _, endpoint in pairs(endpoints) do + local endpoint_string = endpoint.address .. ":" .. endpoint.port + nodes[endpoint_string] = weight + end + + return nodes +end + +local function init_resty_balancer(factory, instance, endpoints) + local nodes = get_resty_balancer_nodes(endpoints) + + if instance then + instance:reinit(nodes) + else + instance = factory:new(nodes) + end + + return instance +end + +function _M.balance(backend) + local instance = instances[backend.name] + if not instance then + ngx.log(ngx.ERR, "no LB algorithm instance was found") + return nil + end + + local endpoint_string + if backend["upstream-hash-by"] then + local key = util.lua_ngx_var(backend["upstream-hash-by"]) + endpoint_string = instance:find(key) + else + endpoint_string = instance:find() + end + + local address, port = util.split_pair(endpoint_string, ":") + return { address = address, port = port } +end + +function _M.reinit(backend) + local instance = instances[backend.name] + local factory = resty_roundrobin + if backend["upstream-hash-by"] then + factory = resty_chash + end + + if instance then + local mt = getmetatable(instance) + if mt.__index ~= factory then + ngx.log(ngx.INFO, "LB algorithm has been changed, resetting the instance") + instance = nil + end + end + + instances[backend.name] = init_resty_balancer(factory, instance, backend.endpoints) +end + +return _M diff --git a/rootfs/etc/nginx/lua/test/balancer_test.lua b/rootfs/etc/nginx/lua/test/balancer_test.lua index 5bc9720222..04a5ababaf 100644 --- a/rootfs/etc/nginx/lua/test/balancer_test.lua +++ b/rootfs/etc/nginx/lua/test/balancer_test.lua @@ -49,7 +49,7 @@ local function init() mock_sticky = {} mock_ngx_balancer = {} mock_ewma = {} - mock_chash = {} + mock_resty_balancer = {} mock_backends = dict_generator(default_backends) mock_lrucache = { new = function () return mock_backends end @@ -63,7 +63,6 @@ local function init() } _G.ngx = { shared = { - round_robin_state = dict_generator({}), balancer_ewma = dict_generator({}), balancer_ewma_last_touched_at = dict_generator({}), }, @@ -79,7 +78,7 @@ local function init() package.loaded["cjson"] = mock_cjson package.loaded["resty.lock"] = mock_lock package.loaded["balancer.ewma"] = mock_ewma - package.loaded["balancer.chash"] = mock_chash + package.loaded["balancer.resty"] = mock_resty_balancer package.loaded["configuration"] = mock_config package.loaded["sticky"] = mock_sticky balancer = require("balancer") @@ -106,7 +105,6 @@ describe("[balancer_test]", function() before_each(function() _G.ngx.get_phase = nil - _G.ngx.shared.round_robin_state._vals = {} _G.ngx.var = {} mock_backends._vals = default_backends mock_sticky.is_sticky = function(b) return false end @@ -148,6 +146,7 @@ describe("[balancer_test]", function() local set_more_tries_spy = spy.on(mock_ngx_balancer, "set_more_tries") local set_current_peer_spy = spy.on(mock_ngx_balancer, "set_current_peer") + mock_resty_balancer.balance = function(b) return {address = "000.000.000", port = "8080"} end assert.has_no_errors(balancer.call) assert.spy(backend_get_spy).was_called_with(match.is_table(), "mock_rr_backend") assert.spy(set_more_tries_spy).was_called_with(1) @@ -157,6 +156,7 @@ describe("[balancer_test]", function() mock_ngx_balancer.set_more_tries:clear() mock_ngx_balancer.set_current_peer:clear() + mock_resty_balancer.balance = function(b) return {address = "000.000.001", port = "8081"} end assert.has_no_errors(balancer.call) assert.spy(backend_get_spy).was_called_with(match.is_table(), "mock_rr_backend") assert.spy(set_more_tries_spy).was_called_with(1) @@ -205,6 +205,7 @@ describe("[balancer_test]", function() local set_more_tries_spy = spy.on(mock_ngx_balancer, "set_more_tries") local set_current_peer_spy = spy.on(mock_ngx_balancer, "set_current_peer") + mock_resty_balancer.balance = function(b) return {address = "000.000.000", port = "8080"} end assert.has_no_errors(balancer.call) assert.spy(backend_get_spy).was_called_with(match.is_table(), "mock_rr_backend") assert.spy(set_more_tries_spy).was_called_with(1) @@ -261,17 +262,16 @@ describe("[balancer_test]", function() it("lb_alg=round_robin, updates backend when sync is required", function() mock_config.get_backends_data = function() return { default_backends.mock_rr_backend } end mock_backends._vals = {} - _G.ngx.shared.round_robin_state._vals = default_backends.mock_rr_backend local backend_set_spy = spy.on(mock_backends, "set") - local rr_delete_spy = spy.on(_G.ngx.shared.round_robin_state, "delete") local ewma_flush_spy = spy.on(_G.ngx.shared.balancer_ewma, "flush_all") local ewma_lta_flush_spy = spy.on(_G.ngx.shared.balancer_ewma_last_touched_at, "flush_all") + mock_resty_balancer.balance = function(b) return {address = "000.000.000", port = "8080"} end + mock_resty_balancer.reinit = function(b) return end assert.has_no_errors(balancer.init_worker) assert.spy(backend_set_spy) .was_called_with(match.is_table(), default_backends.mock_rr_backend.name, match.is_table()) - assert.spy(rr_delete_spy).was_called_with(match.is_table(), default_backends.mock_rr_backend.name) assert.spy(ewma_flush_spy).was_not_called() assert.spy(ewma_lta_flush_spy).was_not_called() end) @@ -279,17 +279,14 @@ describe("[balancer_test]", function() it("lb_alg=ewma, updates backend when sync is required", function() mock_config.get_backends_data = function() return { default_backends.mock_ewma_backend } end mock_backends._vals = {} - _G.ngx.shared.round_robin_state._vals = default_backends.mock_ewma_backend local backend_set_spy = spy.on(mock_backends, "set") - local rr_delete_spy = spy.on(_G.ngx.shared.round_robin_state, "delete") local ewma_flush_spy = spy.on(_G.ngx.shared.balancer_ewma, "flush_all") local ewma_lta_flush_spy = spy.on(_G.ngx.shared.balancer_ewma_last_touched_at, "flush_all") assert.has_no_errors(balancer.init_worker) assert.spy(backend_set_spy) .was_called_with(match.is_table(), default_backends.mock_ewma_backend.name, match.is_table()) - assert.spy(rr_delete_spy).was_called_with(match.is_table(), default_backends.mock_ewma_backend.name) assert.spy(ewma_flush_spy).was_called_with(match.is_table()) assert.spy(ewma_lta_flush_spy).was_called_with(match.is_table()) end) diff --git a/rootfs/etc/nginx/lua/util.lua b/rootfs/etc/nginx/lua/util.lua index 53fda849d6..5edcef9a29 100644 --- a/rootfs/etc/nginx/lua/util.lua +++ b/rootfs/etc/nginx/lua/util.lua @@ -1,5 +1,13 @@ local _M = {} local string_len = string.len +local string_sub = string.sub + +-- given an Nginx variable i.e $request_uri +-- it returns value of ngx.var[request_uri] +function _M.lua_ngx_var(ngx_var) + local var_name = string_sub(ngx_var, 2) + return ngx.var[var_name] +end function _M.split_pair(pair, seperator) local i = pair:find(seperator)