Hello,
You are correct in assuming that, in most use cases, a grid topology with a single driver will be the most efficient. However, there are other consideration in addition to pure efficiency, that multi-driver topologies attempt to address:
1) Failover / fault tolerance / recovery
In a single driver setup, the driver is a single point of failure. If it dies, the entire grid stops working. Having multiple drivers resolves that problem when used with built-in capabilities of the clients and nodes:
- a client can connect to multiple drivers and define both failover and load-balancing strategies between these drivers. When a driver connection fails, the client will reroute the unexecuted workload to another driver.
- nodes are attached to a single driver at a time, however you can define how they will attempt to reconnect to the same or another driver, using the node connection strategy extension point
2) Scalability
All operating systems I know of have an intrinsic limit on the number of available TCP ports. Port numbers are in the theoretical range 0 ... 65,535 but in practice it will be less than that. Since JPPF nodes and clients require 2 TCP connections with the driver (in fact more if you include management), then a driver can be connected to a theoretical maximum of 32k nodes and clients. But what if you want 100,000 nodes? Having multiple drivers allows it. For instance, you can have 10 drivers with 10,000 nodes attached to each, and configure the client(s) to load-balance between these drivers, or configure the drivers to communicate with each other and do the load-balancing themselves ... or both
3) Complex network topologies
In some situations, your nodes may be distributed over multiple separate environments, completely distinct from each other. For instance let's imagine you have 2 cloud environments, one on Amazon EC2 and the other on Rackspace. In a typical
cloud configuration, only a driver will have a public address reachable from a client, and the nodes will only have private addresses. How to combine the power of the two clouds? By having a publicly accessible driver in each and configuring the client to load-balance between them. In this setup, each driver can also be seen as a gateway to a cloud environment.
I hope this answers your questions,
-Laurent