You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Nginx's ngx_http_upstream_server_t type supports holding multiple ngx_addr_ts, but this module only considers one of them for the server.
I am working on this PR to allow the jdomain module to integrate better with this module and others by leveraging Nginx server. I discovered this issue with one of my test cases in which I define an upstream using jdomain which will resolve to multiple servers under the hood. Even in that case however, I found that the vhost traffic status page only shows one element for the server which has 2 addresses.
Below is my test case (apologies for verbosity and random context here):
In that test, we first set our DNS server to return 2 IPs for example.com:
$ dig example.com
;<<>> DiG 9.11.4-P2-RedHat-9.11.4-9.P2.amzn2.0.4 <<>> example.com;; global options: +cmd;; Got answer:;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 3262;; flags: qr aa rd ra; QUERY: 1, ANSWER: 2, AUTHORITY: 0, ADDITIONAL: 1;; OPT PSEUDOSECTION:; EDNS: version: 0, flags:; udp: 4096;; QUESTION SECTION:;example.com. IN A;; ANSWER SECTION:example.com. 1 IN A 127.0.0.2example.com. 1 IN A 127.0.0.3;; Query time: 0 msec;; SERVER: 127.0.0.88#53(127.0.0.88);; WHEN: Wed Oct 07 15:25:08 UTC 2020;; MSG SIZE rcvd: 72
We then hit the server 7 times expecting the round robin load balancing to behave correctly, which it does.
Afterward, I have a test case which I omitted here to verify the contents of the vhost traffic status json response.
However, here is the status displayed:
We can see that there is only an upstream server for 127.0.0.2:8000, and not 127.0.0.3:8000. What's more, there were 7 requests sent by the test suite, 4 targeting 127.0.0.2:8000 and 3 targeting 127.0.0.3:8000 if round robin worked correctly. The report shows only 4 requests total, so I can safely assume it's not just grouping all traffic stats for the addresses in the server by the first address name, but it's really only tracking stats for the first address.
For now, I will be taking a break from things and submitting my PR for jdomain regardless of if this gets addressed. But I think I may return with a PR for this issue myself.
Thanks! 🙂
The text was updated successfully, but these errors were encountered:
Nginx's
ngx_http_upstream_server_t
type supports holding multiplengx_addr_t
s, but this module only considers one of them for the server.I am working on this PR to allow the
jdomain
module to integrate better with this module and others by leveraging Nginxserver
. I discovered this issue with one of my test cases in which I define an upstream usingjdomain
which will resolve to multiple servers under the hood. Even in that case however, I found that the vhost traffic status page only shows one element for the server which has 2 addresses.Below is my test case (apologies for verbosity and random context here):
In that test, we first set our DNS server to return 2 IPs for
example.com
:We then hit the server 7 times expecting the round robin load balancing to behave correctly, which it does.
Afterward, I have a test case which I omitted here to verify the contents of the vhost traffic status json response.
However, here is the status displayed:
We can see that there is only an upstream server for
127.0.0.2:8000
, and not127.0.0.3:8000
. What's more, there were 7 requests sent by the test suite, 4 targeting127.0.0.2:8000
and 3 targeting127.0.0.3:8000
if round robin worked correctly. The report shows only 4 requests total, so I can safely assume it's not just grouping all traffic stats for the addresses in the server by the first address name, but it's really only tracking stats for the first address.For now, I will be taking a break from things and submitting my PR for
jdomain
regardless of if this gets addressed. But I think I may return with a PR for this issue myself.Thanks! 🙂
The text was updated successfully, but these errors were encountered: