Laravel server hardware requirement

Viewed 8527

I have developed a Laravel API and looking into picking a server to deploy the project. There is no big business logic running on the server. It's a simple application. But the application will be accessed by ~100 users per second at its peak time. In that case, what parameters of the server should I be looking into for selecting a server (from hardware aspect - RAM, Storage, Processor, etc...)?

API will be used for shop floor time reporting. Every hour (when the hour completes), ~150 users will access the system to report time.

2 Answers

You say you will have 100 users per second, yet you say employees will access it 150 per hour.

While it is likely you can get 100 writes in 30 secs, that's nothing to a modern database.

I would recommend getting the lowest vps package from a hosting provider you like and upgrading to a higher plan if needed.

If you want to run a dedicated server on premises even an office PC with a low end ssd will do the job.

I’m going to round up my estimates because it’s better that you have slightly more then you need then less. Also I’m more used to bigger databases so these estimates may be slightly overkill? But based on my understanding of what you require, they shouldn’t be too excessive , I’ll explain everything aswell so feel free to edit this based on your requirements.

RAM= 150 people? Minimum 10gb. But ram doesn’t come in 10GB and you might aswell go for 16.

Storage? 50GB is a safe bet for small databases and whatnot, feel free to use more or less based on your numbers.

OS requirements. If your app takes up 40gb. Then you do not want only 41gb of space, that will slow everything down. A good rule of thumb is to reserve 1 GB of RAM for the OS by default, plus an additional 1 GB for each 4 GB between 4-16 and another 1 GB for every 8 GB installed above 16 GB.  What this looks like in a server with 32 GB RAM is 7 GB for your OS, with the remaining 25 GB dedicated for your application.

CPU. Whenever I talk about this people always think it’s not a big deal. It kinda is. The amount of servers that have been bottlenecked by their cpu? Is more then it should be. Now, you said that it’ll be lots of interactions (150) but small ones (just logging hours) therefore cpu cores are what you wanna look at. So just find something within budget that has a fair few cores. Intel Xeon E3 1270 V3 is pretty good for its price I would say. That’s all I can think of right now, don’t hesitate to follow up if I’ve missed anything.

I would recommend taking a look at this aswell: Choose your version and see if you want to make any motivations based on what’s shown in the official documentation below

https://laravel.com/docs/master/installation

Related