nemec Posted October 12, 2012 Report Share Posted October 12, 2012 Man ir neliels skripts nodejs+socket.io+mysql. Kā palaist nodejs+socket.io produkcijā? Vai to var izdarīt ar nginx (cik labi strādā ar https://github.com/yaoweibin/nginx_tcp_proxy_module )? Vai labāk paņemt kādu gatavu hostingu? Quote Link to comment Share on other sites More sharing options...
0 marrtins Posted October 12, 2012 Report Share Posted October 12, 2012 nginx strādā stabili :) Quote Link to comment Share on other sites More sharing options...
0 nemec Posted October 13, 2012 Author Report Share Posted October 13, 2012 Njā, nočakarējos labu laiku un nekas tur nestrādā :D Uz viena porta (80.) nevar palaist kopā aplikāciju un web socketus, tātad nginx nav variants. Quote Link to comment Share on other sites More sharing options...
0 e-remit Posted October 13, 2012 Report Share Posted October 13, 2012 Protams, uz viena porta var palaist vienu aplikāciju. Cik atceros, nodei viens ports ir http requestiem, tad uz šī nodes http servera uzliekas socketu serveris, kurš klausās citu portu. Tu, protams, vari proxēt http requestus caur nginx, kam vajadzēs vēl trešo portu (tieši šeit būs 80.), bet visu varu vienu portu laist gan nevarēs. Quote Link to comment Share on other sites More sharing options...
0 marrtins Posted October 14, 2012 Report Share Posted October 14, 2012 (edited) Tak laid uz citiem portiem/IP, pēc tam proxē. Edited October 14, 2012 by marrtins Quote Link to comment Share on other sites More sharing options...
0 nemec Posted November 14, 2012 Author Report Share Posted November 14, 2012 Citi porti var būt bloķēti. Īstenībā baigā problēma izvietot socket.io ar websocketiem, jo kopā ar nginx nesanāk un pat heroku atbalsta tikai long polling. Kā ir ar long polling? Ar to var izveidot tik pat baudāmu daudzlietotāju reāllaika spēli kā ar websocket`iem? Piemēram ar tādām kustībām kā bomberman`ā. Quote Link to comment Share on other sites More sharing options...
Question
nemec
Man ir neliels skripts nodejs+socket.io+mysql.
Kā palaist nodejs+socket.io produkcijā?
Vai to var izdarīt ar nginx (cik labi strādā ar https://github.com/yaoweibin/nginx_tcp_proxy_module )?
Vai labāk paņemt kādu gatavu hostingu?
Link to comment
Share on other sites
5 answers to this question
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.