Hi there, I am working on a multi-tenant Laravel application and we create a new tenant for each user on the platform.
I’m finding it difficult to get the best approach that will not incur too much cost and is also flexible for scaling.
I have a few questions to ask that can shed more light on my problem and could also assist with providing a solution
PS: I’m building a multi db multitenant application, looking to start small and scale with time.
This textbox defaults to using Markdown to format your answer.
You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!
These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.
Hey Louis,
Scaling a multi-tenant application, especially with Laravel, can be both fun and a bit tricky. It would essentially be up to some personal preferences and use-cases.
Here are some of my thoughts on this:
On the topic of single Droplet vs multiple Droplets:
Single Droplet:
Multiple Droplets:
You can always start with one Droplet. When things get tight, consider scaling later on.
On the database side:
Option: Single Droplet, Multiple Databases.
Option: Managed DigitalOcean Databases (e.g., MySQL, PostgreSQL, Redis).
I would personally do the following:
Here is an article that we wrote a while back on how to scale your Laravel app using a Managed database and DigitalOcean Spaces:
Let me know if you have any questions!
Best,
Bobby