In this scenario.
- I have an application targeting two countries, however same language.
- The code is the same, at least, in this stage, can't predict the future.
- Each country has an isolated database.
- The distinction is made through the subdomain (e.g. pt.mywebsite.com)
- Currently I am thinking about using the same code, and the same application instance for both countries.
- I need to check always what is the subdomain by each request, and then set the correct database. This seem to be a bad practice.
- Changes in code related with one country can break the another.
- If i need to stop the machine or the webserver, then both countries will stay down.
The decision that i need to take, is, should i have two isolated apps, with isolated code, an isolated webserver, or should i use the same code and webserver for both countries?