gardener / etcd-druid

An etcd operator to configure, provision, reconcile and monitor etcd clusters.
Apache License 2.0
74 stars 50 forks source link

[Feature] Make etcd tuning flags to be configurable #507

Open KesavanKing opened 1 year ago

KesavanKing commented 1 year ago

Feature (What you would like to be added):

As part of few performance tests on multi node etcd #107 we need the following flags to be configurable to arrive at the right tradeoff on initial bootstrap time of etcd nodes.

–heartbeat-interval –election-timeout –initial-election-tick-advance

Motivation (Why is this needed?):

Approach/Hint to the implement solution (optional):

abdasgupta commented 1 year ago

Hi Kesavan, I created a branch https://github.com/abdasgupta/etcd-druid/tree/perf-test . I made some changes in https://github.com/abdasgupta/etcd-druid/blob/b87c104637a7719bf6ce9cdbf72ae47e49d18148/pkg/component/etcd/configmap/configmap.go#L161-L168 to include the flags you requested. Normally, we provide flag values through ETCD CR. But as you mentioned that these flags don't ensure that these will resolve race conditions that you facing during your perf tests, I added them only in configmap. You need to change the values of the flags in https://github.com/abdasgupta/etcd-druid/blob/b87c104637a7719bf6ce9cdbf72ae47e49d18148/pkg/component/etcd/configmap/configmap.go#L161-L168 and you have to execute three commands afterwards to push etcd-druid image to your personal docker repo. Then, you can use the same image for your tests.

The three commands after you make your changes here if necessary, are: export IMG=<your-dockerhub-username>/etcd-druid:0.17.0-dev make docker-build make docker-push

Make sure that you are running docker desktop or docker daemon when you are executing the above commands. Make sure that you are running the above commands from the root directory of etcd-druid repo on your machine. Feel free to reach to me if needed any guidance.