added high availability support. monitor connected clients. support client disconnect. support automatic reconnection