flagger icon indicating copy to clipboard operation
flagger copied to clipboard

Which hostname to use for load testing?

Open cer opened this issue 3 years ago • 3 comments

The docs use:

      cmd: "hey -z 1m -q 10 -c 2 -m POST -d '{test: 2}' http://podinfo-canary.test:9898/echo"

I'm confused by the use of the podinfo-canary.test, which references the Service. Isn't this bypassing the Ingress Controller, which is gathering the metrics?

cer avatar Sep 20 '22 17:09 cer

@cer yes for ingress, no for service mesh. The ingress docs have a different loadtest setup https://fluxcd.io/flagger/tutorials/nginx-progressive-delivery/

With ingress you have two options:

  • use the external address e.g. hey -z 1m -q 10 -c 2 http://app.example.com/
  • use the ingress cluster IP and set the hostname e.g. hey -z 2m -q 10 -c 2 -host app.example.com http://ingress-nginx-controller.ingress-nginx

stefanprodan avatar Sep 20 '22 17:09 stefanprodan

Good point: ingress vs. service mesh.

I was reading the docs from an ingress perspective, and have it working using the approaches you outline.

The docs - https://fluxcd.io/flagger/usage/webhooks/#load-testing - should probably make this clear :-)

BTW, I'm not sure that the docs explicitly/clearly state that the metrics come from the Service mesh/Ingress controller rather than, for example, the service.

cer avatar Sep 20 '22 17:09 cer

The docs - https://fluxcd.io/flagger/usage/webhooks/#load-testing - should probably make this clear :-)

Yes good point, Flagger docs were written with a focus on service mesh, latter on Flagger got integrated with a bunch of ingress controllers but we never got to rewrite the docs properly.

BTW, I'm not sure that the docs explicitly/clearly state that the metrics come from the Service mesh/Ingress controller rather than, for example, the service.

Yeah, there are some hints on how to use the app metrics here https://fluxcd.io/flagger/tutorials/nginx-progressive-delivery/#custom-metrics

stefanprodan avatar Sep 20 '22 17:09 stefanprodan