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!
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
Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.
Full documentation for every DigitalOcean product.
The Wave has everything you need to know about building a business, from raising funding to marketing your product.
Stay up to date by signing up for DigitalOcean’s Infrastructure as a Newsletter.
New accounts only. By submitting your email you agree to our Privacy Policy
Scale up as you grow — whether you're running one virtual machine or ten thousand.
Sign up and get $200 in credit for your first 60 days with DigitalOcean.*
*This promotional offer applies to new accounts only.