This creates a "cluster" of a scheduler and workers running on the local machine.
Number of workers to start
Whether to use processes (True) or threads (False). Defaults to True
Number of threads per each worker
Port of the scheduler. 8786 by default, use 0 to choose a random port
Level of logs to print out to stdout. ``logging.WARN`` by default. Use a falsey value like False or None for no change.
Host address on which the scheduler will listen, defaults to only localhost
Deprecated. See ``host`` above.
Address on which to listen for the Bokeh diagnostics server like 'localhost:8787' or '0.0.0.0:8787'. Defaults to ':8787'. Set to ``None`` to disable the dashboard. Use ':0' for a random port.
Address on which to listen for the Bokeh worker diagnostics server like 'localhost:8787' or '0.0.0.0:8787'. Defaults to None which disables the dashboard. Use ':0' for a random port.
Deprecated. See dashboard_address.
Set to True if using this cluster within async/await functions or within Tornado gen.coroutines. This should remain False for normal use.
A list of strings specifying a blacklist of handlers to disallow on the Scheduler, like ``['feed', 'run_function']``
Extra keywords to hand to the running services
Configures communication security in this cluster. Can be a security object, or True. If True, temporary self-signed credentials will be created automatically.
Protocol to use like ``tcp://``, ``tls://``, ``inproc://`` This defaults to sensible choice given other keyword arguments like ``processes`` and ``security``
Network interface to use. Defaults to lo/localhost
Worker class used to instantiate workers from.
Extra worker arguments. Any additional keyword arguments will be passed to the ``Worker`` class constructor.
>>> cluster = LocalCluster() # Create a local cluster with as many workers as cores # doctest: +SKIP >>> cluster # doctest: +SKIP LocalCluster("127.0.0.1:8786", workers=8, threads=8) >>> c = Client(cluster) # connect to local cluster # doctest: +SKIP Scale the cluster to three workers >>> cluster.scale(3) # doctest: +SKIP Pass extra keyword arguments to Bokeh >>> LocalCluster(service_kwargs={'dashboard': {'prefix': '/foo'}}) # doctest: +SKIP
This method overrides distributed.deploy.spec.SpecCluster.__init__.