replace load balance from upstream to lua script.