QUOTE(jbcoder @ Jun 12 2020, 10:04 PM)
Laravel is bloated for api. 50 requests per second vs 5000 requests per second with raw php for api, I'll stick with raw PHP. I am not spouting anything new. The problem with these heavy MVC framework is they take time to load and you have no idea what is done behind the back for every url request. That's why raw php api requests can be way much more efficient than these full frameworks and eat less memory.
If you know what you're doing, that's fine. I've worked with enterprise systems that have apis/scripts written in raw php. Due to bad design or poor experience in PHP its a bloody mess, and the juniors have a hard time understanding and fixing issues.
The "bloat" comes with benefits of architecture, documentation and extensibility. Which in turn leads to better maintenance and faster development. The cost you save from the human time far exceed what you save in execution speed.
QUOTE
If must use a php framework for server api, Slim is probably a better choice than laravel or lumen. It's lightweight but still, lose to raw php.
https://www.reddit.com/r/PHP/comments/3dz8h...ally_pure_sham/LUMEN Requests per second: 240.53 [#/sec] (mean)
SLIM3 Requests per second: 497.75 [#/sec] (mean)
LARAVEL 5 Requests per second: 47.27 [#/sec] (mean)
RAW PHP Requests per second: 5248.06 [#/sec] (mean)
I've read that reddit post before. You should read the threads abit deeper, there's a discussion on how meaningless the comparison of these numbers are.
If you're getting 50-100 requests a second, your site is doing pretty damn well and you can easily throw hardware at the problem for cheap and only focus on optimizing where optimization is absolutely necessary (e.g. DB query). If you really want to, you can try to optimize it to raw PHP, but its typically not worth the development time and cost.
QUOTE(mmweric @ Jun 14 2020, 12:34 PM)
Unfortunately, as I am not only a web developer and trying to set up my own SAAS application I do need to know a lot of other technical stuff like setting up security, web server, backup, dr, DB replication, monitoring, performance and cost optimization. From the business side, I need to know about marketing, sales, and operations.
Most web-devs have to know how to do the basic dev-ops stuff, but like previous advice, do the basic minimum you need. Don't try to dig in deep and understand everything, its just too much to take at once and end up you don't progress in your project because you're stuck researching/learning and getting headaches from the overload.