Commit 03f8e0b5 authored by Nane Kratzke's avatar Nane Kratzke
Browse files

Monitor in Kubernetes

parent eaf2e2b7
......@@ -64,6 +64,7 @@ rest-svc:
monitor-svc:
stage: deploy
when: manual
script:
- mo deploy/monitor-dep.yaml | kubectl delete -f - || true
- mo deploy/monitor-dep.yaml | kubectl apply -f -
......
......@@ -176,8 +176,10 @@ Entwickeln Sie diesen Client bitte in der Datei `grpc/compare.py`.
3. Starten Sie dann in einer dritten Shell Ihr Benchmarking
```Bash
> python3 grpc/compare.py
gRPC: 6.12ms
REST: 15.28ms
gRPC: 11.01ms REST: 25.45ms
gRPC: 11.16ms REST: 26.45ms
gRPC: 11.81ms REST: 27.41ms
[...]
```
Führen Sie diese Messungen gerne ein paar mal hintereinander auf Ihrem System aus.
......@@ -187,7 +189,6 @@ Führen Sie diese Messungen gerne ein paar mal hintereinander auf Ihrem System a
>
> `> cp cheat/compare-ue3.py grpc/compare.py`
## Übung 04: Performancevergleich HTTP (REST) vs. gRPC (in einem Cluster)
Lokal
......
......@@ -17,8 +17,37 @@ spec:
- name: monitor
image: {{ CI_REGISTRY_IMAGE }}/grpc:latest
command: ["python3", "-u", "compare.py"]
resources:
limits:
cpu: "1000m"
requests:
cpu: "1000m"
env:
- name: GRPC_SVC
value: grpc-svc
- name: REST_SVC
value: rest-svc
apiVersion: apps/v1
kind: Deployment
metadata:
name: myapp
spec:
selector:
matchLabels:
app: myapp
template:
metadata:
labels:
app: myapp
spec:
containers:
- name: myapp
image: <Image>
resources:
limits:
memory: "128Mi"
cpu: "500m"
ports:
- containerPort: <Port>
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment