openresty / openresty/lua-resty-core
keepalive not working in top of balancer_by_lua_block
Nobody has claimed this yet.
- Dominant language
- Lua
- Stars
- 853
- Forks
- 286
- Avg merge
- 35m
- Merged PRs (30d)
- 1
Description
if balancer config like below, keepalive not working
upstream backend {
keepalive 10; # connection pool
server 0.0.0.1;
balancer_by_lua_block {
--logic
}
}
and must be changed order of directive keepalive like this:
upstream backend {
server 0.0.0.1;
balancer_by_lua_block {
--logic
}
keepalive 10; # connection pool
}
but in nginx configthe order of directive in block has no effect on behavior of nginx
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing the two upstream configurations shown in the issue, comparing connection reuse when keepalive appears before or after balancer_by_lua_block. Trace the balancer and keepalive handling in the relevant lua-nginx-module integration points; done means both directive orders provide the same keepalive behavior.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- lua, nginx
- Domain
- backend
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 30/100