As I mentioned in the title, if I want to scale the system to handle more requests, then the created instances should be in different servers. is it right?. for example in tomcat in the context of spring, tomcat can handle up to 200 requests parallel, because it can create 200 threads, and each thread will handle the request. if i would like to handle more than 200 requsts in same time, then i should create multi instances in different servers and create loadbalancer to balance between instances. it does not make any sense to have multi instances on the same machine, right?
CodePudding user response:
Is it worth it? You'll have to judge. More important: You'll have to measure.
You can configure the thread pool of a single instance to handle more connections - but that wouldn't help if the CPU, Memory or I/O connections are already fully saturated. However, it doesn't really matter if that happens from within one or many processes.
It could make sense to have multiple processes if they all have different requirements to the underlying infrastructure. But if one of them saturates any resources already, then it doesn't make sense to add more processes. Or more threads for that matter.