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

usanzadunje's avatar

What are memory requirements for hosting high API calls app?

I have Laravel backend app that will be used to get API responses. I want to host on server but dont know what specifications it should have. I dont want users of app to experience performance issues of this so i am ready to get bigger plan just in case app gets more attention. If you could approx. tell me how much RAM would i need from server in order not to notice performance drops in my app if i had lets say 1000-5000( just approx all i need ) concurent users using app. For example they all change something in db but not too complex like changing column from 0 -> 1.

EDIT: Is it better to have for ex. hosting laravel app and db on same server (4-8GB ram ,2vCPU) or get 2 servers of half resources and host laravel on one and db on other? I have option of 6 GB and 6 CPU cores @3.90GHz or get 2 x 4GB RAM and 4 CPU [email protected]. Price would be around 100EUR per year for both situations which im okay with.

Any suggestion is appreciated. Thanks !

0 likes
8 replies
Reached's avatar

Maybe you could look into Laravel Octane, might be some gold there in terms of performance!

martinbean's avatar
Level 80

@usanzadunje Worry about 1,000 concurrent users when you actually have 1,000 concurrent users. A thousand people, accessing your API at the very same time, is huge scale.

usanzadunje's avatar

But what would you recommend me for start? I want to make good setup so i wouldn't have to worry later. Maybe start with one 2-4GB server? Or its better to go with 2 separate ones (maybe 1-2GB for each)? Thanks for reply!

martinbean's avatar

@usanzadunje I’d say stop worrying about hypothetical load and just build for the load you have now. Scale up as and when needed.

usanzadunje's avatar

Alright, thanks for answer! You are right when you say i overthink but what can i do i want everything to be good. Would you recommend option to host laravel app on separate server from database? You for sure have way more experience than me, i have never done anything like this. Im trying it for 1st time. Thanks again!

jlrdw's avatar

Also look at auto scaling, digital ocean, aws, have all sorts of how-to and help articles.

usanzadunje's avatar

Another thing i was thinking maybe its better for me to host from hosting provider in my country since application will be used there (for now) and not something like digital ocean which servers would be further away? I would love to use something like aws or DO but i think maybe its better performance if i host it in country where request will be made from? Or is this not correct and performance difference wouldnt be noticable for users? Thanks for answer!

Please or to participate in this conversation.