Hello StackOverFlow community,
My Configuration :
I'm building a php app based on an MVC (C module) and I am using nginx. The session is stored in Redis (session server).
And I have node.js and socket.io runing to manage all the realTime things (Chat, presence on the page, etc...)
The node.js and php uses the same session from redis (the authentification is done only once in the PHP side) and node.js uses cookies module to use it.
The socket.io is on a port and in nginx configuration I root /socket.io/ on that port.(streaming way).
The issue or question :
The thing is that Speed is very important and I don't like php for that (the code has to compile everytime), and I need it realTime '!'. so For now I ask my socket.io to tell my visitor to do an ajax call on the php (triger the call from client side). but I don't like it not clean.
The server is 256GB RAM, 8 cores/16 threads, process 2.8-3.5GHz and the maximum visitor I'll have on each of those categories of server at the same time will not go over 1000 visitor. with different timezone so maximum 10 to 60 req/seconds.
Can I use socket.io for my data and calls ? I mean I don't have to use the event as "submit" then "on" I can do a submit() and make a callback so I don't have to send headers etc each time.
And also the alternative would be to use ReactPHP (compile once then keep runing).
Do you think it'll be stable ? (97.5%) is enough. do you have any suggestion ? Please feel free to correct me also :). If I am doing something wrong.