issue: #38399 - move the lifetime implementation of common code out of the server level lifetime implementation Signed-off-by: chyezh <chyezh@outlook.com>