MikZuit
MikZuit

Reputation: 734

node express vhosts VS multiple node applications on NGINX server

Is is possible to have an answer "to have and idea" with this info? :

In terms of performance ( basically speed )

QUESTION 1

1: what would be best to set on a nginx server :

Considering domains:

All domains and subdomains might let the user connect with one Authentication using Passport on all domains/subdomains

A) Nginx vhosts for A (one) node app with multiple express vhosts for each domain. (i'm aware in this case I would have to restart all domains when I have to update one site)

B) Nginx vhosts for each node app for each domain.

QUESTION 2

2) Would it change much this performance if also want to use this server for , lets say, two additional ssl api with php ?

Thanks in advance.

Upvotes: 2

Views: 427

Answers (1)

MikZuit
MikZuit

Reputation: 734

Without using a concrete speed testing tool( still now able to do this )

I manage to set node applications in 1) one application serving to multiples vhosts with express and 2) each application for each domain using pm2 and pm2 shows me same memory used on both cases.

Then in terms of speed seems shows me almost the same in both cases on low web requirements. (still didn't manage to made this in a tool like jmeter)

So to easy autorespond my question:

Question 1: I would consume less memory (because will use only when a site is used) if I set websites in one application. And the speed will not be differ much when websites are recursively used.

Question 2: Php sites I would add to this server will affect in the same case (amount) for each case.

My decision thought is to use separate applications so I would easily move to another server when required.

Thanks

Upvotes: 2

Related Questions