php - Technical aspects of running Node.js and apache in parallel -


earlier today, asked question on programmers stackexchange: is bad practice run node.js , apache in parallel?

my end application can considered social network in want have chat feature , normal status update feature.

for chat feature, i'd use node.js because want push data server client instead of polling server frequently. status update, want normal apache , php installation, because i'm way more familiar , don't see why i'd use node.js that.

however, mean i'd have run node.js , apache in parallel. whilst possible , not considered bad practice according answer on programmers.se, see few technical problems:

  • i'd need 2 ports open - give problem open networks don't have ports open

  • i can't use shared-server because i'm not allowed open port there, i'd have buy vps

i don't care second one, more first one. there no solutions combine both features on 1 port?

or there workaround ports? i, example, redirect subdomain.domain.com:80 domain.com:x x port of node.js? possible , solve problem? solution given in this programmers.se answer, how go implementing it?

as @thehippo said can apache's mod_proxy.

nginx may act faster if you're running php >= 5.4 fastcgi. nginx better forwarding proxy apache , it's event based model in line node's event based i/o. propper setup mean better overall performance.

if you're in restricted environment (like shared server or no ability change webserver) should go apache , mod_proxy.


Comments

Popular posts from this blog

blackberry 10 - how to add multiple markers on the google map just by url? -

php - guestbook returning database data to flash -

delphi - Dynamic file type icon -