This is a set of scripts and tools use to generate a docker image to simply run a DNS query in a loop using curl and then plot a graph showing the resolution time. The github actions can be used to trigger a new build and push the updated image. The actions will get triggered any time a new release gets published.
The dns-loop script will run the curl-loop script that generates output of each DNS resolution time iteration and will pass that output to hist from the https://github.com/glamp/bashplotlib tool.
Sample usage in kubernetes
Deploy pod:
cat <<EOF | kubectl apply -f -
apiVersion: v1
kind: Pod
metadata:
name: dns-loop
spec:
containers:
- name: dns-loop
image: sturrent/dns-loop
command: ["/bin/sh"]
args: ["-c", "while true; do sleep 1000; done"]
EOF
kubectl exec -it dns-loop -- dns-loop
Note: default values in dns-loop are
- Iterations = 100
- URL = google.com
- Sleep time in between queries = 0.250 s
This is a sample run using 200 iterations, URL azure.microsoft.com and running the queries every 100 ms
kubectl exec -it dns-loop -- dns-loop 200 azure.microsoft.com 0.100