pool
pool
Module
pool
Module summary
Load distribution facility.
Description
This module can be used to run a set of Erlang nodes as a pool of computational processors. It is organized as a master and a set of slave nodes and includes the following features:
- The slave nodes send regular reports to the master about their current load.
- Queries can be sent to the master to determine which node will have the least load.
The BIF statistics(run_queue)
is used for estimating future loads. It returns the length of the queue of ready to run processes in the Erlang runtime system.
The slave nodes are started with the slave(3)
module. This effects terminal I/O, file I/O, and code loading.
If the master node fails, the entire pool exits.