Container Communication is very slow

I have two containers connected Via Bridge and I have Frontend code ( angular) in one container and Backend(PHP) code in second.While calling an API from the 1st container to second its take very long time almost 30 seconds while in server the same API takes less than a second