|
| 1 | +# Results |
| 2 | + |
| 3 | +## Test environment |
| 4 | + |
| 5 | +NGINX Plus: true |
| 6 | + |
| 7 | +GKE Cluster: |
| 8 | + |
| 9 | +- Node count: 3 |
| 10 | +- k8s version: v1.28.9-gke.1000000 |
| 11 | +- vCPUs per node: 2 |
| 12 | +- RAM per node: 4019172Ki |
| 13 | +- Max pods per node: 110 |
| 14 | +- Zone: us-central1-c |
| 15 | +- Instance Type: e2-medium |
| 16 | +- NGF pod name -- ngf-longevity-nginx-gateway-fabric-c4db4c565-8rhdn |
| 17 | + |
| 18 | +## Traffic |
| 19 | + |
| 20 | +HTTP: |
| 21 | + |
| 22 | +```text |
| 23 | +Running 5760m test @ http://cafe.example.com/coffee |
| 24 | + 2 threads and 100 connections |
| 25 | + Thread Stats Avg Stdev Max +/- Stdev |
| 26 | + Latency 192.36ms 124.47ms 1.99s 66.49% |
| 27 | + Req/Sec 279.51 187.21 1.88k 65.53% |
| 28 | + 188805938 requests in 5760.00m, 65.81GB read |
| 29 | + Socket errors: connect 0, read 22, write 4, timeout 42 |
| 30 | + Non-2xx or 3xx responses: 3 |
| 31 | +Requests/sec: 546.31 |
| 32 | +Transfer/sec: 199.68KB |
| 33 | +``` |
| 34 | + |
| 35 | +HTTPS: |
| 36 | + |
| 37 | +```text |
| 38 | +Running 5760m test @ https://cafe.example.com/tea |
| 39 | + 2 threads and 100 connections |
| 40 | + Thread Stats Avg Stdev Max +/- Stdev |
| 41 | + Latency 192.58ms 124.49ms 2.00s 66.48% |
| 42 | + Req/Sec 278.96 186.56 1.76k 65.59% |
| 43 | + 188455380 requests in 5760.00m, 64.69GB read |
| 44 | + Socket errors: connect 10, read 24, write 0, timeout 60 |
| 45 | + Non-2xx or 3xx responses: 5 |
| 46 | +Requests/sec: 545.30 |
| 47 | +Transfer/sec: 196.26KB |
| 48 | +``` |
| 49 | + |
| 50 | +Note: Non-2xx or 3xx responses correspond to the error in NGINX log, see below. |
| 51 | + |
| 52 | +### Logs |
| 53 | + |
| 54 | +nginx-gateway: |
| 55 | + |
| 56 | +a lot of expected "usage reporting not enabled" errors. |
| 57 | + |
| 58 | +And: |
| 59 | +```text |
| 60 | +failed to start control loop: leader election lost |
| 61 | +
|
| 62 | +4 x |
| 63 | +failed to start control loop: error setting initial control plane configuration: NginxGateway nginx-gateway/ngf-longevity-config not found: failed to get API group resources: unable to retrieve the complete list of server APIs: gateway.nginx.org/v1alpha1: Get "https://10.61.192.1:443/apis/gateway.nginx.org/v1alpha1?timeout=10s": net/http: request canceled while waiting for connection (Client.Timeout exceeded while awaiting headers) |
| 64 | +``` |
| 65 | + |
| 66 | +Those errors correspond to losing connectivity with the Kubernetes API and NGF container restarts (5). Such logs |
| 67 | +are expected in that case. |
| 68 | + |
| 69 | +nginx: |
| 70 | + |
| 71 | +```text |
| 72 | +2024/06/01 21:34:09 [error] 104#104: *115862644 no live upstreams while connecting to upstream, client: 10.128.0.112, server: cafe.example.com, request: "GET /tea HTTP/1.1", upstream: "http://longevity_tea_80/tea", host: "cafe.example.com" |
| 73 | +2024/06/03 12:01:07 [error] 105#105: *267137988 no live upstreams while connecting to upstream, client: 10.128.0.112, server: cafe.example.com, request: "GET /coffee HTTP/1.1", upstream: "http://longevity_coffee_80/coffee", host: "cafe.example.com" |
| 74 | +``` |
| 75 | + |
| 76 | +8 errors like that occurred at different times. They occurred when backend pods were updated. Not clear why that happens. |
| 77 | +Because number of errors is small compared with total handled requests, no need to further |
| 78 | +investigate unless we see it in the future again at larger volume. |
| 79 | + |
| 80 | +### Key Metrics |
| 81 | + |
| 82 | +#### Containers memory |
| 83 | + |
| 84 | + |
| 85 | + |
| 86 | +Drop in NGF memory usage in the beginning corresponds to the nginx-gateway container restarts. |
| 87 | + |
| 88 | +Drop in NGINX memory usage corresponds to the end of traffic generation. |
| 89 | + |
| 90 | +#### NGF Container Memory |
| 91 | + |
| 92 | + |
| 93 | + |
| 94 | +### Containers CPU |
| 95 | + |
| 96 | + |
| 97 | + |
| 98 | +Drop in NGINX CPU usage corresponds to the end of traffic generation. |
| 99 | + |
| 100 | +### NGINX Plus metrics |
| 101 | + |
| 102 | + |
| 103 | + |
| 104 | +Drop in request corresponds to the end of traffic generation. |
| 105 | + |
| 106 | +### Reloads |
| 107 | + |
| 108 | +Rate of reloads - successful and errors: |
| 109 | + |
| 110 | + |
| 111 | + |
| 112 | +Note: compared to NGINX, we don't have as many reloads here, because NGF uses NGINX Plus API to reconfigure NGINX |
| 113 | +for endpoints changes. |
| 114 | + |
| 115 | +No reloads finished with an error. |
| 116 | + |
| 117 | +Reload time distribution - counts: |
| 118 | + |
| 119 | + |
| 120 | + |
| 121 | +Reload related metrics at the end: |
| 122 | + |
| 123 | + |
| 124 | + |
| 125 | +All successful reloads took less than 1 seconds, with most under 0.5 second. |
| 126 | + |
| 127 | +## Comparison with previous runs |
| 128 | + |
| 129 | +Graphs look similar to 1.2.0 results. |
| 130 | +As https://github.com/nginxinc/nginx-gateway-fabric/issues/1112 was fixed, we no longer see the corresponding |
| 131 | +reload spikes. |
| 132 | + |
| 133 | +Memory usage is flat, but ~1 Mb higher than in 1.2.0. |
0 commit comments