Thread safe for http factory