APIcast
APIcast copied to clipboard
Threescale Util fails the current request if redis connection is not initiated successfully
Redis utility here seems to not be designed with resiliency in mind, in case redis fails to connect for any reason, subsequent call to _M.error() will invoke ngx.say and ngx.exit and terminate the current request.
Version
V2.9
Steps To Reproduce
- Import
redisfromthreescale_utilsmodule. - call
connect_redis, e.g. local red = ts:connect_redis()`. - run APICast instance not connected to redis (like staging) or simulate redis disconnect.
- Entire request fails.
Current Result
Entire request terminates.
Expected Result
Provide at least an key of option argument to be like secondary or resilient, and if passed _M.error() is not invoke if redis is not available and request gracefully continues.