forked from dask/dask-gateway
/
api-server.html
3067 lines (2630 loc) · 204 KB
/
api-server.html
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
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
<!DOCTYPE html>
<html lang="en" >
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Configuration Reference — Dask Gateway 0.8.0 documentation</title>
<link rel="stylesheet" href="_static/css/style.css" type="text/css" />
<link rel="stylesheet" href="_static/pygments.css" type="text/css" />
<link rel="stylesheet" href="_static/css/explore.css" type="text/css" />
<link rel="stylesheet" href="_static/css/nbsphinx.css" type="text/css" />
<!--[if lt IE 9]>
<script src="_static/js/html5shiv.min.js"></script>
<![endif]-->
<script type="text/javascript" id="documentation_options" data-url_root="./" src="_static/documentation_options.js"></script>
<script src="_static/jquery.js"></script>
<script src="_static/underscore.js"></script>
<script src="_static/doctools.js"></script>
<script src="_static/language_data.js"></script>
<script src="_static/js/custom.js"></script>
<script type="text/javascript" src="_static/js/theme.js"></script>
<link rel="index" title="Index" href="genindex.html" />
<link rel="search" title="Search" href="search.html" />
<link rel="next" title="Development" href="develop.html" />
<link rel="prev" title="Client API" href="api-client.html" />
<link rel="shortcut icon" href="_static/images/favicon.ico"/>
</head>
<body class="wy-body-for-nav">
<nav id="explore-links">
<a href="https://docs.dask.org/">
<img class="caption" src="_static/images/dask-horizontal-white.svg"/>
</a>
<ul>
<li>
<a>Get Started</a>
<ul>
<li><a href="https://docs.dask.org/en/latest/install.html"> Install </a></li>
<li><a href="https://examples.dask.org"> Examples </a></li>
<li><a href="https://github.com/dask/dask-tutorial"> Tutorial </a></li>
<li><a href="https://docs.dask.org/en/latest/why.html"> Why Dask? </a></li>
<li><a href="https://stories.dask.org/en/latest"> Use Cases </a></li>
<li><a href="https://www.youtube.com/watch?v=RA_2qdipVng&list=PLRtz5iA93T4PQvWuoMnIyEIz1fXiJ5Pri"> Talks </a></li>
<li><a href="https://mybinder.org/v2/gh/dask/dask-examples/master?urlpath=lab"> Try Online </a></li>
<li><a href="https://dask.org/slides"> Slides </a></li>
</ul>
</li>
<li>
<a href="">Algorithms</a>
<ul>
<li><a href="https://docs.dask.org/en/latest/array.html">Arrays</a></li>
<li><a href="https://docs.dask.org/en/latest/dataframe.html">Dataframes</a></li>
<li><a href="https://docs.dask.org/en/latest/bag.html">Bags</a></li>
<li><a href="https://docs.dask.org/en/latest/delayed.html">Delayed (custom)</a></li>
<li><a href="https://docs.dask.org/en/latest/futures.html">Futures (real-time)</a></li>
<li><a href="http://ml.dask.org">Machine Learning</a></li>
<li><a href="https://xarray.pydata.org/en/latest/">XArray</a></li>
</ul>
</li>
<li>
<a href="https://docs.dask.org/en/latest/setup.html">Setup</a>
<ul>
<li><a href="https://docs.dask.org/en/latest/setup/single-machine.html"> Local </a></li>
<li><a href="https://docs.dask.org/en/latest/setup/cloud.html"> Cloud </a></li>
<li><a href="https://docs.dask.org/en/latest/setup/hpc.html"> HPC </a></li>
<li><a href="https://kubernetes.dask.org/en/latest/"> Kubernetes </a></li>
<li><a href="https://yarn.dask.org/en/latest/"> Hadoop / Yarn </a></li>
</ul>
</li>
<li>
<a>Community</a>
<ul>
<li><a href="http://docs.dask.org/en/latest/support.html">Ask for Help</a></li>
<li><a href="https://github.com/dask">Github</a></li>
<li><a href="https://stackoverflow.com/questions/tagged/dask">Stack Overflow</a></li>
<li><a href="https://twitter.com/dask_dev">Twitter</a></li>
<li><a href="https://blog.dask.org/"> Developer Blog </a></li>
<li><a href="https://www.youtube.com/channel/UCj9eavqmvwaCyKhIlu2GaoA/"> YouTube Channel </a></li>
</ul>
</li>
</ul>
</nav>
<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" alt="Documentation Home"> Dask Gateway
</a>
<div class="version">
0.8.0
</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">For Users</span></p>
<ul>
<li class="toctree-l1"><a class="reference internal" href="install-user.html">Installation</a></li>
<li class="toctree-l1"><a class="reference internal" href="usage.html">Usage</a></li>
<li class="toctree-l1"><a class="reference internal" href="configuration-user.html">Configuration</a></li>
</ul>
<p class="caption"><span class="caption-text">Admin - Installation</span></p>
<ul>
<li class="toctree-l1"><a class="reference internal" href="install-local.html">Install Locally (Quickstart)</a></li>
<li class="toctree-l1"><a class="reference internal" href="install-hadoop.html">Install on a Hadoop Cluster</a></li>
<li class="toctree-l1"><a class="reference internal" href="install-kube.html">Install on a Kubernetes Cluster</a></li>
<li class="toctree-l1"><a class="reference internal" href="install-jobqueue.html">Install on an HPC Job Queue</a></li>
</ul>
<p class="caption"><span class="caption-text">Admin - Customization</span></p>
<ul>
<li class="toctree-l1"><a class="reference internal" href="authentication.html">Authentication</a></li>
<li class="toctree-l1"><a class="reference internal" href="security.html">Security settings</a></li>
<li class="toctree-l1"><a class="reference internal" href="cluster-options.html">Exposing Cluster Options</a></li>
<li class="toctree-l1"><a class="reference internal" href="resource-limits.html">Cluster Resource Limits</a></li>
</ul>
<p class="caption"><span class="caption-text">Reference</span></p>
<ul class="current">
<li class="toctree-l1"><a class="reference internal" href="api-client.html">Client API</a></li>
<li class="toctree-l1 current"><a class="current reference internal" href="#">Configuration Reference</a><ul>
<li class="toctree-l2"><a class="reference internal" href="#gateway-server">Gateway Server</a></li>
<li class="toctree-l2"><a class="reference internal" href="#authentication">Authentication</a><ul>
<li class="toctree-l3"><a class="reference internal" href="#kerberosauthenticator">KerberosAuthenticator</a></li>
<li class="toctree-l3"><a class="reference internal" href="#jupyterhubauthenticator">JupyterHubAuthenticator</a></li>
<li class="toctree-l3"><a class="reference internal" href="#simpleauthenticator">SimpleAuthenticator</a></li>
</ul>
</li>
<li class="toctree-l2"><a class="reference internal" href="#cluster-backends">Cluster Backends</a><ul>
<li class="toctree-l3"><a class="reference internal" href="#base-class">Base Class</a><ul>
<li class="toctree-l4"><a class="reference internal" href="#clusterconfig">ClusterConfig</a></li>
<li class="toctree-l4"><a class="reference internal" href="#backend">Backend</a></li>
</ul>
</li>
<li class="toctree-l3"><a class="reference internal" href="#local-processes">Local Processes</a><ul>
<li class="toctree-l4"><a class="reference internal" href="#localclusterconfig">LocalClusterConfig</a></li>
<li class="toctree-l4"><a class="reference internal" href="#localbackend">LocalBackend</a></li>
<li class="toctree-l4"><a class="reference internal" href="#unsafelocalbackend">UnsafeLocalBackend</a></li>
</ul>
</li>
<li class="toctree-l3"><a class="reference internal" href="#yarn">YARN</a><ul>
<li class="toctree-l4"><a class="reference internal" href="#yarnclusterconfig">YarnClusterConfig</a></li>
<li class="toctree-l4"><a class="reference internal" href="#yarnbackend">YarnBackend</a></li>
</ul>
</li>
<li class="toctree-l3"><a class="reference internal" href="#kubernetes">Kubernetes</a><ul>
<li class="toctree-l4"><a class="reference internal" href="#kubeclusterconfig">KubeClusterConfig</a></li>
<li class="toctree-l4"><a class="reference internal" href="#kubebackend">KubeBackend</a></li>
<li class="toctree-l4"><a class="reference internal" href="#kubecontroller">KubeController</a></li>
</ul>
</li>
<li class="toctree-l3"><a class="reference internal" href="#job-queues">Job Queues</a><ul>
<li class="toctree-l4"><a class="reference internal" href="#pbsclusterconfig">PBSClusterConfig</a></li>
<li class="toctree-l4"><a class="reference internal" href="#pbsbackend">PBSBackend</a></li>
<li class="toctree-l4"><a class="reference internal" href="#slurmclusterconfig">SlurmClusterConfig</a></li>
<li class="toctree-l4"><a class="reference internal" href="#slurmbackend">SlurmBackend</a></li>
</ul>
</li>
</ul>
</li>
<li class="toctree-l2"><a class="reference internal" href="#proxy">Proxy</a><ul>
<li class="toctree-l3"><a class="reference internal" href="#id1">Proxy</a></li>
</ul>
</li>
<li class="toctree-l2"><a class="reference internal" href="#cluster-manager-options">Cluster Manager Options</a></li>
<li class="toctree-l2"><a class="reference internal" href="#models">Models</a><ul>
<li class="toctree-l3"><a class="reference internal" href="#user">User</a></li>
<li class="toctree-l3"><a class="reference internal" href="#cluster">Cluster</a></li>
</ul>
</li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="develop.html">Development</a></li>
</ul>
</div>
</div>
</nav>
<section data-toggle="wy-nav-shift" class="wy-nav-content-wrap">
<nav class="wy-nav-top" aria-label="top navigation">
<i data-toggle="wy-nav-top" class="fa fa-bars"></i>
<a href="index.html">Dask Gateway</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" class="icon icon-home"></a> »</li>
<li>Configuration Reference</li>
<li class="wy-breadcrumbs-aside">
<a href="_sources/api-server.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="configuration-reference">
<h1>Configuration Reference<a class="headerlink" href="#configuration-reference" title="Permalink to this headline">¶</a></h1>
<div class="section" id="gateway-server">
<h2>Gateway Server<a class="headerlink" href="#gateway-server" title="Permalink to this headline">¶</a></h2>
<dl class="py data">
<dt id="c.DaskGateway.address">
<code class="sig-prename descclassname">c.DaskGateway.</code><code class="sig-name descname">address</code><em class="property"> = Unicode('')</em><a class="headerlink" href="#c.DaskGateway.address" title="Permalink to this definition">¶</a></dt>
<dd><p>The address the private api server should <em>listen</em> at.</p>
<p>Should be of the form <code class="docutils literal notranslate"><span class="pre">{hostname}:{port}</span></code></p>
<p>Where:</p>
<ul class="simple">
<li><p><code class="docutils literal notranslate"><span class="pre">hostname</span></code> sets the hostname to <em>listen</em> at. Set to <code class="docutils literal notranslate"><span class="pre">""</span></code> or
<code class="docutils literal notranslate"><span class="pre">"0.0.0.0"</span></code> to listen on all interfaces.</p></li>
<li><p><code class="docutils literal notranslate"><span class="pre">port</span></code> sets the port to <em>listen</em> at.</p></li>
</ul>
<p>Defaults to <code class="docutils literal notranslate"><span class="pre">127.0.0.1:0</span></code>.</p>
</dd></dl>
<dl class="py data">
<dt id="c.DaskGateway.authenticator_class">
<code class="sig-prename descclassname">c.DaskGateway.</code><code class="sig-name descname">authenticator_class</code><em class="property"> = Type('dask_gateway_server.auth.SimpleAuthenticator')</em><a class="headerlink" href="#c.DaskGateway.authenticator_class" title="Permalink to this definition">¶</a></dt>
<dd><p>The gateway authenticator class to use</p>
</dd></dl>
<dl class="py data">
<dt id="c.DaskGateway.backend_class">
<code class="sig-prename descclassname">c.DaskGateway.</code><code class="sig-name descname">backend_class</code><em class="property"> = Type('dask_gateway_server.backends.Backend')</em><a class="headerlink" href="#c.DaskGateway.backend_class" title="Permalink to this definition">¶</a></dt>
<dd><p>The gateway backend class to use</p>
</dd></dl>
<dl class="py data">
<dt id="c.DaskGateway.config_file">
<code class="sig-prename descclassname">c.DaskGateway.</code><code class="sig-name descname">config_file</code><em class="property"> = Unicode('dask_gateway_config.py')</em><a class="headerlink" href="#c.DaskGateway.config_file" title="Permalink to this definition">¶</a></dt>
<dd><p>The config file to load</p>
</dd></dl>
<dl class="py data">
<dt id="c.DaskGateway.log_datefmt">
<code class="sig-prename descclassname">c.DaskGateway.</code><code class="sig-name descname">log_datefmt</code><em class="property"> = Unicode('%Y-%m-%d %H:%M:%S')</em><a class="headerlink" href="#c.DaskGateway.log_datefmt" title="Permalink to this definition">¶</a></dt>
<dd><p>The date format used by logging formatters for %(asctime)s</p>
</dd></dl>
<dl class="py data">
<dt id="c.DaskGateway.log_format">
<code class="sig-prename descclassname">c.DaskGateway.</code><code class="sig-name descname">log_format</code><em class="property"> = Unicode('%(log_color)s[%(levelname)1.1s %(asctime)s.%(msecs).03d %(name)s]%(reset)s %(message)s')</em><a class="headerlink" href="#c.DaskGateway.log_format" title="Permalink to this definition">¶</a></dt>
<dd><p>The Logging format template</p>
</dd></dl>
<dl class="py data">
<dt id="c.DaskGateway.log_level">
<code class="sig-prename descclassname">c.DaskGateway.</code><code class="sig-name descname">log_level</code><em class="property"> = Enum('INFO')</em><a class="headerlink" href="#c.DaskGateway.log_level" title="Permalink to this definition">¶</a></dt>
<dd><p>Set the log level by value or name.</p>
</dd></dl>
</div>
<div class="section" id="authentication">
<h2>Authentication<a class="headerlink" href="#authentication" title="Permalink to this headline">¶</a></h2>
<div class="section" id="kerberosauthenticator">
<span id="kerberos-auth-config"></span><h3>KerberosAuthenticator<a class="headerlink" href="#kerberosauthenticator" title="Permalink to this headline">¶</a></h3>
<dl class="py data">
<dt id="c.KerberosAuthenticator.cache_max_age">
<code class="sig-prename descclassname">c.KerberosAuthenticator.</code><code class="sig-name descname">cache_max_age</code><em class="property"> = Int(300)</em><a class="headerlink" href="#c.KerberosAuthenticator.cache_max_age" title="Permalink to this definition">¶</a></dt>
<dd><p>The maximum time in seconds to cache authentication information.</p>
<p>Helps reduce load on the backing authentication service by caching
responses between requests. After this time the user will need to be
reauthenticated before making additional requests (note this is usually
transparent to the user).</p>
</dd></dl>
<dl class="py data">
<dt id="c.KerberosAuthenticator.cookie_name">
<code class="sig-prename descclassname">c.KerberosAuthenticator.</code><code class="sig-name descname">cookie_name</code><em class="property"> = Unicode('')</em><a class="headerlink" href="#c.KerberosAuthenticator.cookie_name" title="Permalink to this definition">¶</a></dt>
<dd><p>The cookie name to use for caching authentication information.</p>
</dd></dl>
<dl class="py data">
<dt id="c.KerberosAuthenticator.keytab">
<code class="sig-prename descclassname">c.KerberosAuthenticator.</code><code class="sig-name descname">keytab</code><em class="property"> = Unicode('dask_gateway.keytab')</em><a class="headerlink" href="#c.KerberosAuthenticator.keytab" title="Permalink to this definition">¶</a></dt>
<dd><p>The path to the keytab file</p>
</dd></dl>
<dl class="py data">
<dt id="c.KerberosAuthenticator.service_name">
<code class="sig-prename descclassname">c.KerberosAuthenticator.</code><code class="sig-name descname">service_name</code><em class="property"> = Unicode('HTTP')</em><a class="headerlink" href="#c.KerberosAuthenticator.service_name" title="Permalink to this definition">¶</a></dt>
<dd><p>The service’s kerberos principal name.</p>
<p>This is almost always “HTTP” (the default)</p>
</dd></dl>
</div>
<div class="section" id="jupyterhubauthenticator">
<span id="jupyterhub-auth-config"></span><h3>JupyterHubAuthenticator<a class="headerlink" href="#jupyterhubauthenticator" title="Permalink to this headline">¶</a></h3>
<dl class="py data">
<dt id="c.JupyterHubAuthenticator.cache_max_age">
<code class="sig-prename descclassname">c.JupyterHubAuthenticator.</code><code class="sig-name descname">cache_max_age</code><em class="property"> = Int(300)</em><a class="headerlink" href="#c.JupyterHubAuthenticator.cache_max_age" title="Permalink to this definition">¶</a></dt>
<dd><p>The maximum time in seconds to cache authentication information.</p>
<p>Helps reduce load on the backing authentication service by caching
responses between requests. After this time the user will need to be
reauthenticated before making additional requests (note this is usually
transparent to the user).</p>
</dd></dl>
<dl class="py data">
<dt id="c.JupyterHubAuthenticator.cookie_name">
<code class="sig-prename descclassname">c.JupyterHubAuthenticator.</code><code class="sig-name descname">cookie_name</code><em class="property"> = Unicode('')</em><a class="headerlink" href="#c.JupyterHubAuthenticator.cookie_name" title="Permalink to this definition">¶</a></dt>
<dd><p>The cookie name to use for caching authentication information.</p>
</dd></dl>
<dl class="py data">
<dt id="c.JupyterHubAuthenticator.jupyterhub_api_token">
<code class="sig-prename descclassname">c.JupyterHubAuthenticator.</code><code class="sig-name descname">jupyterhub_api_token</code><em class="property"> = Unicode('')</em><a class="headerlink" href="#c.JupyterHubAuthenticator.jupyterhub_api_token" title="Permalink to this definition">¶</a></dt>
<dd><p>Dask Gateway’s JupyterHub API Token, used for authenticating the
gateway’s API requests to JupyterHub.</p>
<p>By default this is determined from the <code class="docutils literal notranslate"><span class="pre">JUPYTERHUB_API_TOKEN</span></code>
environment variable.</p>
</dd></dl>
<dl class="py data">
<dt id="c.JupyterHubAuthenticator.jupyterhub_api_url">
<code class="sig-prename descclassname">c.JupyterHubAuthenticator.</code><code class="sig-name descname">jupyterhub_api_url</code><em class="property"> = Unicode('')</em><a class="headerlink" href="#c.JupyterHubAuthenticator.jupyterhub_api_url" title="Permalink to this definition">¶</a></dt>
<dd><p>The API URL for the JupyterHub server.</p>
<p>By default this is determined from the <code class="docutils literal notranslate"><span class="pre">JUPYTERHUB_API_URL</span></code>
environment variable.</p>
</dd></dl>
<dl class="py data">
<dt id="c.JupyterHubAuthenticator.tls_ca">
<code class="sig-prename descclassname">c.JupyterHubAuthenticator.</code><code class="sig-name descname">tls_ca</code><em class="property"> = Unicode('')</em><a class="headerlink" href="#c.JupyterHubAuthenticator.tls_ca" title="Permalink to this definition">¶</a></dt>
<dd><p>Path to TLS CA file for verifying API requests to JupyterHub.</p>
<p>When setting this, you should also set tls_key and tls_cert.</p>
</dd></dl>
<dl class="py data">
<dt id="c.JupyterHubAuthenticator.tls_cert">
<code class="sig-prename descclassname">c.JupyterHubAuthenticator.</code><code class="sig-name descname">tls_cert</code><em class="property"> = Unicode('')</em><a class="headerlink" href="#c.JupyterHubAuthenticator.tls_cert" title="Permalink to this definition">¶</a></dt>
<dd><p>Path to TLS certficate file for making API requests to JupyterHub.</p>
<p>When setting this, you should also set tls_cert.</p>
</dd></dl>
<dl class="py data">
<dt id="c.JupyterHubAuthenticator.tls_key">
<code class="sig-prename descclassname">c.JupyterHubAuthenticator.</code><code class="sig-name descname">tls_key</code><em class="property"> = Unicode('')</em><a class="headerlink" href="#c.JupyterHubAuthenticator.tls_key" title="Permalink to this definition">¶</a></dt>
<dd><p>Path to TLS key file for making API requests to JupyterHub.</p>
<p>When setting this, you should also set tls_cert.</p>
</dd></dl>
</div>
<div class="section" id="simpleauthenticator">
<span id="simple-auth-config"></span><h3>SimpleAuthenticator<a class="headerlink" href="#simpleauthenticator" title="Permalink to this headline">¶</a></h3>
<dl class="py data">
<dt id="c.SimpleAuthenticator.cache_max_age">
<code class="sig-prename descclassname">c.SimpleAuthenticator.</code><code class="sig-name descname">cache_max_age</code><em class="property"> = Int(300)</em><a class="headerlink" href="#c.SimpleAuthenticator.cache_max_age" title="Permalink to this definition">¶</a></dt>
<dd><p>The maximum time in seconds to cache authentication information.</p>
<p>Helps reduce load on the backing authentication service by caching
responses between requests. After this time the user will need to be
reauthenticated before making additional requests (note this is usually
transparent to the user).</p>
</dd></dl>
<dl class="py data">
<dt id="c.SimpleAuthenticator.cookie_name">
<code class="sig-prename descclassname">c.SimpleAuthenticator.</code><code class="sig-name descname">cookie_name</code><em class="property"> = Unicode('')</em><a class="headerlink" href="#c.SimpleAuthenticator.cookie_name" title="Permalink to this definition">¶</a></dt>
<dd><p>The cookie name to use for caching authentication information.</p>
</dd></dl>
<dl class="py data">
<dt id="c.SimpleAuthenticator.password">
<code class="sig-prename descclassname">c.SimpleAuthenticator.</code><code class="sig-name descname">password</code><em class="property"> = Unicode(None)</em><a class="headerlink" href="#c.SimpleAuthenticator.password" title="Permalink to this definition">¶</a></dt>
<dd><p>If set, a global password that all users must provide.</p>
<p>If unset (default), the password field is completely ignored.</p>
</dd></dl>
</div>
</div>
<div class="section" id="cluster-backends">
<span id="cluster-backends-reference"></span><h2>Cluster Backends<a class="headerlink" href="#cluster-backends" title="Permalink to this headline">¶</a></h2>
<div class="section" id="base-class">
<h3>Base Class<a class="headerlink" href="#base-class" title="Permalink to this headline">¶</a></h3>
<div class="section" id="clusterconfig">
<span id="cluster-config"></span><h4>ClusterConfig<a class="headerlink" href="#clusterconfig" title="Permalink to this headline">¶</a></h4>
<dl class="py data">
<dt id="c.ClusterConfig.adaptive_period">
<code class="sig-prename descclassname">c.ClusterConfig.</code><code class="sig-name descname">adaptive_period</code><em class="property"> = Float(3)</em><a class="headerlink" href="#c.ClusterConfig.adaptive_period" title="Permalink to this definition">¶</a></dt>
<dd><p>Time (in seconds) between adaptive scaling checks.</p>
<p>A smaller period will decrease scale up/down latency when responding to
cluster load changes, but may also result in higher load on the gateway
server.</p>
</dd></dl>
<dl class="py data">
<dt id="c.ClusterConfig.cluster_max_cores">
<code class="sig-prename descclassname">c.ClusterConfig.</code><code class="sig-name descname">cluster_max_cores</code><em class="property"> = Float(None)</em><a class="headerlink" href="#c.ClusterConfig.cluster_max_cores" title="Permalink to this definition">¶</a></dt>
<dd><p>The maximum number of cores available to this cluster.</p>
<p>Set to <code class="docutils literal notranslate"><span class="pre">None</span></code> for no cores limit (default).</p>
</dd></dl>
<dl class="py data">
<dt id="c.ClusterConfig.cluster_max_memory">
<code class="sig-prename descclassname">c.ClusterConfig.</code><code class="sig-name descname">cluster_max_memory</code><em class="property"> = MemoryLimit(None)</em><a class="headerlink" href="#c.ClusterConfig.cluster_max_memory" title="Permalink to this definition">¶</a></dt>
<dd><p>The maximum amount of memory (in bytes) available to this cluster.
Allows the following suffixes:</p>
<ul class="simple">
<li><p>K -> Kibibytes</p></li>
<li><p>M -> Mebibytes</p></li>
<li><p>G -> Gibibytes</p></li>
<li><p>T -> Tebibytes</p></li>
</ul>
<p>Set to <code class="docutils literal notranslate"><span class="pre">None</span></code> for no memory limit (default).</p>
</dd></dl>
<dl class="py data">
<dt id="c.ClusterConfig.cluster_max_workers">
<code class="sig-prename descclassname">c.ClusterConfig.</code><code class="sig-name descname">cluster_max_workers</code><em class="property"> = Int(0)</em><a class="headerlink" href="#c.ClusterConfig.cluster_max_workers" title="Permalink to this definition">¶</a></dt>
<dd><p>The maximum number of workers available to this cluster.</p>
<p>Note that this will be combined with <code class="docutils literal notranslate"><span class="pre">cluster_max_cores</span></code> and
<code class="docutils literal notranslate"><span class="pre">cluster_max_memory</span></code> at runtime to determine the actual maximum
number of workers available to this cluster.</p>
</dd></dl>
<dl class="py data">
<dt id="c.ClusterConfig.environment">
<code class="sig-prename descclassname">c.ClusterConfig.</code><code class="sig-name descname">environment</code><em class="property"> = Dict('')</em><a class="headerlink" href="#c.ClusterConfig.environment" title="Permalink to this definition">¶</a></dt>
<dd><p>Environment variables to set for both the worker and scheduler processes.</p>
</dd></dl>
<dl class="py data">
<dt id="c.ClusterConfig.idle_timeout">
<code class="sig-prename descclassname">c.ClusterConfig.</code><code class="sig-name descname">idle_timeout</code><em class="property"> = Float(0)</em><a class="headerlink" href="#c.ClusterConfig.idle_timeout" title="Permalink to this definition">¶</a></dt>
<dd><p>Time (in seconds) before an idle cluster is automatically shutdown.</p>
<p>Set to 0 (default) for no idle timeout.</p>
</dd></dl>
<dl class="py data">
<dt id="c.ClusterConfig.scheduler_cmd">
<code class="sig-prename descclassname">c.ClusterConfig.</code><code class="sig-name descname">scheduler_cmd</code><em class="property"> = Command('')</em><a class="headerlink" href="#c.ClusterConfig.scheduler_cmd" title="Permalink to this definition">¶</a></dt>
<dd><p>Shell command to start a dask scheduler.</p>
</dd></dl>
<dl class="py data">
<dt id="c.ClusterConfig.scheduler_cores">
<code class="sig-prename descclassname">c.ClusterConfig.</code><code class="sig-name descname">scheduler_cores</code><em class="property"> = Int(1)</em><a class="headerlink" href="#c.ClusterConfig.scheduler_cores" title="Permalink to this definition">¶</a></dt>
<dd><p>Number of cpu-cores available for a dask scheduler.</p>
</dd></dl>
<dl class="py data">
<dt id="c.ClusterConfig.scheduler_memory">
<code class="sig-prename descclassname">c.ClusterConfig.</code><code class="sig-name descname">scheduler_memory</code><em class="property"> = MemoryLimit('2 G')</em><a class="headerlink" href="#c.ClusterConfig.scheduler_memory" title="Permalink to this definition">¶</a></dt>
<dd><p>Number of bytes available for a dask scheduler. Allows the following
suffixes:</p>
<ul class="simple">
<li><p>K -> Kibibytes</p></li>
<li><p>M -> Mebibytes</p></li>
<li><p>G -> Gibibytes</p></li>
<li><p>T -> Tebibytes</p></li>
</ul>
</dd></dl>
<dl class="py data">
<dt id="c.ClusterConfig.worker_cmd">
<code class="sig-prename descclassname">c.ClusterConfig.</code><code class="sig-name descname">worker_cmd</code><em class="property"> = Command('')</em><a class="headerlink" href="#c.ClusterConfig.worker_cmd" title="Permalink to this definition">¶</a></dt>
<dd><p>Shell command to start a dask worker.</p>
</dd></dl>
<dl class="py data">
<dt id="c.ClusterConfig.worker_cores">
<code class="sig-prename descclassname">c.ClusterConfig.</code><code class="sig-name descname">worker_cores</code><em class="property"> = Int(1)</em><a class="headerlink" href="#c.ClusterConfig.worker_cores" title="Permalink to this definition">¶</a></dt>
<dd><p>Number of cpu-cores available for a dask worker.</p>
</dd></dl>
<dl class="py data">
<dt id="c.ClusterConfig.worker_memory">
<code class="sig-prename descclassname">c.ClusterConfig.</code><code class="sig-name descname">worker_memory</code><em class="property"> = MemoryLimit('2 G')</em><a class="headerlink" href="#c.ClusterConfig.worker_memory" title="Permalink to this definition">¶</a></dt>
<dd><p>Number of bytes available for a dask worker. Allows the following
suffixes:</p>
<ul class="simple">
<li><p>K -> Kibibytes</p></li>
<li><p>M -> Mebibytes</p></li>
<li><p>G -> Gibibytes</p></li>
<li><p>T -> Tebibytes</p></li>
</ul>
</dd></dl>
</div>
<div class="section" id="backend">
<h4>Backend<a class="headerlink" href="#backend" title="Permalink to this headline">¶</a></h4>
<dl class="py data">
<dt id="c.Backend.api_url">
<code class="sig-prename descclassname">c.Backend.</code><code class="sig-name descname">api_url</code><em class="property"> = Unicode('')</em><a class="headerlink" href="#c.Backend.api_url" title="Permalink to this definition">¶</a></dt>
<dd><p>The address that internal components (e.g. dask clusters)
will use when contacting the gateway.</p>
</dd></dl>
<dl class="py data">
<dt id="c.Backend.cluster_config_class">
<code class="sig-prename descclassname">c.Backend.</code><code class="sig-name descname">cluster_config_class</code><em class="property"> = Type('dask_gateway_server.backends.base.ClusterConfig')</em><a class="headerlink" href="#c.Backend.cluster_config_class" title="Permalink to this definition">¶</a></dt>
<dd><p>The cluster config class to use</p>
</dd></dl>
<dl class="py data">
<dt id="c.Backend.cluster_options">
<code class="sig-prename descclassname">c.Backend.</code><code class="sig-name descname">cluster_options</code><em class="property"> = Union('')</em><a class="headerlink" href="#c.Backend.cluster_options" title="Permalink to this definition">¶</a></dt>
<dd><p>User options for configuring an individual cluster.</p>
<p>Allows users to specify configuration overrides when creating a new
cluster. See the documentation for more information:</p>
<p><a class="reference internal" href="cluster-options.html"><span class="doc">Exposing Cluster Options</span></a>.</p>
</dd></dl>
</div>
</div>
<div class="section" id="local-processes">
<h3>Local Processes<a class="headerlink" href="#local-processes" title="Permalink to this headline">¶</a></h3>
<div class="section" id="localclusterconfig">
<h4>LocalClusterConfig<a class="headerlink" href="#localclusterconfig" title="Permalink to this headline">¶</a></h4>
<dl class="py data">
<dt id="c.LocalClusterConfig.adaptive_period">
<code class="sig-prename descclassname">c.LocalClusterConfig.</code><code class="sig-name descname">adaptive_period</code><em class="property"> = Float(3)</em><a class="headerlink" href="#c.LocalClusterConfig.adaptive_period" title="Permalink to this definition">¶</a></dt>
<dd><p>Time (in seconds) between adaptive scaling checks.</p>
<p>A smaller period will decrease scale up/down latency when responding to
cluster load changes, but may also result in higher load on the gateway
server.</p>
</dd></dl>
<dl class="py data">
<dt id="c.LocalClusterConfig.cluster_max_cores">
<code class="sig-prename descclassname">c.LocalClusterConfig.</code><code class="sig-name descname">cluster_max_cores</code><em class="property"> = Float(None)</em><a class="headerlink" href="#c.LocalClusterConfig.cluster_max_cores" title="Permalink to this definition">¶</a></dt>
<dd><p>The maximum number of cores available to this cluster.</p>
<p>Set to <code class="docutils literal notranslate"><span class="pre">None</span></code> for no cores limit (default).</p>
</dd></dl>
<dl class="py data">
<dt id="c.LocalClusterConfig.cluster_max_memory">
<code class="sig-prename descclassname">c.LocalClusterConfig.</code><code class="sig-name descname">cluster_max_memory</code><em class="property"> = MemoryLimit(None)</em><a class="headerlink" href="#c.LocalClusterConfig.cluster_max_memory" title="Permalink to this definition">¶</a></dt>
<dd><p>The maximum amount of memory (in bytes) available to this cluster.
Allows the following suffixes:</p>
<ul class="simple">
<li><p>K -> Kibibytes</p></li>
<li><p>M -> Mebibytes</p></li>
<li><p>G -> Gibibytes</p></li>
<li><p>T -> Tebibytes</p></li>
</ul>
<p>Set to <code class="docutils literal notranslate"><span class="pre">None</span></code> for no memory limit (default).</p>
</dd></dl>
<dl class="py data">
<dt id="c.LocalClusterConfig.cluster_max_workers">
<code class="sig-prename descclassname">c.LocalClusterConfig.</code><code class="sig-name descname">cluster_max_workers</code><em class="property"> = Int(0)</em><a class="headerlink" href="#c.LocalClusterConfig.cluster_max_workers" title="Permalink to this definition">¶</a></dt>
<dd><p>The maximum number of workers available to this cluster.</p>
<p>Note that this will be combined with <code class="docutils literal notranslate"><span class="pre">cluster_max_cores</span></code> and
<code class="docutils literal notranslate"><span class="pre">cluster_max_memory</span></code> at runtime to determine the actual maximum
number of workers available to this cluster.</p>
</dd></dl>
<dl class="py data">
<dt id="c.LocalClusterConfig.environment">
<code class="sig-prename descclassname">c.LocalClusterConfig.</code><code class="sig-name descname">environment</code><em class="property"> = Dict('')</em><a class="headerlink" href="#c.LocalClusterConfig.environment" title="Permalink to this definition">¶</a></dt>
<dd><p>Environment variables to set for both the worker and scheduler processes.</p>
</dd></dl>
<dl class="py data">
<dt id="c.LocalClusterConfig.idle_timeout">
<code class="sig-prename descclassname">c.LocalClusterConfig.</code><code class="sig-name descname">idle_timeout</code><em class="property"> = Float(0)</em><a class="headerlink" href="#c.LocalClusterConfig.idle_timeout" title="Permalink to this definition">¶</a></dt>
<dd><p>Time (in seconds) before an idle cluster is automatically shutdown.</p>
<p>Set to 0 (default) for no idle timeout.</p>
</dd></dl>
<dl class="py data">
<dt id="c.LocalClusterConfig.scheduler_cmd">
<code class="sig-prename descclassname">c.LocalClusterConfig.</code><code class="sig-name descname">scheduler_cmd</code><em class="property"> = Command('')</em><a class="headerlink" href="#c.LocalClusterConfig.scheduler_cmd" title="Permalink to this definition">¶</a></dt>
<dd><p>Shell command to start a dask scheduler.</p>
</dd></dl>
<dl class="py data">
<dt id="c.LocalClusterConfig.scheduler_cores">
<code class="sig-prename descclassname">c.LocalClusterConfig.</code><code class="sig-name descname">scheduler_cores</code><em class="property"> = Int(1)</em><a class="headerlink" href="#c.LocalClusterConfig.scheduler_cores" title="Permalink to this definition">¶</a></dt>
<dd><p>Number of cpu-cores available for a dask scheduler.</p>
</dd></dl>
<dl class="py data">
<dt id="c.LocalClusterConfig.scheduler_memory">
<code class="sig-prename descclassname">c.LocalClusterConfig.</code><code class="sig-name descname">scheduler_memory</code><em class="property"> = MemoryLimit('2 G')</em><a class="headerlink" href="#c.LocalClusterConfig.scheduler_memory" title="Permalink to this definition">¶</a></dt>
<dd><p>Number of bytes available for a dask scheduler. Allows the following
suffixes:</p>
<ul class="simple">
<li><p>K -> Kibibytes</p></li>
<li><p>M -> Mebibytes</p></li>
<li><p>G -> Gibibytes</p></li>
<li><p>T -> Tebibytes</p></li>
</ul>
</dd></dl>
<dl class="py data">
<dt id="c.LocalClusterConfig.worker_cmd">
<code class="sig-prename descclassname">c.LocalClusterConfig.</code><code class="sig-name descname">worker_cmd</code><em class="property"> = Command('')</em><a class="headerlink" href="#c.LocalClusterConfig.worker_cmd" title="Permalink to this definition">¶</a></dt>
<dd><p>Shell command to start a dask worker.</p>
</dd></dl>
<dl class="py data">
<dt id="c.LocalClusterConfig.worker_cores">
<code class="sig-prename descclassname">c.LocalClusterConfig.</code><code class="sig-name descname">worker_cores</code><em class="property"> = Int(1)</em><a class="headerlink" href="#c.LocalClusterConfig.worker_cores" title="Permalink to this definition">¶</a></dt>
<dd><p>Number of cpu-cores available for a dask worker.</p>
</dd></dl>
<dl class="py data">
<dt id="c.LocalClusterConfig.worker_memory">
<code class="sig-prename descclassname">c.LocalClusterConfig.</code><code class="sig-name descname">worker_memory</code><em class="property"> = MemoryLimit('2 G')</em><a class="headerlink" href="#c.LocalClusterConfig.worker_memory" title="Permalink to this definition">¶</a></dt>
<dd><p>Number of bytes available for a dask worker. Allows the following
suffixes:</p>
<ul class="simple">
<li><p>K -> Kibibytes</p></li>
<li><p>M -> Mebibytes</p></li>
<li><p>G -> Gibibytes</p></li>
<li><p>T -> Tebibytes</p></li>
</ul>
</dd></dl>
</div>
<div class="section" id="localbackend">
<h4>LocalBackend<a class="headerlink" href="#localbackend" title="Permalink to this headline">¶</a></h4>
<dl class="py data">
<dt id="c.LocalBackend.api_url">
<code class="sig-prename descclassname">c.LocalBackend.</code><code class="sig-name descname">api_url</code><em class="property"> = Unicode('')</em><a class="headerlink" href="#c.LocalBackend.api_url" title="Permalink to this definition">¶</a></dt>
<dd><p>The address that internal components (e.g. dask clusters)
will use when contacting the gateway.</p>
<p>Defaults to <cite>{proxy_address}/{prefix}/api</cite>, set manually if a different
address should be used.</p>
</dd></dl>
<dl class="py data">
<dt id="c.LocalBackend.backoff_base_delay">
<code class="sig-prename descclassname">c.LocalBackend.</code><code class="sig-name descname">backoff_base_delay</code><em class="property"> = Float(0.1)</em><a class="headerlink" href="#c.LocalBackend.backoff_base_delay" title="Permalink to this definition">¶</a></dt>
<dd><p>Base delay (in seconds) for backoff when retrying after failures.</p>
<p>If an operation fails, it is retried after a backoff computed as:</p>
<p><code class="docutils literal notranslate"><span class="pre">`</span>
<span class="pre">min(backoff_max_delay,</span> <span class="pre">backoff_base_delay</span> <span class="pre">*</span> <span class="pre">2</span> <span class="pre">**</span> <span class="pre">num_failures)</span>
<span class="pre">`</span></code></p>
</dd></dl>
<dl class="py data">
<dt id="c.LocalBackend.backoff_max_delay">
<code class="sig-prename descclassname">c.LocalBackend.</code><code class="sig-name descname">backoff_max_delay</code><em class="property"> = Float(300)</em><a class="headerlink" href="#c.LocalBackend.backoff_max_delay" title="Permalink to this definition">¶</a></dt>
<dd><p>Max delay (in seconds) for backoff policy when retrying after failures.</p>
</dd></dl>
<dl class="py data">
<dt id="c.LocalBackend.check_timeouts_period">
<code class="sig-prename descclassname">c.LocalBackend.</code><code class="sig-name descname">check_timeouts_period</code><em class="property"> = Float(0.0)</em><a class="headerlink" href="#c.LocalBackend.check_timeouts_period" title="Permalink to this definition">¶</a></dt>
<dd><p>Time (in seconds) between timeout checks.</p>
<p>This shouldn’t be too small (to keep the overhead low), but should be
smaller than <code class="docutils literal notranslate"><span class="pre">cluster_heartbeat_timeout</span></code>, <code class="docutils literal notranslate"><span class="pre">cluster_start_timeout</span></code>,
and <code class="docutils literal notranslate"><span class="pre">worker_start_timeout</span></code>.</p>
</dd></dl>
<dl class="py data">
<dt id="c.LocalBackend.cluster_config_class">
<code class="sig-prename descclassname">c.LocalBackend.</code><code class="sig-name descname">cluster_config_class</code><em class="property"> = Type('dask_gateway_server.backends.local.LocalClusterConfig')</em><a class="headerlink" href="#c.LocalBackend.cluster_config_class" title="Permalink to this definition">¶</a></dt>
<dd><p>The cluster config class to use</p>
</dd></dl>
<dl class="py data">
<dt id="c.LocalBackend.cluster_heartbeat_period">
<code class="sig-prename descclassname">c.LocalBackend.</code><code class="sig-name descname">cluster_heartbeat_period</code><em class="property"> = Int(15)</em><a class="headerlink" href="#c.LocalBackend.cluster_heartbeat_period" title="Permalink to this definition">¶</a></dt>
<dd><p>Time (in seconds) between cluster heartbeats to the gateway.</p>
<p>A smaller period will detect failed workers sooner, but will use more
resources. A larger period will provide slower feedback in the presence
of failures.</p>
</dd></dl>
<dl class="py data">
<dt id="c.LocalBackend.cluster_heartbeat_timeout">
<code class="sig-prename descclassname">c.LocalBackend.</code><code class="sig-name descname">cluster_heartbeat_timeout</code><em class="property"> = Float(0.0)</em><a class="headerlink" href="#c.LocalBackend.cluster_heartbeat_timeout" title="Permalink to this definition">¶</a></dt>
<dd><p>Timeout (in seconds) before killing a dask cluster that’s failed to heartbeat.</p>
<p>This should be greater than <code class="docutils literal notranslate"><span class="pre">cluster_heartbeat_period</span></code>. Defaults to
<code class="docutils literal notranslate"><span class="pre">2</span> <span class="pre">*</span> <span class="pre">cluster_heartbeat_period</span></code>.</p>
</dd></dl>
<dl class="py data">
<dt id="c.LocalBackend.cluster_options">
<code class="sig-prename descclassname">c.LocalBackend.</code><code class="sig-name descname">cluster_options</code><em class="property"> = Union('')</em><a class="headerlink" href="#c.LocalBackend.cluster_options" title="Permalink to this definition">¶</a></dt>
<dd><p>User options for configuring an individual cluster.</p>
<p>Allows users to specify configuration overrides when creating a new
cluster. See the documentation for more information:</p>
<p><a class="reference internal" href="cluster-options.html"><span class="doc">Exposing Cluster Options</span></a>.</p>
</dd></dl>
<dl class="py data">
<dt id="c.LocalBackend.cluster_start_timeout">
<code class="sig-prename descclassname">c.LocalBackend.</code><code class="sig-name descname">cluster_start_timeout</code><em class="property"> = Float(60)</em><a class="headerlink" href="#c.LocalBackend.cluster_start_timeout" title="Permalink to this definition">¶</a></dt>
<dd><p>Timeout (in seconds) before giving up on a starting dask cluster.</p>
</dd></dl>
<dl class="py data">
<dt id="c.LocalBackend.cluster_status_period">
<code class="sig-prename descclassname">c.LocalBackend.</code><code class="sig-name descname">cluster_status_period</code><em class="property"> = Float(30)</em><a class="headerlink" href="#c.LocalBackend.cluster_status_period" title="Permalink to this definition">¶</a></dt>
<dd><p>Time (in seconds) between cluster status checks.</p>
<p>A smaller period will detect failed clusters sooner, but will use more
resources. A larger period will provide slower feedback in the presence
of failures.</p>
</dd></dl>
<dl class="py data">
<dt id="c.LocalBackend.clusters_directory">
<code class="sig-prename descclassname">c.LocalBackend.</code><code class="sig-name descname">clusters_directory</code><em class="property"> = Unicode('')</em><a class="headerlink" href="#c.LocalBackend.clusters_directory" title="Permalink to this definition">¶</a></dt>
<dd><p>The base directory for cluster working directories.</p>
<p>A subdirectory will be created for each new cluster which will serve as
the working directory for that cluster. On cluster shutdown the
subdirectory will be removed.</p>
<p>If not specified, a temporary directory will be used for each cluster.</p>
</dd></dl>
<dl class="py data">
<dt id="c.LocalBackend.db_cleanup_period">
<code class="sig-prename descclassname">c.LocalBackend.</code><code class="sig-name descname">db_cleanup_period</code><em class="property"> = Float(600)</em><a class="headerlink" href="#c.LocalBackend.db_cleanup_period" title="Permalink to this definition">¶</a></dt>
<dd><p>Time (in seconds) between database cleanup tasks.</p>
<p>This sets how frequently old records are removed from the database.
This shouldn’t be too small (to keep the overhead low), but should be
smaller than <code class="docutils literal notranslate"><span class="pre">db_record_max_age</span></code> (probably by an order of magnitude).</p>
</dd></dl>
<dl class="py data">
<dt id="c.LocalBackend.db_cluster_max_age">
<code class="sig-prename descclassname">c.LocalBackend.</code><code class="sig-name descname">db_cluster_max_age</code><em class="property"> = Float(86400)</em><a class="headerlink" href="#c.LocalBackend.db_cluster_max_age" title="Permalink to this definition">¶</a></dt>
<dd><p>Max time (in seconds) to keep around records of completed clusters.</p>
<p>Every <code class="docutils literal notranslate"><span class="pre">db_cleanup_period</span></code>, completed clusters older than
<code class="docutils literal notranslate"><span class="pre">db_cluster_max_age</span></code> are removed from the database.</p>
</dd></dl>
<dl class="py data">
<dt id="c.LocalBackend.db_debug">
<code class="sig-prename descclassname">c.LocalBackend.</code><code class="sig-name descname">db_debug</code><em class="property"> = Bool(False)</em><a class="headerlink" href="#c.LocalBackend.db_debug" title="Permalink to this definition">¶</a></dt>
<dd><p>If True, all database operations will be logged</p>
</dd></dl>
<dl class="py data">
<dt id="c.LocalBackend.db_encrypt_keys">
<code class="sig-prename descclassname">c.LocalBackend.</code><code class="sig-name descname">db_encrypt_keys</code><em class="property"> = List('')</em><a class="headerlink" href="#c.LocalBackend.db_encrypt_keys" title="Permalink to this definition">¶</a></dt>
<dd><p>A list of keys to use to encrypt private data in the database. Can also
be set by the environment variable <code class="docutils literal notranslate"><span class="pre">DASK_GATEWAY_ENCRYPT_KEYS</span></code>, where
the value is a <code class="docutils literal notranslate"><span class="pre">;</span></code> delimited string of encryption keys.</p>
<p>Each key should be a base64-encoded 32 byte value, and should be
cryptographically random. Lacking other options, openssl can be used to
generate a single key via:</p>
<div class="highlight-shell notranslate"><div class="highlight"><pre><span></span>$ openssl rand -base64 <span class="m">32</span>
</pre></div>
</div>
<p>A single key is valid, multiple keys can be used to support key rotation.</p>
</dd></dl>
<dl class="py data">
<dt id="c.LocalBackend.db_url">
<code class="sig-prename descclassname">c.LocalBackend.</code><code class="sig-name descname">db_url</code><em class="property"> = Unicode('sqlite:///:memory:')</em><a class="headerlink" href="#c.LocalBackend.db_url" title="Permalink to this definition">¶</a></dt>
<dd><p>The URL for the database. Default is in-memory only.</p>
<p>If not in-memory, <code class="docutils literal notranslate"><span class="pre">db_encrypt_keys</span></code> must also be set.</p>
</dd></dl>
<dl class="py data">
<dt id="c.LocalBackend.inherited_environment">
<code class="sig-prename descclassname">c.LocalBackend.</code><code class="sig-name descname">inherited_environment</code><em class="property"> = List('')</em><a class="headerlink" href="#c.LocalBackend.inherited_environment" title="Permalink to this definition">¶</a></dt>
<dd><p>Whitelist of environment variables for the scheduler and worker
processes to inherit from the Dask-Gateway process.</p>
</dd></dl>
<dl class="py data">
<dt id="c.LocalBackend.parallelism">
<code class="sig-prename descclassname">c.LocalBackend.</code><code class="sig-name descname">parallelism</code><em class="property"> = Int(20)</em><a class="headerlink" href="#c.LocalBackend.parallelism" title="Permalink to this definition">¶</a></dt>
<dd><p>Number of handlers to use for starting/stopping clusters.</p>
</dd></dl>
<dl class="py data">
<dt id="c.LocalBackend.sigint_timeout">
<code class="sig-prename descclassname">c.LocalBackend.</code><code class="sig-name descname">sigint_timeout</code><em class="property"> = Int(10)</em><a class="headerlink" href="#c.LocalBackend.sigint_timeout" title="Permalink to this definition">¶</a></dt>
<dd><p>Seconds to wait for process to stop after SIGINT.</p>
<p>If the process has not stopped after this time, a SIGTERM is sent.</p>
</dd></dl>
<dl class="py data">
<dt id="c.LocalBackend.sigkill_timeout">
<code class="sig-prename descclassname">c.LocalBackend.</code><code class="sig-name descname">sigkill_timeout</code><em class="property"> = Int(5)</em><a class="headerlink" href="#c.LocalBackend.sigkill_timeout" title="Permalink to this definition">¶</a></dt>
<dd><p>Seconds to wait for process to stop after SIGKILL.</p>
<p>If the process has not stopped after this time, a warning is logged and
the process is deemed a zombie process.</p>
</dd></dl>
<dl class="py data">
<dt id="c.LocalBackend.sigterm_timeout">
<code class="sig-prename descclassname">c.LocalBackend.</code><code class="sig-name descname">sigterm_timeout</code><em class="property"> = Int(5)</em><a class="headerlink" href="#c.LocalBackend.sigterm_timeout" title="Permalink to this definition">¶</a></dt>
<dd><p>Seconds to wait for process to stop after SIGTERM.</p>
<p>If the process has not stopped after this time, a SIGKILL is sent.</p>
</dd></dl>
<dl class="py data">
<dt id="c.LocalBackend.stop_clusters_on_shutdown">
<code class="sig-prename descclassname">c.LocalBackend.</code><code class="sig-name descname">stop_clusters_on_shutdown</code><em class="property"> = Bool(True)</em><a class="headerlink" href="#c.LocalBackend.stop_clusters_on_shutdown" title="Permalink to this definition">¶</a></dt>
<dd><p>Whether to stop active clusters on gateway shutdown.</p>
<p>If true, all active clusters will be stopped before shutting down the
gateway. Set to False to leave active clusters running.</p>
</dd></dl>
<dl class="py data">
<dt id="c.LocalBackend.worker_start_failure_limit">
<code class="sig-prename descclassname">c.LocalBackend.</code><code class="sig-name descname">worker_start_failure_limit</code><em class="property"> = Int(3)</em><a class="headerlink" href="#c.LocalBackend.worker_start_failure_limit" title="Permalink to this definition">¶</a></dt>
<dd><p>A limit on the number of failed attempts to start a worker before the
cluster is marked as failed.</p>
<p>Every worker that fails to start (timeouts exempt) increments a
counter. The counter is reset if a worker successfully starts. If the
counter ever exceeds this limit, the cluster is marked as failed and is
shutdown.</p>
</dd></dl>
<dl class="py data">
<dt id="c.LocalBackend.worker_start_timeout">
<code class="sig-prename descclassname">c.LocalBackend.</code><code class="sig-name descname">worker_start_timeout</code><em class="property"> = Float(60)</em><a class="headerlink" href="#c.LocalBackend.worker_start_timeout" title="Permalink to this definition">¶</a></dt>
<dd><p>Timeout (in seconds) before giving up on a starting dask worker.</p>
</dd></dl>
<dl class="py data">
<dt id="c.LocalBackend.worker_status_period">
<code class="sig-prename descclassname">c.LocalBackend.</code><code class="sig-name descname">worker_status_period</code><em class="property"> = Float(30)</em><a class="headerlink" href="#c.LocalBackend.worker_status_period" title="Permalink to this definition">¶</a></dt>
<dd><p>Time (in seconds) between worker status checks.</p>
<p>A smaller period will detect failed workers sooner, but will use more
resources. A larger period will provide slower feedback in the presence
of failures.</p>
</dd></dl>
</div>
<div class="section" id="unsafelocalbackend">
<h4>UnsafeLocalBackend<a class="headerlink" href="#unsafelocalbackend" title="Permalink to this headline">¶</a></h4>
<dl class="py data">
<dt id="c.UnsafeLocalBackend.api_url">
<code class="sig-prename descclassname">c.UnsafeLocalBackend.</code><code class="sig-name descname">api_url</code><em class="property"> = Unicode('')</em><a class="headerlink" href="#c.UnsafeLocalBackend.api_url" title="Permalink to this definition">¶</a></dt>
<dd><p>The address that internal components (e.g. dask clusters)
will use when contacting the gateway.</p>
<p>Defaults to <cite>{proxy_address}/{prefix}/api</cite>, set manually if a different
address should be used.</p>
</dd></dl>
<dl class="py data">
<dt id="c.UnsafeLocalBackend.backoff_base_delay">
<code class="sig-prename descclassname">c.UnsafeLocalBackend.</code><code class="sig-name descname">backoff_base_delay</code><em class="property"> = Float(0.1)</em><a class="headerlink" href="#c.UnsafeLocalBackend.backoff_base_delay" title="Permalink to this definition">¶</a></dt>
<dd><p>Base delay (in seconds) for backoff when retrying after failures.</p>
<p>If an operation fails, it is retried after a backoff computed as:</p>
<p><code class="docutils literal notranslate"><span class="pre">`</span>
<span class="pre">min(backoff_max_delay,</span> <span class="pre">backoff_base_delay</span> <span class="pre">*</span> <span class="pre">2</span> <span class="pre">**</span> <span class="pre">num_failures)</span>
<span class="pre">`</span></code></p>
</dd></dl>
<dl class="py data">
<dt id="c.UnsafeLocalBackend.backoff_max_delay">
<code class="sig-prename descclassname">c.UnsafeLocalBackend.</code><code class="sig-name descname">backoff_max_delay</code><em class="property"> = Float(300)</em><a class="headerlink" href="#c.UnsafeLocalBackend.backoff_max_delay" title="Permalink to this definition">¶</a></dt>
<dd><p>Max delay (in seconds) for backoff policy when retrying after failures.</p>
</dd></dl>
<dl class="py data">
<dt id="c.UnsafeLocalBackend.check_timeouts_period">
<code class="sig-prename descclassname">c.UnsafeLocalBackend.</code><code class="sig-name descname">check_timeouts_period</code><em class="property"> = Float(0.0)</em><a class="headerlink" href="#c.UnsafeLocalBackend.check_timeouts_period" title="Permalink to this definition">¶</a></dt>
<dd><p>Time (in seconds) between timeout checks.</p>
<p>This shouldn’t be too small (to keep the overhead low), but should be
smaller than <code class="docutils literal notranslate"><span class="pre">cluster_heartbeat_timeout</span></code>, <code class="docutils literal notranslate"><span class="pre">cluster_start_timeout</span></code>,
and <code class="docutils literal notranslate"><span class="pre">worker_start_timeout</span></code>.</p>
</dd></dl>
<dl class="py data">
<dt id="c.UnsafeLocalBackend.cluster_config_class">
<code class="sig-prename descclassname">c.UnsafeLocalBackend.</code><code class="sig-name descname">cluster_config_class</code><em class="property"> = Type('dask_gateway_server.backends.local.LocalClusterConfig')</em><a class="headerlink" href="#c.UnsafeLocalBackend.cluster_config_class" title="Permalink to this definition">¶</a></dt>
<dd><p>The cluster config class to use</p>
</dd></dl>
<dl class="py data">
<dt id="c.UnsafeLocalBackend.cluster_heartbeat_period">
<code class="sig-prename descclassname">c.UnsafeLocalBackend.</code><code class="sig-name descname">cluster_heartbeat_period</code><em class="property"> = Int(15)</em><a class="headerlink" href="#c.UnsafeLocalBackend.cluster_heartbeat_period" title="Permalink to this definition">¶</a></dt>
<dd><p>Time (in seconds) between cluster heartbeats to the gateway.</p>
<p>A smaller period will detect failed workers sooner, but will use more
resources. A larger period will provide slower feedback in the presence
of failures.</p>
</dd></dl>
<dl class="py data">
<dt id="c.UnsafeLocalBackend.cluster_heartbeat_timeout">
<code class="sig-prename descclassname">c.UnsafeLocalBackend.</code><code class="sig-name descname">cluster_heartbeat_timeout</code><em class="property"> = Float(0.0)</em><a class="headerlink" href="#c.UnsafeLocalBackend.cluster_heartbeat_timeout" title="Permalink to this definition">¶</a></dt>
<dd><p>Timeout (in seconds) before killing a dask cluster that’s failed to heartbeat.</p>
<p>This should be greater than <code class="docutils literal notranslate"><span class="pre">cluster_heartbeat_period</span></code>. Defaults to
<code class="docutils literal notranslate"><span class="pre">2</span> <span class="pre">*</span> <span class="pre">cluster_heartbeat_period</span></code>.</p>
</dd></dl>
<dl class="py data">
<dt id="c.UnsafeLocalBackend.cluster_options">
<code class="sig-prename descclassname">c.UnsafeLocalBackend.</code><code class="sig-name descname">cluster_options</code><em class="property"> = Union('')</em><a class="headerlink" href="#c.UnsafeLocalBackend.cluster_options" title="Permalink to this definition">¶</a></dt>
<dd><p>User options for configuring an individual cluster.</p>
<p>Allows users to specify configuration overrides when creating a new
cluster. See the documentation for more information:</p>
<p><a class="reference internal" href="cluster-options.html"><span class="doc">Exposing Cluster Options</span></a>.</p>
</dd></dl>
<dl class="py data">
<dt id="c.UnsafeLocalBackend.cluster_start_timeout">
<code class="sig-prename descclassname">c.UnsafeLocalBackend.</code><code class="sig-name descname">cluster_start_timeout</code><em class="property"> = Float(60)</em><a class="headerlink" href="#c.UnsafeLocalBackend.cluster_start_timeout" title="Permalink to this definition">¶</a></dt>
<dd><p>Timeout (in seconds) before giving up on a starting dask cluster.</p>
</dd></dl>
<dl class="py data">
<dt id="c.UnsafeLocalBackend.cluster_status_period">
<code class="sig-prename descclassname">c.UnsafeLocalBackend.</code><code class="sig-name descname">cluster_status_period</code><em class="property"> = Float(30)</em><a class="headerlink" href="#c.UnsafeLocalBackend.cluster_status_period" title="Permalink to this definition">¶</a></dt>