If you are using embedded architecture (single ECC + gateway server) then in that case GW_CORE, IW_FND and IW_BEP will all be installed in the same system. But if you are using central hub architecture (ECC and gateway are 2 different servers) then GW_CORE and IW_FND should exist in the front end gateway server and IW_BEP should exist in the back end ECC server.
Regards,
Saurabh