-
Notifications
You must be signed in to change notification settings - Fork 2.8k
feat: rate limiting plugins support setting keepalive for redis policy #12861
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
base: master
Are you sure you want to change the base?
Conversation
| local delay, incoming_err = util.incoming(self, red, key, commit) | ||
| local ok, err = red:set_keepalive(conf.keepalive_timeout, conf.keepalive_pool) | ||
| if not ok then | ||
| core.log.error("set keepalive failed:", err) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| core.log.error("set keepalive failed:", err) | |
| core.log.error("set keepalive failed: ", err) |
apisix/utils/rediscluster.lua
Outdated
| local config = { | ||
| name = conf.redis_cluster_name, | ||
| serv_list = {}, | ||
| keepalive_timeout = conf.keepalive_timeout, --redis connection pool idle timeout |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| keepalive_timeout = conf.keepalive_timeout, --redis connection pool idle timeout | |
| keepalive_timeout = conf.keepalive_timeout, -- redis connection pool idle timeout |
apisix/utils/rediscluster.lua
Outdated
| name = conf.redis_cluster_name, | ||
| serv_list = {}, | ||
| keepalive_timeout = conf.keepalive_timeout, --redis connection pool idle timeout | ||
| keepalive_cons = conf.keepalive_pool, --redis connection pool size |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| keepalive_cons = conf.keepalive_pool, --redis connection pool size | |
| keepalive_cons = conf.keepalive_pool, -- redis connection pool size |
t/plugin/limit-conn-redis.t
Outdated
| if err then | ||
| core.log.error("failed to create redis cli: ", err) | ||
| ngx.say("failed to create redis cli: ", err) | ||
| return nil,err |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| return nil,err | |
| return nil, err |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please update the English document simultaneously.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
Description
redis_timeoutonly applies tosend_timeout. This pr will make the values ofconnect_timeoutandsend_timeoutconsistent withredis_timeout.Which issue(s) this PR fixes:
relate issue: #12817
Checklist