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

pedrocevil4's avatar

Is laravel a good choice as a mobile game API server?

We are making a small cross-platform game with the client apps being made with multiple tools (unreal engine, javascript, etc).

The user and server data would be stored and served from a database through an API (user credentials, session, items owned, also random enemy spawn w https://vidmate.onl/ ould be also run on the main server side as a cron job.

Is laravel fast enough for this? Can it handle the periodic check from multiple users, for example to see if they actually have the resources neede to build something, or if the building time is actually over, etc? This would mean a server query every s https://mobdro.onl/econd from every online user.

Anyone have any experience with womething like this? We only did websites until now but want to try our luck with games as well. Is there a faster method? should we maybe insert a middleman between the client and the server, like a socket server?

0 likes
5 replies
Brandon Eichhorn's avatar

Yes. Laravel is used by many large companies and is actively used. It is based on PHP and more than reliable. You should worry about ordering a very stable server though. :P

martinbean's avatar

@pedrocevil4 You’d probably be better off using something like Node.js and sockets.

With Laravel being PHP-based, it means every request is isolated: every request needs to boot the framework and then resources are thrown away once a response is returned. A Node.js process is started and will stay alive and handle many requests until you kill the process.

Sure you could add something like Octane to your stack, but you may as well just use the right tool for the job. Laravel is great for HTTP-based applications, but for something where time and performance is critical like a game server, I’d opt for something else.

3 likes
bugsysha's avatar

The current company I work for is migrating away from PHP because of the high CPU usage caused by the blocking IO nature of PHP. Swoole or Laravel Octane can help to alleviate most of the pain, even Guzzle async and concurent calls, but for such a huge project we are looking for a solution that is async out of the box.

I'm sure you can do it with PHP, but it is very unforgiving on slight hiccups on high load. It can cause congestion to such a level where you will face denial of service.

If you want to go for PHP and Laravel for some specific reason, I would put more faith into Laravel Vapor, especially considering the recent tweet from Taylor Otwell about bringing Laravel Octane to Laravel Vapor.

1 like

Please or to participate in this conversation.