openresty / openresty/lua-upstream-nginx-module
The name returned by get_upstreams is sometimes with a port, sometimes without.
Nobody has claimed this yet.
- Dominant language
- C
- Stars
- 512
- Forks
- 153
- Avg merge
- 1h 29m
- Merged PRs (30d)
- 2
Description
Hello
I use the function get_upstreams to output all the named upstream groups.
I found a strange situation.
In our online environment, most of the displayed upstream names have port 80, and a few do not have port 80.
I would like to know why this is the case and how to remove the port.
nginx version: openresty/1.11.2.2
upstream test1-pool:80:
1 addr = 10.18.75.163:1189, weight = 1, fail_timeout = 10, name = 10.18.75.163:11889, max_fails = 1
2 addr = 10.18.96.47:1189, weight = 1, fail_timeout = 10, backup = true, name = 10.18.96.47:11889, max_fails = 1
upstream test2-pool:
1 addr = 10.18.38.32:8080, weight = 1, fail_timeout = 10, backup = true, name = 10.18.38.32:8080, max_fails = 1
2 addr = 10.16.77.94:8080, weight = 1, fail_timeout = 10, name = 10.16.77.94:8080, max_fails = 1
But in my test environment, there is no port with upstream name
nginx version: openresty/1.11.2.2
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 tracing the get_upstreams API and comparing its returned upstream names with the two configurations and environments described in the issue. Check how upstream names and ports are obtained or normalized in the module. Done means identifying the cause and documenting or correcting the behavior so port handling is consistent.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- c, nginx
- Domain
- api, backend
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 25/100