Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

tomahawkx's avatar

Building new server infrastructure for multiple laravel websites

I run about 10 laravel websites, and our company is growing. Currently, all sites and databases are hosted on a shared web hosting at OVH. Unfortunately, the performance is not ideal, and there is a lot more potential in speed. I put one of our laravel applications on a VPS with varnish and Memcached installed, and it is loading MUCH faster than on the shared hosting.

Our websites are business e-commerce sites, so stability, security, and performance are crucial.

My idea is to rent a dedicated server (maybe from OVH) with about 32GB Ram, 1TB SSD (Raid, total 2TB), and 6 cores with a higher clock rate or 8 cores lower clock rate.

Then I would set up a Linux VPS (Nginx webserver) for each laravel application, so every site is completely isolated. Furthermore, I would set up one database server (installed on a Linux VPS on the dedicated server) for all MySQL databases. Each database would have a unique user/ password.

To receive the best performance possible, I would also use Memcached (cache & session driver) + varnish for caching the static pages. I would also use a package to cache some models as most things are static and not often updated. Unless users, orders, and that stuff.

Would you set up an independent server for Memcached and one for varnish, used by all laravel applications, or would you install Memcached and varnish on every application's webserver VPS?

I would be pleased to hear your ideas about that. Feedback is very welcome.

0 likes
2 replies
martinbean's avatar

@tomahawkx Is SaaS not an option here? Instead of duplicating the codebase for each website. That way you only have a single infrastructure instance to worry about, instead of an instance per site/client.

tomahawkx's avatar

The code of each laravel application is different, so we are forced to create a new instance for each site. Currently, they are all uploaded on a shared Webhosting.

Please or to participate in this conversation.