node.js - Pros & Cons of Running More Than One Node App Instance For A CodeBase -


we can run more 1 node app code base, need start them on diff port every time, not sure if doing or not.

i can see following pros & cons of approach

pros:

  • multiple domains sub1.domain.com, sub2.domain.com , on, sharing same code base.
  • updates code @ single place.

    any other pros mention?

cons:

  • may can cause dead lock on reading files or other multi process issue.

    any other cons mention?

is move share code base?

please share experience.

thank

you spawning several instances of application not bad or thing in itself, has application does. if application not access ressources shared instances of itself, not problem , can spawn many instances like, ever purpose see fit.

but if application uses shared ressources such database or flat files, need take race conditions , dead locks account. handled on acid compliant databases, on document oriented databases not mature , requires have grasp on techniques , languages used.

if there no obvious reason run multiple instances of application, not it.

once start going down route of multiple instances, have design around bottlenecks, network traffic, backups , lot of other things give people headaches, not because can.


Comments

Popular posts from this blog

get url and add instance to a model with prefilled foreign key :django admin -

css - Make div keyboard-scrollable in jQuery Mobile? -

ruby on rails - Seeing duplicate requests handled with Unicorn -