Node.js + Nginx - What now?

后端 未结 12 1621
抹茶落季
抹茶落季 2020-11-22 00:26

I\'ve set up Node.js and Nginx on my server. Now I want to use it, but, before I start there are 2 questions:

  1. How should they work together? How should I handl
12条回答
  •  情深已故
    2020-11-22 00:50

    answering your question 2:

    I would use option b simply because it consumes much less resources. with option 'a', every client will cause the server to consume a lot of memory, loading all the files you need (even though i like php, this is one of the problems with it). With option 'b' you can load your libraries (reusable code) and share them among all client requests.

    But be ware that if you have multiple cores you should tweak node.js to use all of them.

提交回复
热议问题