Why do we use multi application server instances on the same server

前端 未结 5 1567
攒了一身酷
攒了一身酷 2021-01-30 18:25

I guess there is a good reason, but I don\'t understand why sometimes we put for example 5 instances having the same webapplications on the same physical server.

Has it

5条回答
  •  面向向阳花
    2021-01-30 19:20

    I guess you are referring to application clustering.

    AFAIK, JVM's spawned with really large heap size have issues when it comes to garbage collection though I'm sure by playing around with the GC algorithm and parameters you can bring down the damage to a minimum. Plus, clustered applications don't have a single point of failure. If one node goes down, the remaining nodes can keep servicing the clients. This is one of the reasons why "message based architectures" are a good fit for scalability. Each request is mapped to a message which can then be picked up by any node in a cluster.

    Another point would be to service multiple requests simultaneously in case your application unfortunately uses synchronized keyword judiciously. We currently have a legacy application which has a lot of shared state (unfortunately) and hence concurrent request handling is done by spawning around 20 JVM processes with a central dispatching unit which does all the dispatching work. ;-)

提交回复
热议问题