Skip to content

Commit

Permalink
adding experiment removing dns
Browse files Browse the repository at this point in the history
Signed-off-by: vsoch <vsoch@users.noreply.github.com>
  • Loading branch information
vsoch committed May 17, 2023
1 parent 6bf3f6b commit 628672f
Show file tree
Hide file tree
Showing 212 changed files with 33,501 additions and 0 deletions.
3 changes: 3 additions & 0 deletions google/service-timing/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,6 @@ of experiments are attempting to investigate different aspects.

- [run1](run1) was my original testing done on GKE to report the issue (May 4, 2023)
- [run2](run2) was a secondary test to run nslookup across different cluster flags (May 16, 2023)
- [run3](run3) ran telnet in the worker pod to look at connection times/patterns to the broker leader (index 0)
- [run4](run4) used a test deployment of the operator that wrapped flux start with strace
- [run5](run5) attempts to remove DNS by getting pod ip addresses and writing them into `/etc/hosts`
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
299 changes: 299 additions & 0 deletions google/service-timing/run3/data/telnet/telnet-13-flux-sample-2.log

Large diffs are not rendered by default.

299 changes: 299 additions & 0 deletions google/service-timing/run3/data/telnet/telnet-13-flux-sample-3.log

Large diffs are not rendered by default.

Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
296 changes: 296 additions & 0 deletions google/service-timing/run3/data/telnet/telnet-15-flux-sample-2.log

Large diffs are not rendered by default.

Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
299 changes: 299 additions & 0 deletions google/service-timing/run3/data/telnet/telnet-17-flux-sample-2.log

Large diffs are not rendered by default.

Binary file not shown.
Binary file not shown.
299 changes: 299 additions & 0 deletions google/service-timing/run3/data/telnet/telnet-18-flux-sample-2.log

Large diffs are not rendered by default.

Binary file not shown.
Binary file not shown.
299 changes: 299 additions & 0 deletions google/service-timing/run3/data/telnet/telnet-19-flux-sample-2.log

Large diffs are not rendered by default.

Binary file not shown.
Binary file not shown.
299 changes: 299 additions & 0 deletions google/service-timing/run3/data/telnet/telnet-20-flux-sample-2.log

Large diffs are not rendered by default.

Binary file not shown.
109 changes: 109 additions & 0 deletions google/service-timing/run5/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,109 @@
# Service Timing

For this experiment we want to try a test branch of the operator (hash / digest in the
flux-operator.yaml) that eliminates DNS by writing the hostnames into `/etc/hosts`
You can see the original runs in [run1](../run1)

### Setup

```console
gcloud container clusters create flux-operator \
--region=us-central1-a --project $GOOGLE_PROJECT \
--machine-type n1-standard-2 --num-nodes=4 \
--tags=flux-cluster --enable-dataplane-v2

$ kubectl create namespace flux-operator
```

### Hostnames on Current Networking

First let's apply the current design (with wrap added) so we can save pods (and see hostnames)

```
$ kubectl create namespace flux-operator
$ kubectl apply -f current/flux-operator-dev.yaml
$ kubectl apply -f current/minicluster.yaml
```

Wait for the pods to be running, then save logs and pods:

```
$ kubectl logs -n flux-operator flux-sample-0-bfmll -f > current/flux-sample-0.log
# do for each of 1,2,3 too
$ kubectl get pods -n flux-operator -o json > current/pods.json
$ kubectl get nodes -o json > current/nodes.json
```

And inspect hostnames:

```
$ kubectl get pods -n flux-operator -o yaml | grep hostname
hostname: flux-sample-0
hostname: flux-sample-1
hostname: flux-sample-2
hostname: flux-sample-3
```

And run the programmatic portion:

```bash
python time-minicluster.py current
```

Then you should be able to delete the operator (and the MiniCluster goes with it).

```bash
$ kubectl delete -f current/flux-operator-dev.yaml
```

### No DNS

The new design can [be seen here]() - this isn't intended to be merged, but just
for this experiment. As an example of the config map it generates (that will be used
to update the `/etc/hosts`:

```
$ kubectl apply -f no-dns/flux-operator-dev.yaml
$ kubectl apply -f no-dns/minicluster.yaml
```

Wait for the pods to be running, then save logs and pods:

```
$ kubectl logs -n flux-operator flux-sample-0-bfmll -f > ./no-dns/flux-sample-0.log
# do for each of 1,2,3 too
$ kubectl get pods -n flux-operator -o json > no-dns/pods.json
```

```
$ kubectl get pods -n flux-operator -o yaml | grep hostname
hostname: flux-sample-0
hostname: flux-sample-1
hostname: flux-sample-2
hostname: flux-sample-3
```

And delete

```bash
$ kubectl delete -f ./no-dns/minicluster.yaml
```

Run programatically:

```bash
python time-minicluster.py no-dns
```

Don't forget to clean up!

```bash
$ gcloud container clusters delete flux-operator
```

#### Compare Flux Start Times

Now we want to compare the same above, but programatically across runs.



0 comments on commit 628672f

Please sign in to comment.