I think it would be better in your situation to use Nginx instead of Apache because Nginx is faster at serving static files and consumes much less memory for concurrent requests (which seems to be your case here) because Nginx is event-based it doesn't need to spawn new processes or threads for each request, so its memory usage is very low.
So perhapse use Apache for other content serving and Nginx for your socket comunication.
Edwin-Luijten, you're the man. Tried nginx and seems to be performing much better than Apache. Still have to verify on a large scale, but initial tests definitely show an improvement.
Thank you!
For future readers:
What I acutally did was to put nginx in front of the Apache and websocket servers.I created rules to proxy regular traffic to Apache and websocket traffic to the websocket server. That way I didn't have to change anything in the application, neither had to migrate the application to run on nginx.
It's a pretty slick solution.
Sign in to participate in this thread!
The Laravel portal for problem solving, knowledge sharing and community building.
The community