Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Threescale Util fails the current request if redis connection is not initiated successfully #1316

Open
abarrak opened this issue Oct 24, 2021 · 0 comments

Comments

@abarrak
Copy link

abarrak commented Oct 24, 2021

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
  1. Import redis from threescale_utils module.
  2. call connect_redis, e.g. local red = ts:connect_redis()`.
  3. run APICast instance not connected to redis (like staging) or simulate redis disconnect.
  4. 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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant