|
13 | 13 |
|
14 | 14 | ## Goals
|
15 | 15 |
|
16 |
| -- Measure how long it takes NGF to reconfigure NGINX when a number of Gateway API and referenced core Kubernetes |
17 |
| - resources are created at once. |
| 16 | +- Measure how long it takes NGF to reconfigure NGINX and update statuses when a number of Gateway API and |
| 17 | + referenced core Kubernetes resources are created at once. |
18 | 18 | - Two runs of each test should be ran with differing numbers of resources. Each run will deploy:
|
19 | 19 | - a single Gateway, Secret, and ReferenceGrant resources
|
20 | 20 | - `x+1` number of namespaces
|
|
38 | 38 | kubectl apply -f https://github.com/kubernetes-sigs/gateway-api/releases/download/v0.8.1/standard-install.yaml
|
39 | 39 | ```
|
40 | 40 |
|
41 |
| -3. Deploy NGF from edge using Helm install (NOTE: For Test 1, deploy AFTER resources): |
| 41 | +3. Deploy NGF from edge using Helm install and wait for LoadBalancer Service to be ready |
| 42 | + (NOTE: For Test 1, deploy AFTER resources): |
42 | 43 |
|
43 | 44 | ```console
|
44 | 45 | helm install my-release oci://ghcr.io/nginxinc/charts/nginx-gateway-fabric --version 0.0.0-edge \
|
|
65 | 66 | kubectl port-forward $GW_POD -n nginx-gateway 9113:9113 &
|
66 | 67 | ```
|
67 | 68 |
|
68 |
| -6. Measure Time To Ready as described in each test, get the reload count, and get the average NGINX reload duration. |
69 |
| - The average reload duration can be computed by taking the `nginx_gateway_fabric_nginx_reloads_milliseconds_sum` |
70 |
| - metric value and dividing it by the `nginx_gateway_fabric_nginx_reloads_milliseconds_count` metric value. |
71 |
| -7. For accuracy, repeat the test suite once or twice, take the averages, and look for any anomolies or outliers. |
| 69 | +6. Measure NGINX Reloads and Time to Ready Results |
| 70 | + 1. TimeToReadyTotal as described in each test - NGF logs. |
| 71 | + 2. TimeToReadyAvgSingle which is the average time between updating any resource and the |
| 72 | + NGINX configuration being reloaded - NGF logs. |
| 73 | + 3. NGINX Reload count - metrics. |
| 74 | + 4. Average NGINX reload duration - metrics. |
| 75 | + 1. The average reload duration can be computed by taking the `nginx_gateway_fabric_nginx_reloads_milliseconds_sum` |
| 76 | + metric value and dividing it by the `nginx_gateway_fabric_nginx_reloads_milliseconds_count` metric value. |
| 77 | +7. Measure Event Batch Processing Results |
| 78 | + 1. Event Batch Total - metrics. |
| 79 | + 2. Average Event Batch Processing duration - metrics. |
| 80 | + 1. The average event batch processing duraiton can be computed by taking the `nginx_gateway_fabric_event_batch_processing_milliseconds_sum` |
| 81 | + metric value and dividing it by the `nginx_gateway_fabric_event_batch_processing_milliseconds_count` metric value. |
| 82 | +8. For accuracy, repeat the test suite once or twice, take the averages, and look for any anomolies or outliers. |
72 | 83 |
|
73 | 84 | ## Tests
|
74 | 85 |
|
|
79 | 90 | e.g. `cd scripts && bash create-resources-gw-last.sh 30`. The script will deploy backend apps and services, wait
|
80 | 91 | 60 seconds for them to be ready, and deploy 1 Gateway, 1 RefGrant, 1 Secret, and HTTPRoutes.
|
81 | 92 | 2. Deploy NGF
|
82 |
| - 3. Check logs for time it takes from start-up -> config written and NGINX reloaded. Get reload count and average reload |
83 |
| - duration from metrics and logs. |
| 93 | + 3. Measure TimeToReadyTotal as the time it takes from start-up -> config written and |
| 94 | + NGINX reloaded. Measure the other results as described in steps 6-7 of the [Setup](#setup) section. |
84 | 95 |
|
85 | 96 | ### Test 2: Start NGF, deploy Gateway, create many resources attached to GW
|
86 | 97 |
|
|
89 | 100 | 2. Run the provided script with the required number of resources,
|
90 | 101 | e.g. `cd scripts && bash create-resources-routes-last.sh 30`. The script will deploy backend apps and services,
|
91 | 102 | wait 60 seconds for them to be ready, and deploy 1 Gateway, 1 Secret, 1 RefGrant, and HTTPRoutes at the same time.
|
92 |
| - 3. Check logs for time it takes from NGF receiving first resource update -> final config written, and NGINX's final |
93 |
| - reload. Check logs for average individual HTTPRoute TTR also. Get reload count and average reload duration from |
94 |
| - metrics and logs. |
| 103 | + 3. Measure TimeToReadyTotal as the time it takes from NGF receiving the first HTTPRoute resource update -> final |
| 104 | + config written and NGINX reloaded. Measure the other results as described in steps 6-7 of the [Setup](#setup) section. |
95 | 105 |
|
96 | 106 | ### Test 3: Start NGF, create many resources attached to a Gateway, deploy the Gateway
|
97 | 107 |
|
|
101 | 111 | e.g. `cd scripts && bash create-resources-gw-last.sh 30`.
|
102 | 112 | The script will deploy the namespaces, backend apps and services, 1 Secret, 1 ReferenceGrant, and the HTTPRoutes;
|
103 | 113 | wait 60 seconds for the backend apps to be ready, and then deploy 1 Gateway for all HTTPRoutes.
|
104 |
| - 3. Check logs for time it takes from NGF receiving gateway resource -> config written and NGINX reloaded. Get reload |
105 |
| - count and average reload duration from metrics and logs. |
| 114 | + 3. Measure TimeToReadyTotal as the time it takes from NGF receiving gateway resource -> config written and NGINX reloaded. |
| 115 | + Measure the other results as described in steps 6-7 of the [Setup](#setup) section. |
0 commit comments