I would go with Laravel since it utilizes php which is built for back end.
Is Laravel more suitable than Nodejs as a backend/api for tiktok like applications?
I’m gathering requirements for building the backend and API for a TikTok-like app and trying to decide between Laravel and Node.js. Which is better for handling real-time features, heavy media uploads, and high concurrency?
Any advice on performance, scalability, and recommended third-party tools for either stack would be appreciated!
@Tray2 Thank you for your response, but it will be for backend, and for api for the flutter application. and may have to use socket because will use real-time chat maybe, real-time notifications, live-streams and more.
would laravel still be a good option because i never used socket and built it for large scale application that will be built to handle millions of users
@encodetocode Yes, you have laravel reverb for that.
Sounds like an ambitious project.
You can pick Laravel, Go, Node, or something else. It doesn't matter much, you can make any reasonable tech stack work. If your app grows to the point where the choice of technology starts to be a bottle neck, you probably have a thriving company with lot of developer resources for rewrites.
Node and Go are a lot faster out of the box compared to php-fpm. But with Laravel Octane, horizontal scaling and CDNs you can go really far.
@JussiMannisto Yes, it's quite ambitious! Thank you for your response. The app will have the same features and UI as TikTok but will be focused on a specific idea, with additional features tailored to that idea. We’re expecting millions of users to use the app and plan to utilize sockets as well.
As you mentioned, Node.js and Go are known for their speed and high concurrency. However, for the backend, Laravel can be very useful, efficient, and fast to ship, especially with tools like Filament and Livewire. I'm considering using Laravel for the backend only and Node.js for the API.
What do you think of this approach? I believe it could be a good option, as it allows for separating the backend from the API. This separation would ensure that if any critical issue occurs in the backend, it won't directly affect the API.
@encodetocode I assume by sockets you mean websockets.
I wouldn't use both Node and Laravel. I'd keep the tech stack simple for the MVP. I don't want to sound cruel, but it seems a bit silly to worry about scaling to millions of users when you currently have zero, and you've never even used websockets. Just make an app and worry about massive scales when it's relevant. You can even start on a single-server architecture. But I do recommend setting up read replica DBs from the get-go. And cache, cache, cache.
That's just my opinion. Go do what seems right for you.
I had read that NodeJS is more suitable for applications with a high traffic.
@vincent15000 Yes thats why i am rethinking about it, and can create multi-nodes anytime needed. so i am still reading and wanted to listen to whom more experienced than me in those types of applications
where do your skills lie?
@Snapey all skills lie in Laravel, but I did build some skills in node.js with asp.net for a single project built backend administration, and reports mostly
@encodetocode So you should better use Laravel ... unless you want to develop skills in NodeJS ?
Node backend suck to maintain for anything but the trivial. If you're not already very proficient, go with what you know.
Please or to participate in this conversation.