-
Hi, I'm looking for the best practices for defragmenting an etcd cluster. I've read the official documentation, but haven't seen any suggested methods to automate this process. I've seen some I thought that starting to defragmentation from other etcd instances and lastly defragmenting the leader one would be safer if we can assume the defragmentation may not be complete in election_timeout time. Also, it would be useful to change the leader with What about instead of running such a defragmentation job as a cron, does it sound good to run it on an event-driven structure? When the defragmentation alert became active the job can be triggered. I believe running a defragmentation job regularly could make much more sense rather than running on an event-driven format, because depending on the db size that you configured; defragmentation can take longer to complete; but yes, at the end of the day, it would not cause any problem if you start from the other etcd instances except the leader one to defrag. I would welcome to hear any ideas/practices about it. |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 1 reply
-
KISS - keep it stupid simple. Cron job that avoid running when not needed based on some fragmentation threshold should work good enough. |
Beta Was this translation helpful? Give feedback.
-
I suggest to add an example script to the docs, and created a feature request: #15477 |
Beta Was this translation helpful? Give feedback.
KISS - keep it stupid simple.
Cron job that avoid running when not needed based on some fragmentation threshold should work good enough.