/usr/share/doc/python-distributed-doc/html/resilience.html is in python-distributed-doc 1.20.2+ds.1-2.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 | <!DOCTYPE html>
<!--[if IE 8]><html class="no-js lt-ie9" lang="en" > <![endif]-->
<!--[if gt IE 8]><!--> <html class="no-js" lang="en" > <!--<![endif]-->
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Resilience — Dask.distributed 0+unknown documentation</title>
<link rel="stylesheet" href="_static/css/theme.css" type="text/css" />
<link rel="index" title="Index"
href="genindex.html"/>
<link rel="search" title="Search" href="search.html"/>
<link rel="top" title="Dask.distributed 0+unknown documentation" href="index.html"/>
<link rel="next" title="Scheduling Policies" href="scheduling-policies.html"/>
<link rel="prev" title="Related Work" href="related-work.html"/>
<script src="_static/js/modernizr.min.js"></script>
</head>
<body class="wy-body-for-nav" role="document">
<div class="wy-grid-for-nav">
<nav data-toggle="wy-nav-shift" class="wy-nav-side">
<div class="wy-side-scroll">
<div class="wy-side-nav-search">
<a href="index.html" class="icon icon-home"> Dask.distributed
</a>
<div class="version">
0+unknown
</div>
<div role="search">
<form id="rtd-search-form" class="wy-form" action="search.html" method="get">
<input type="text" name="q" placeholder="Search docs" />
<input type="hidden" name="check_keywords" value="yes" />
<input type="hidden" name="area" value="default" />
</form>
</div>
</div>
<div class="wy-menu wy-menu-vertical" data-spy="affix" role="navigation" aria-label="main navigation">
<p class="caption"><span class="caption-text">Getting Started</span></p>
<ul>
<li class="toctree-l1"><a class="reference internal" href="install.html">Install Dask.Distributed</a></li>
<li class="toctree-l1"><a class="reference internal" href="quickstart.html">Quickstart</a></li>
<li class="toctree-l1"><a class="reference internal" href="setup.html">Setup Network</a></li>
<li class="toctree-l1"><a class="reference internal" href="client.html">Client</a></li>
<li class="toctree-l1"><a class="reference internal" href="api.html">API</a></li>
<li class="toctree-l1"><a class="reference internal" href="faq.html">Frequently Asked Questions</a></li>
</ul>
<p class="caption"><span class="caption-text">Build Understanding</span></p>
<ul class="current">
<li class="toctree-l1"><a class="reference internal" href="diagnosing-performance.html">Diagnosing Performance</a></li>
<li class="toctree-l1"><a class="reference internal" href="efficiency.html">Efficiency</a></li>
<li class="toctree-l1"><a class="reference internal" href="limitations.html">Limitations</a></li>
<li class="toctree-l1"><a class="reference internal" href="locality.html">Data Locality</a></li>
<li class="toctree-l1"><a class="reference internal" href="manage-computation.html">Managing Computation</a></li>
<li class="toctree-l1"><a class="reference internal" href="memory.html">Managing Memory</a></li>
<li class="toctree-l1"><a class="reference internal" href="related-work.html">Related Work</a></li>
<li class="toctree-l1 current"><a class="current reference internal" href="#">Resilience</a><ul>
<li class="toctree-l2"><a class="reference internal" href="#user-code-failures">User code failures</a></li>
<li class="toctree-l2"><a class="reference internal" href="#closed-network-connections">Closed Network Connections</a></li>
<li class="toctree-l2"><a class="reference internal" href="#hardware-failures">Hardware Failures</a></li>
<li class="toctree-l2"><a class="reference internal" href="#scheduler-failure">Scheduler Failure</a></li>
<li class="toctree-l2"><a class="reference internal" href="#restart-and-nanny-processes">Restart and Nanny Processes</a></li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="scheduling-policies.html">Scheduling Policies</a></li>
<li class="toctree-l1"><a class="reference internal" href="scheduling-state.html">Scheduling State</a></li>
<li class="toctree-l1"><a class="reference internal" href="worker.html">Worker</a></li>
<li class="toctree-l1"><a class="reference internal" href="work-stealing.html">Work Stealing</a></li>
</ul>
<p class="caption"><span class="caption-text">Additional Features</span></p>
<ul>
<li class="toctree-l1"><a class="reference internal" href="adaptive.html">Adaptive Deployments</a></li>
<li class="toctree-l1"><a class="reference internal" href="asynchronous.html">Asynchronous Operation</a></li>
<li class="toctree-l1"><a class="reference internal" href="configuration.html">Configuration</a></li>
<li class="toctree-l1"><a class="reference internal" href="ec2.html">EC2 Startup Script</a></li>
<li class="toctree-l1"><a class="reference internal" href="local-cluster.html">Local Cluster</a></li>
<li class="toctree-l1"><a class="reference internal" href="ipython.html">IPython Integration</a></li>
<li class="toctree-l1"><a class="reference internal" href="joblib.html">Joblib Integration</a></li>
<li class="toctree-l1"><a class="reference internal" href="publish.html">Publish Datasets</a></li>
<li class="toctree-l1"><a class="reference internal" href="queues.html">Data Streams with Queues</a></li>
<li class="toctree-l1"><a class="reference internal" href="resources.html">Worker Resources</a></li>
<li class="toctree-l1"><a class="reference internal" href="submitting-applications.html">Submitting Applications</a></li>
<li class="toctree-l1"><a class="reference internal" href="task-launch.html">Launch Tasks from Tasks</a></li>
<li class="toctree-l1"><a class="reference internal" href="tls.html">TLS/SSL</a></li>
<li class="toctree-l1"><a class="reference internal" href="web.html">Web Interface</a></li>
</ul>
<p class="caption"><span class="caption-text">Developer Documentation</span></p>
<ul>
<li class="toctree-l1"><a class="reference internal" href="changelog.html">Changelog</a></li>
<li class="toctree-l1"><a class="reference internal" href="communications.html">Communications</a></li>
<li class="toctree-l1"><a class="reference internal" href="develop.html">Development Guidelines</a></li>
<li class="toctree-l1"><a class="reference internal" href="foundations.html">Foundations</a></li>
<li class="toctree-l1"><a class="reference internal" href="journey.html">Journey of a Task</a></li>
<li class="toctree-l1"><a class="reference internal" href="protocol.html">Protocol</a></li>
<li class="toctree-l1"><a class="reference internal" href="serialization.html">Custom Serialization</a></li>
<li class="toctree-l1"><a class="reference internal" href="plugins.html">Scheduler Plugins</a></li>
</ul>
</div>
</div>
</nav>
<section data-toggle="wy-nav-shift" class="wy-nav-content-wrap">
<nav class="wy-nav-top" role="navigation" aria-label="top navigation">
<i data-toggle="wy-nav-top" class="fa fa-bars"></i>
<a href="index.html">Dask.distributed</a>
</nav>
<div class="wy-nav-content">
<div class="rst-content">
<div role="navigation" aria-label="breadcrumbs navigation">
<ul class="wy-breadcrumbs">
<li><a href="index.html">Docs</a> »</li>
<li>Resilience</li>
<li class="wy-breadcrumbs-aside">
<a href="_sources/resilience.rst.txt" rel="nofollow"> View page source</a>
</li>
</ul>
<hr/>
</div>
<div role="main" class="document" itemscope="itemscope" itemtype="http://schema.org/Article">
<div itemprop="articleBody">
<div class="section" id="resilience">
<h1>Resilience<a class="headerlink" href="#resilience" title="Permalink to this headline">¶</a></h1>
<p>Software fails, Hardware fails, network connections fail, user code fails.
This document describes how <code class="docutils literal"><span class="pre">dask.distributed</span></code> responds in the face of these
failures and other known bugs.</p>
<div class="section" id="user-code-failures">
<h2>User code failures<a class="headerlink" href="#user-code-failures" title="Permalink to this headline">¶</a></h2>
<p>When a function raises an error that error is kept and transmitted to the
client on request. Any attempt to gather that result <em>or any dependent
result</em> will raise that exception.</p>
<div class="highlight-python"><div class="highlight"><pre><span></span><span class="gp">>>> </span><span class="k">def</span> <span class="nf">div</span><span class="p">(</span><span class="n">a</span><span class="p">,</span> <span class="n">b</span><span class="p">):</span>
<span class="gp">... </span> <span class="k">return</span> <span class="n">a</span> <span class="o">/</span> <span class="n">b</span>
<span class="gp">>>> </span><span class="n">x</span> <span class="o">=</span> <span class="n">client</span><span class="o">.</span><span class="n">submit</span><span class="p">(</span><span class="n">div</span><span class="p">,</span> <span class="mi">1</span><span class="p">,</span> <span class="mi">0</span><span class="p">)</span>
<span class="gp">>>> </span><span class="n">x</span><span class="o">.</span><span class="n">result</span><span class="p">()</span>
<span class="go">ZeroDivisionError: division by zero</span>
<span class="gp">>>> </span><span class="n">y</span> <span class="o">=</span> <span class="n">client</span><span class="o">.</span><span class="n">submit</span><span class="p">(</span><span class="n">add</span><span class="p">,</span> <span class="n">x</span><span class="p">,</span> <span class="mi">10</span><span class="p">)</span>
<span class="gp">>>> </span><span class="n">y</span><span class="o">.</span><span class="n">result</span><span class="p">()</span> <span class="c1"># same error as above</span>
<span class="go">ZeroDivisionError: division by zero</span>
</pre></div>
</div>
<p>This does not affect the smooth operation of the scheduler or worker in any
way.</p>
</div>
<div class="section" id="closed-network-connections">
<h2>Closed Network Connections<a class="headerlink" href="#closed-network-connections" title="Permalink to this headline">¶</a></h2>
<p>If the connection to a remote worker unexpectedly closes and the local process
appropriately raises an <code class="docutils literal"><span class="pre">IOError</span></code> then the scheduler will reroute all pending
computations to other workers.</p>
<p>If the lost worker was the only worker to hold vital results necessary for
future computations then those results will be recomputed by surviving workers.
The scheduler maintains a full history of how each result was produced and so is
able to reproduce those same computations on other workers.</p>
<p>This has some fail cases.</p>
<ol class="arabic simple">
<li>If results depend on impure functions then you may get a different
(although still entirely accurate) result</li>
<li>If the worker failed due to a bad function, for example a function that
causes a segmentation fault, then that bad function will repeatedly be
called on other workers. This function will be marked as “bad” after it
kills a fixed number of workers (defaults to three).</li>
<li>Data scattered out to the workers is not kept in the scheduler (it is
often quite large) and so the loss of this data is irreparable. You may
wish to call <code class="docutils literal"><span class="pre">Client.replicate</span></code> on the data with a suitable replication
factor to ensure that it remains long-lived or else back the data off of
some resilient store, like a file system.</li>
</ol>
</div>
<div class="section" id="hardware-failures">
<h2>Hardware Failures<a class="headerlink" href="#hardware-failures" title="Permalink to this headline">¶</a></h2>
<p>It is not clear under which circumstances the local process will know that the
remote worker has closed the connection. If the socket does not close cleanly
then the system will wait for a timeout, roughly three seconds, before marking
the worker as failed and resuming smooth operation.</p>
</div>
<div class="section" id="scheduler-failure">
<h2>Scheduler Failure<a class="headerlink" href="#scheduler-failure" title="Permalink to this headline">¶</a></h2>
<p>The process containing the scheduler might die. There is currently no
persistence mechanism to record and recover the scheduler state.</p>
<p>The workers and clients will all reconnect to the scheduler after it comes back
online but records of ongoing computations will be lost.</p>
</div>
<div class="section" id="restart-and-nanny-processes">
<h2>Restart and Nanny Processes<a class="headerlink" href="#restart-and-nanny-processes" title="Permalink to this headline">¶</a></h2>
<p>The client provides a mechanism to restart all of the workers in the cluster.
This is convenient if, during the course of experimentation, you find your
workers in an inconvenient state that makes them unresponsive. The
<code class="docutils literal"><span class="pre">Client.restart</span></code> method kills all workers, flushes all scheduler state, and
then brings all workers back online, resulting in a clean cluster.</p>
</div>
</div>
</div>
<div class="articleComments">
</div>
</div>
<footer>
<div class="rst-footer-buttons" role="navigation" aria-label="footer navigation">
<a href="scheduling-policies.html" class="btn btn-neutral float-right" title="Scheduling Policies" accesskey="n" rel="next">Next <span class="fa fa-arrow-circle-right"></span></a>
<a href="related-work.html" class="btn btn-neutral" title="Related Work" accesskey="p" rel="prev"><span class="fa fa-arrow-circle-left"></span> Previous</a>
</div>
<hr/>
<div role="contentinfo">
<p>
© Copyright 2017, Anaconda, Inc..
</p>
</div>
Built with <a href="http://sphinx-doc.org/">Sphinx</a> using a <a href="https://github.com/snide/sphinx_rtd_theme">theme</a> provided by <a href="https://readthedocs.org">Read the Docs</a>.
</footer>
</div>
</div>
</section>
</div>
<script type="text/javascript">
var DOCUMENTATION_OPTIONS = {
URL_ROOT:'./',
VERSION:'0+unknown',
COLLAPSE_INDEX:false,
FILE_SUFFIX:'.html',
HAS_SOURCE: true,
SOURCELINK_SUFFIX: '.txt'
};
</script>
<script type="text/javascript" src="_static/jquery.js"></script>
<script type="text/javascript" src="_static/underscore.js"></script>
<script type="text/javascript" src="_static/doctools.js"></script>
<script type="text/javascript" src="_static/js/theme.js"></script>
<script type="text/javascript">
jQuery(function () {
SphinxRtdTheme.StickyNav.enable();
});
</script>
</body>
</html>
|