When (if ever) you hit that performance issue your app will enable you to hire smart people which will worry about that for you. So answer is no it will not affect performances if you query across multiple databases.
Multiple databases + Laravel App in single AWS EC2 instance.
I'm developing a Laravel application that serves to 3 different marketplace on separate domains, for bikes, cars, and boats with grouped routes, controllers, views and models per each domain. Idea is to have 3 websites served by a single server side app that shares authentication and User model etc.
For the application, I need to have linked tables for bikes, cars and boats. So ideally, how I'm thinking to structure the app is:
- App DB: hosts tables for users and other common entity tables.
- Bikes DB: hosts all the makes, models, and specifications of different bikes
- Cars DB: hosts all the makes, models, and specifications of different cars
- Boats DB: hosts all the makes, models, and specifications of different cars
I'm aware that Laravel can configure the use of multiple databases and set cross-DB Eloquent relationships so that technical aspect is understandable for me. However, as a self funded project, my target is to start with a single EC2 instance.
Question is: Will it affect the performance of the application if I query across multiple databases that runs within the same instance as that of the application itself? Hoping for some suggestions as well. Thanks!
Please or to participate in this conversation.