megaease/easemesh

Enable service instance record cleanup

benja-wu opened this issue · 1 comments

Background

  • EaseMesh uses MeshController and Easegress cluster as a control plane.
  • Mesh service will register itself when one instance (K8s pod) becomes ready.

Problem

  1. After one service lost its heartbeat reporting cyclic behavior, the control plane will exclude this instance by setting its state to OUT_OF_SERVICE. Even after been excluded from mesh, this instance’s record remains in ETCD storage.
  2. A mesh service will create several dynamic pods in K8s, the former created and destroyed instances’ records will remain in the system as the case 1.

Proposal

  1. Enabling MeshController worker to update its instance heartbeat record with lease API, such as 30 minutes. So that this record will be deleted by storage automatically when reach its lease expiration.

Close with #183