3

There is a lot written about the performance of Laravel. It is not the very best framework when it comes to fast applications but it has a lot of options and a brilliant community and documentation. I would like to know if Laravel suits my situation:

I'm currently developing a browsergame that, hopefully, will be played by thousands of visitors worldwide. There could be over 3000 concurrent users at the same time. The application is a bit heavy, because it needs a lot of different modules: views, routing, session management, authentication, database connections, cronjobs and so on. It really is a dynamic game so the application will be loaded a lot of times. And: I don't have that much money to invest in a lot of dedicated servers (at least not in the very beginning).

I looked to other frameworks too. Because Lumen, Slim and some other micro frameworks don't support all of the modules my game needs, I think Laravel is a good choice. But I'm really scared for the benchmarks I see. Laravel doesn't look good there when compared to other frameworks: it's slow, consumes a lot of memory and can't handle many requests.

So my question: is Laravel a good choice for a heavy browsergame website with potential of thousands of concurrent users? Caching and Homestead will help for sure, but is Laravel a good choice at all, or is there a really better framework?

Jordy
  • 4,719
  • 11
  • 47
  • 81
  • Its depend on your budget of course :) If you have resources yes you can easily scale it horizontal to handle 3000 concurrent users. if you are low on resources(money) then I will not choose laravel for that high concurrent level, we are talking like 180,000 - 250,000 users per minute. – Amir Bar Jun 14 '16 at 09:17
  • Thanks. Do you recommend a micro framework or another framework? Do you have any suggestions? – Jordy Jun 14 '16 at 11:24
  • too broad to recommend something, if you only care about performance than phalcon – Amir Bar Jun 14 '16 at 13:31

1 Answers1

4

It's less about the framework, and more about how you write your code.

Follow good practices, plan for scaling, and Laravel can absolutely be a very high-performance solution for you. I've heard of some using Laravel with millions of requests per day.

We run a large production app with Laravel, load balanced across multiple web servers, separate redundant database servers, Redis caching, etc. We've had lots of scaling issues, but interestingly none of them were related to the framework. Your main bottlenecks will be elsewhere.

Folks worry way too much about performance before even beginning a project (premature optimization, and all that). Pick the best tool for the job in terms of what it does for you. Then build your app with scaling in mind.

If Laravel provides the functionality you need and you like how it works, use it!

jszobody
  • 28,495
  • 6
  • 61
  • 72
  • Thank you very much. But do you think I need a lot of servers to host my game based on laravel? I mean I'm now in the position to choose my framework. I understand you don't know the ins and outs of my game, but in general: do I need lot of servers to run a heavy site? In the beginning around 50.000 users each minute? – Jordy Jun 14 '16 at 11:53
  • You might. Hard to tell. But again: your biggest scalability issues will not be related to the framework. That shouldn't drive your framework decision primarily. – jszobody Jun 14 '16 at 12:17
  • @Jordy I can say that its like 99.999% that you will need multiple servers to support this kind of requests with laravel – Amir Bar Jun 14 '16 at 13:17
  • @Jordy did this answer help you? – jszobody Jun 14 '16 at 14:11
  • Yes, it definitely helped me. I'll think I go for laravel because productivity is another important factor in the development. Hopefully Laravel will get faster and faster in next versions, because that is still something I'm afraid of because of the benchmarks. Thanks for your help (I close the question in a couple of days). – Jordy Jun 15 '16 at 18:15