refactored service-registry lifecycle aware