The difference between a pool and a cluster

From a pure point of view, they seem to feel identical concepts. Both manage sets of reosource / nodes and control their access using external components.

With the pool, you occupy and return these resources / nodes to and from the pool.

With the cluster, you have a load balancer sitting in front of resources / nodes, and you click on load balancing with the request.

In both cases, you have absolutely no control over which resource / node receives your request / borrowing.

So, I ask the question: what is the fundamental difference between a pool template and a load-balanced cluster?

+8
design-patterns cluster-computing pool load-balancing
source share
1 answer

The pool is used to avoid the constant creation and destruction of resources that are expensive to create. A resource from a pool can be used by only one client at a time. Available resources are stored in the pool. When you need it, you will receive it from the pool and thus make it inaccessible to other customers. When you finish working with the resource, you will return it to the pool. Typically, pools are used for connecting to databases and streams. Another advantage is that it allows you to maintain the amount of resources (connections, threads) to a reasonable maximum.

A cluster is a set of nodes (computers, virtual machines), which allows you to serve a larger number of simultaneous clients (scalability) and avoid a single point of failure (switching to a backup resource, redundancy). Also note that load balancers are not necessarily random. In many cases, the load balancer uses sticky sessions: after the client has been assigned to the node cluster, all of its subsequent requests go to the same node.

Thus, the goals do not match between the pool and the cluster. And the resources stored in the pool are not the same as the resources of the cluster.

+12
source share

All Articles