Advice on React application with Laravel API as a backend that uses MySQL for the database

I currently run a site that hosts about 20,000 total users with 5,000-20,000 page views per day depending on what time of week/month. Right now I’m running it with Laravel/PHP/MySQL on Ubuntu LAMP on 18.04 droplet ($40, 2CPUs/4GB/256GB Disk). It has been working decent, but if the traffic gets too high, the site will lock up. Most of the time this lock up is due to MySQL taking up 100% of the processes.

I’m wondering if it would be worth it for me to switch over to DO’s Managed Databases? I haven’t used it before, but it looks like it would be able to handle MySQL if it gets too loaded?

Also, how would that work? I have 3 separate droplets? 1 for react, 1 for laravel api, and one for the managed database?

Submit an answer

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!

Sign In or Sign Up to Answer

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.

Want to learn more? Join the DigitalOcean Community!

Join our DigitalOcean community of over a million developers for free! Get help and share knowledge in Q&A, subscribe to topics of interest, and get courses and tools that will help you grow as a developer and scale your project or business.

If you can, I’d advise to try figuring out “why” the DB locks up to begin with. It might be the sheer concurrency, or there maybe conditions in which very slow requests are generated, or it may be that you’re hitting the disk and are limited by IO.

Solutions can be drastically different depending on “why” it’s slow. At present time, you seem to assert that “more power” is the solution, and it may alleviate the problem, but maybe not optimally.