LeeYongGu
LeeYongGu

Reputation: 23

Ignite, multiple service instances in a single node

In order to use all the resources in a single machine, I want to deploy multiple service instances in a single machine, and incoming service requests to be spread over these instances.

However, according to the documentation, it seems the load balancing only works in a cluster node level, not a service instance level.

I wrote test service code, and deploy 10 service instances in a single machine via deployMultiple() method. And I used this service in my client program, and log said, only one of 10 services instances actually served.

My question is, is it possible to allow multiple service instances in a single machine do serve simultaneously? If not possible, any other ways? like, deploy multiple docker instances in an single machine, or building thread pool structure in a service implementation?

Upvotes: 1

Views: 428

Answers (1)

Denis Mekhanikov
Denis Mekhanikov

Reputation: 3591

It's not possible to deploy multiple services on a single node, but service methods invocations are processed concurrently anyway.

You can configure service pool size: https://apacheignite.readme.io/docs/thread-pools#section-services-pool

By default it's number of available CPU cores. If an invocation comes to a node with a service, then a new thread is taken from the pool.

So, you won't benefit from having multiple instances of the same service on a single node.

Upvotes: 1

Related Questions