lua-resty-balancer icon indicating copy to clipboard operation
lua-resty-balancer copied to clipboard

A generic consistent hash implementation for OpenResty/Lua

Results 15 lua-resty-balancer issues
Sort by recently updated
recently updated
newest added

# Description **tl;dr**: With the use of a test script, we can observe a momentary dip in traffic down to zero due to the weighted round robin algorithm. ## Setup...

@doujiang24 , the gcd implement is not fair enough, the following is more better: ```lua function _M:next() local servers=self.servers local selectedIdx for i = 1, #servers do servers[i]['cweight'] = servers[i]['weight']...

Hi, Thank you for this awesome plugin. I have got a specific scenario. I'm trying to DNS Loadbalance (sticky sessions) a websocket service. I've tried with static IPs, and this...

I have a content_by_lua block which execute when below location run. ``` location / { content_by_lua ' local client = require "readuser" client.ReadUser(); '; } ``` I want to do...

Hello, nginx has support for configuring upstream as backup which allows to fail over. How can I achieve similar results with resty balancer? Either using weight (1-0) or other flag?...

How to set the number of virtual node and the bucket size

I need a consistent hash of lua version as same as tengine C version

I integrated the level077/lua-resty-upstream-etcd into my project. The function b.set_current_peer(server) in the lua-resty-upstream-etcd/balancer.lua pass the 10.20.22.85:8010 and nil into the function of _M.set_current_peer(addr, port) in lua-resty-core/lib/ngx/balancer.lua. So the default port...