Istio use Hey to generate load

This commit is contained in:
Stefan Prodan
2018-04-20 00:56:36 +03:00
parent 4acfdba296
commit b104769f20
4 changed files with 28 additions and 28 deletions
+4 -8
View File
@@ -80,18 +80,14 @@ kubectl -n test apply -f ./deploy/istio-v1alpha3/istio-virtual-service.yaml
kubectl -n test apply -f ./deploy/istio-v1alpha3/istio-gateway.yaml
```
Create a `curl` pod for testing:
Create a `loadtest` pod for testing:
```bash
kubectl -n test run -i --rm --tty curl --image=radial/busyboxplus:curl --restart=Never -- sh
kubectl -n test run -i --rm --tty loadtest --image=stefanprodan/loadtest --restart=Never -- sh
```
Run inside the `curl` pod:
Start the load test:
```bash
curl -v -H "Host: podinfo.test" http://podinfo.test:9898/version
version: 0.2.1
curl -v -H "x-user: insider" -H "Host: podinfo.test" http://podinfo.test:9898/version
version: 0.2.2
hey -n 100000 -c 2 -q 5 http://podinfo.test:9898/version
```
+1 -1
View File
@@ -8,7 +8,7 @@ metadata:
app: podinfo
release: canary
spec:
replicas: 2
replicas: 1
selector:
matchLabels:
app: podinfo
+1 -1
View File
@@ -8,7 +8,7 @@ metadata:
app: podinfo
release: ga
spec:
replicas: 2
replicas: 1
selector:
matchLabels:
app: podinfo
@@ -11,26 +11,30 @@ spec:
gateways:
- mesh
- podinfo-gateway
# http:
# - route:
# - destination:
# name: podinfo
# subset: canary
# weight: 50
# - destination:
# name: podinfo
# subset: ga
# weight: 50
http:
- match:
- headers:
x-user:
regex: ".*insider.*"
route:
- destination:
name: podinfo.test
subset: canary
- route:
- destination:
name: podinfo.test
subset: canary
weight: 20
- destination:
name: podinfo.test
subset: ga
weight: 80
# http:
# - match:
# - headers:
# x-user:
# exact: insider
# source_labels:
# release: ga
# route:
# - destination:
# name: podinfo.test
# subset: canary
# weight: 100
# - route:
# - destination:
# name: podinfo.test
# subset: ga
# weight: 100