Implement the cluster registration, add more unit test for the server and service events and cluster registration