I have SAAS type application and I am providing it service to many users. It is developed using php. I want to know which structure is better, right now I have subdomain structure, each group is different subdomain, though all uses same code from one source. so it like
group1.domain.com
group2.domain.com
both uses single code but behave has separate application.
Another structure is also available in which we specify group in URL and not as subdomain like
domain.com/group1
domain.com/group2
My question is which structure is better in terms of scalability and security ? do subdomain or url structure have any security issue ? Which is better if we need to scale and use multiple server which will be better?