Add an option to pass a request to the next server on Lua error
tnt_next_upstream option supports only few default strategies to pass a request to the next server. In some cases one may need to do it on Lua errors.
Possible solutions are:
- Return HTTP 500 on Lua errors and use default mask
http_500. - Add a special mask for this case (e.g.
lua_error).
Almost done but before push I wish to test this feature with balancer_by_lua - from ngx_lua.
Implementation details: -- nginx.conf { tnt_next_upstream tnt_error [masks..]; }
@toogle Sytax/Option is ok for you. And also I'm interested, did you use balancer_by_lua?
No, we didn't. Anyway, it would be great to have such functionality directly in upstream module instead of relying on ngx_lua.
We also need box.error/error support in protocol, to correct balancing stream in upstream to avoid loss data by tarantool errors.