-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
837 lines (804 loc) · 45.8 KB
/
index.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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<!--[if IE]><meta http-equiv="X-UA-Compatible" content="IE=edge"><![endif]-->
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="generator" content="Asciidoctor 1.5.8">
<meta name="description" content="Janus网关是一个高性能的网关,基于Netty研发.">
<meta name="keywords" content="Janus,Netty">
<title>Janus Reference Documentation</title>
<link rel="stylesheet" href="styles/halo.css">
<link rel="stylesheet" href="styles/coderay-asciidoctor.css">
</head>
<body class="book toc2 toc-left">
<div id="header">
<h1>Janus Reference Documentation</h1>
<div class="details">
<span id="revnumber">version: 1.0.0.REALESE</span>
<br><span id="revremark">Copyright (c) 2019-2044 xujin (http://xujin.org)</span>
</div>
<div id="toc" class="toc2">
<div id="toctitle">目录</div>
<ul class="sectlevel1">
<li><a href="#preface">I. 前言</a></li>
<li><a href="#release_notes">Release Note</a></li>
<li><a href="#Halo-introduction">II. Janus 概述</a>
<ul class="sectlevel1">
<li><a href="#_janus网关介绍">1. Janus网关介绍</a></li>
<li><a href="#_janus_基本功能和定位">2. Janus 基本功能和定位</a></li>
<li><a href="#_janus_项目">3. Janus 项目</a>
<ul class="sectlevel2">
<li><a href="#_janus_team">3.1. Janus Team</a></li>
<li><a href="#_janus工程">3.2. Janus工程</a></li>
</ul>
</li>
</ul>
</li>
<li><a href="#janus-design">III. janus设计</a>
<ul class="sectlevel1">
<li><a href="#_janus_filter设计">4. janus filter设计</a>
<ul class="sectlevel2">
<li><a href="#_filter设计">4.1. Filter设计</a></li>
<li><a href="#_filter执行流程">4.2. filter执行流程</a></li>
<li><a href="#_invoke_filter设计">4.3. Invoke Filter设计</a></li>
</ul>
</li>
<li><a href="#_janus_路由设计">5. Janus 路由设计</a>
<ul class="sectlevel2">
<li><a href="#_路由模型设计">5.1. 路由模型设计</a></li>
<li><a href="#_示例路由配置">5.2. 示例路由配置</a></li>
</ul>
</li>
<li><a href="#_janus_predicates断言设计">6. Janus Predicates(断言设计)</a>
<ul class="sectlevel2">
<li><a href="#_断言设计">6.1. 断言设计</a></li>
<li><a href="#_精准匹配">6.2. 精准匹配</a></li>
<li><a href="#_模糊匹配">6.3. 模糊匹配</a></li>
</ul>
</li>
<li><a href="#_janus_netty中的设计">7. Janus Netty中的设计</a>
<ul class="sectlevel2">
<li><a href="#_janus_server的设计">7.1. Janus Server的设计</a>
<ul class="sectlevel4">
<li><a href="#_网关接受请求的netty_server">7.1.1. 网关接受请求的Netty Server</a></li>
<li><a href="#_网关转发调用内部源服务的client">7.1.2. 网关转发调用内部源服务的Client</a></li>
<li><a href="#_网关转发调用源服务的连接池">7.1.3. 网关转发调用源服务的连接池</a></li>
</ul>
</li>
</ul>
</li>
<li><a href="#_rpc数据传输">8. RPC数据传输</a></li>
<li><a href="#_http数据处理">9. http数据处理</a></li>
<li><a href="#_janus监控告警系统设计">10. Janus监控告警系统设计</a>
<ul class="sectlevel2">
<li><a href="#_背景">10.1. 背景</a></li>
<li><a href="#_应用场景">10.2. 应用场景</a></li>
</ul>
</li>
<li><a href="#_waf2_0">11. WAF2.0</a></li>
<li><a href="#_janus限流方案设计">12. Janus限流方案设计</a>
<ul class="sectlevel2">
<li><a href="#_需求">12.1. 需求</a></li>
</ul>
</li>
</ul>
</li>
<li><a href="#janus-Admin-design">IV. janus Admin设计</a>
<ul class="sectlevel1">
<li><a href="#_数据库设计">13. 数据库设计</a>
<ul class="sectlevel2">
<li><a href="#_db表结构设计">13.1. DB表结构设计</a></li>
<li><a href="#_api的模型设计">13.2. API的模型设计</a></li>
</ul>
</li>
<li><a href="#_janus_admin使用">14. Janus Admin使用</a>
<ul class="sectlevel2">
<li><a href="#_api管理">14.1. API管理</a>
<ul class="sectlevel3">
<li><a href="#_新建api">14.1.1. 新建API</a></li>
</ul>
</li>
</ul>
</li>
<li><a href="#_开发者手册">15. 开发者手册</a>
<ul class="sectlevel2">
<li><a href="#_启动janus_server">15.1. 启动Janus Server</a></li>
</ul>
</li>
</ul>
</li>
</ul>
</div>
</div>
<div id="content">
<div class="sect1">
<h2 id="preface"><a class="anchor" href="#preface"></a><a class="link" href="#preface">I. 前言</a></h2>
<div class="sectionbody">
<div class="openblock">
<div class="content">
<div class="paragraph">
<p>本文档是Janus Reference Documentation</p>
</div>
<div class="paragraph">
<p>总之,Janus是一个基于Netty自主研发的高性能网关</p>
</div>
</div>
</div>
</div>
</div>
<div class="sect1">
<h2 id="release_notes"><a class="anchor" href="#release_notes"></a><a class="link" href="#release_notes">Release Note</a></h2>
<div class="sectionbody">
<div class="paragraph">
<p>关于Janus的Release Note可以访问<a href="#Janus-Release-Note">[Janus-Release-Note]</a></p>
</div>
</div>
</div>
<h1 id="Halo-introduction" class="sect0"><a class="anchor" href="#Halo-introduction"></a><a class="link" href="#Halo-introduction">II. Janus 概述</a></h1>
<div class="sect1">
<h2 id="_janus网关介绍"><a class="anchor" href="#_janus网关介绍"></a><a class="link" href="#_janus网关介绍">1. Janus网关介绍</a></h2>
<div class="sectionbody">
<div class="paragraph">
<p>Janus(汉译作“杰纳斯”或“雅努斯”)是天门神,早晨打开天门,让阳光普照人间,晚上又把天门关上,使黑暗降临大地。他的头部前后各有一副面孔,同时看着两个不同方向,一副看着过去,一副看着未来,因此也称两面神</p>
</div>
<div class="paragraph">
<p>Janus掌握所有对外接口的进出.</p>
</div>
<div class="paragraph">
<p>服务网关Janus是Halo体系的一个组成模块,为各业务开发部门开发的业务服务(RESTful、RPC)提供对外统一的,高性能的HTTP网关。<br>
Janus致力于优化API入口的七层协议接入,主要从下面几个方面进行优化:<br></p>
</div>
<div class="ulist">
<ul>
<li>
<p>协议支持:外网HTTPS、HTTP2、HTTP、自定义协议等,自动适配到内网RPC协议和HTTP协议。</p>
</li>
<li>
<p>接入优化:SSL session复用、SSL 加解密异步化、异地多活、流量管控</p>
</li>
<li>
<p>安全: 认证验签、验签加固、设备指纹、WAF、防刷、限流、风控</p>
</li>
<li>
<p>其他: 单元化、轻量数据聚合、A/B test, mock api, 多租户等</p>
</li>
</ul>
</div>
</div>
</div>
<div class="sect1">
<h2 id="_janus_基本功能和定位"><a class="anchor" href="#_janus_基本功能和定位"></a><a class="link" href="#_janus_基本功能和定位">2. Janus 基本功能和定位</a></h2>
<div class="sectionbody">
</div>
</div>
<div class="sect1">
<h2 id="_janus_项目"><a class="anchor" href="#_janus_项目"></a><a class="link" href="#_janus_项目">3. Janus 项目</a></h2>
<div class="sectionbody">
<div class="sect2">
<h3 id="_janus_team"><a class="anchor" href="#_janus_team"></a><a class="link" href="#_janus_team">3.1. Janus Team</a></h3>
<div class="paragraph">
<p>Janus Team开发团队信息如下,感谢所有对Janus有贡献的所有人!</p>
</div>
<table class="tableblock frame-all grid-all stretch">
<colgroup>
<col style="width: 25%;">
<col style="width: 25%;">
<col style="width: 25%;">
<col style="width: 25%;">
</colgroup>
<thead>
<tr>
<th class="tableblock halign-left valign-top">github id</th>
<th class="tableblock halign-left valign-top">角色</th>
<th class="tableblock halign-left valign-top">github地址</th>
<th class="tableblock halign-left valign-top">备注</th>
</tr>
</thead>
<tbody>
<tr>
<td class="tableblock halign-left valign-top"><p class="tableblock">SoftwareKing</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">PPMC</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock"><a href="https://github.com/SoftwareKing" class="bare">https://github.com/SoftwareKing</a></p></td>
<td class="tableblock halign-left valign-top"></td>
</tr>
<tr>
<td class="tableblock halign-left valign-top"><p class="tableblock">wolfgump</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">PPMC</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock"><a href="https://github.com/wolfgump" class="bare">https://github.com/wolfgump</a></p></td>
<td class="tableblock halign-left valign-top"></td>
</tr>
<tr>
<td class="tableblock halign-left valign-top"><p class="tableblock">tbkk</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">PPMC</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock"><a href="https://github.com/tbkk" class="bare">https://github.com/tbkk</a></p></td>
<td class="tableblock halign-left valign-top"></td>
</tr>
</tbody>
</table>
</div>
<div class="sect2">
<h3 id="_janus工程"><a class="anchor" href="#_janus工程"></a><a class="link" href="#_janus工程">3.2. Janus工程</a></h3>
<div class="paragraph">
<p>Janus工程主要为3个项目,如下所示:</p>
</div>
<table class="tableblock frame-all grid-all stretch">
<colgroup>
<col style="width: 33.3333%;">
<col style="width: 33.3333%;">
<col style="width: 33.3334%;">
</colgroup>
<thead>
<tr>
<th class="tableblock halign-left valign-top">工程名</th>
<th class="tableblock halign-left valign-top">说明</th>
<th class="tableblock halign-left valign-top">github地址</th>
</tr>
</thead>
<tbody>
<tr>
<td class="tableblock halign-left valign-top"><p class="tableblock">janus</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">janus网关Server</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock"><a href="https://github.com/JanusTeam/Janus" class="bare">https://github.com/JanusTeam/Janus</a></p></td>
</tr>
<tr>
<td class="tableblock halign-left valign-top"><p class="tableblock">janus-ui</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">janus管控平台前端</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock"><a href="https://github.com/JanusTeam/janus-ui" class="bare">https://github.com/JanusTeam/janus-ui</a></p></td>
</tr>
<tr>
<td class="tableblock halign-left valign-top"><p class="tableblock">janus-admin</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">Janus网关的管控平台后端</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">暂无</p></td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
<h1 id="janus-design" class="sect0"><a class="anchor" href="#janus-design"></a><a class="link" href="#janus-design">III. janus设计</a></h1>
<div class="sect1">
<h2 id="_janus_filter设计"><a class="anchor" href="#_janus_filter设计"></a><a class="link" href="#_janus_filter设计">4. janus filter设计</a></h2>
<div class="sectionbody">
<div class="sect2">
<h3 id="_filter设计"><a class="anchor" href="#_filter设计"></a><a class="link" href="#_filter设计">4.1. Filter设计</a></h3>
<div class="paragraph">
<p>责任链模式是实现了类似「流水线」结构的逐级处理,通常是一条链式结构,将「抽象处理者」的不同实现串联起来:
如果当前节点能够处理任务则直接处理掉,如果无法处理则委托给责任链的下一个节点,如此往复直到有节点可以处理这个任务。</p>
</div>
<div class="paragraph">
<p>Filter链的设计正式采用了这种责任链的设计方式</p>
</div>
</div>
<div class="sect2">
<h3 id="_filter执行流程"><a class="anchor" href="#_filter执行流程"></a><a class="link" href="#_filter执行流程">4.2. filter执行流程</a></h3>
</div>
<div class="sect2">
<h3 id="_invoke_filter设计"><a class="anchor" href="#_invoke_filter设计"></a><a class="link" href="#_invoke_filter设计">4.3. Invoke Filter设计</a></h3>
</div>
</div>
</div>
<div class="sect1">
<h2 id="_janus_路由设计"><a class="anchor" href="#_janus_路由设计"></a><a class="link" href="#_janus_路由设计">5. Janus 路由设计</a></h2>
<div class="sectionbody">
<div class="sect2">
<h3 id="_路由模型设计"><a class="anchor" href="#_路由模型设计"></a><a class="link" href="#_路由模型设计">5.1. 路由模型设计</a></h3>
</div>
<div class="sect2">
<h3 id="_示例路由配置"><a class="anchor" href="#_示例路由配置"></a><a class="link" href="#_示例路由配置">5.2. 示例路由配置</a></h3>
<div class="listingblock">
<div class="content">
<pre class="CodeRay highlight"><code data-lang="yml"><span class="key">routes</span>:
- <span class="string"><span class="content">id: 1</span></span> <span class="comment">#演示Spring Cloud应用模糊匹配并走LB # http://localhost:8081/janus-admin/admin/menu/manage/allMenu</span>
<span class="key">filters</span>:
- <span class="string"><span class="content">name: StripPrefix</span></span> <span class="comment">#去前缀</span>
<span class="key">args</span>:
<span class="key">parts</span>: <span class="string"><span class="content">1</span></span>
- <span class="string"><span class="content">name: AddRequestHeader</span></span> <span class="comment">#添加Header</span>
<span class="key">args</span>:
<span class="key">X-Request-Blue</span>: <span class="string"><span class="content">Blue</span></span>
<span class="key">X-Request-Red</span>: <span class="string"><span class="content">red</span></span>
<span class="key">protocol</span>: <span class="string"><span class="content">lb://sc</span></span>
<span class="key">serviceName</span>: <span class="string"><span class="content">janus-admin</span></span>
<span class="key">loadBalancerName</span>: <span class="string"><span class="content">round-robin</span></span> <span class="comment">#random、hash; default is round-robin</span>
<span class="key">predicates</span>: <span class="comment"># and ; if need or add a new route</span>
- <span class="string"><span class="content">name: PathRegex</span></span>
<span class="key">args</span>:
<span class="key">pattern</span>: <span class="string"><span class="content">^/janus-admin/.*</span></span>
- <span class="string"><span class="content">id: 2</span></span> <span class="comment">#演示 URL1->URL2 并走LB #http://localhost:8081/api/getAllMenu</span>
<span class="key">protocol</span>: <span class="string"><span class="content">lb://sc</span></span>
<span class="key">serviceName</span>: <span class="string"><span class="content">janus-admin</span></span>
<span class="key">filters</span>:
- <span class="string"><span class="content">name: PathMapping</span></span>
<span class="key">args</span>:
<span class="key">/api/getAllMenu</span>: <span class="string"><span class="delimiter">"</span><span class="content">/admin/menu/manage/allMenu</span><span class="delimiter">"</span></span>
<span class="key">predicates</span>: <span class="comment"># and ; if need or add a new route</span>
- <span class="string"><span class="content">name: PathPrecise</span></span>
<span class="key">args</span>:
<span class="key">pattern</span>: <span class="string"><span class="content">/api/getAllMenu</span></span>
- <span class="string"><span class="content">id: 3</span></span> <span class="comment">#用于演示精准匹配,不走LB http://localhost:8081/admin/menu/manage/allMenu</span>
<span class="key">protocol</span>: <span class="string"><span class="content">http</span></span>
<span class="key">hosts</span>:
- <span class="string"><span class="content">127.0.0.1:8084</span></span>
<span class="key">predicates</span>: <span class="comment"># and ; if need or add a new route</span>
- <span class="string"><span class="content">name: PathPrecise</span></span>
<span class="key">args</span>:
<span class="key">paths</span>: <span class="string"><span class="content">/admin/menu/manage/allMenu</span></span>
- <span class="string"><span class="content">id: 4</span></span> <span class="comment">#用于模糊匹配,不走LB</span>
<span class="key">protocol</span>: <span class="string"><span class="content">http</span></span>
<span class="key">hosts</span>:
- <span class="string"><span class="content">127.0.0.1:8084</span></span>
<span class="key">predicates</span>: <span class="comment"># and ; if need or add a new route</span>
- <span class="string"><span class="content">name: PathRegex</span></span>
<span class="key">args</span>:
<span class="key">pattern</span>: <span class="string"><span class="content">^/janus-admin-test/.*</span></span>
- <span class="string"><span class="content">id: 5</span></span> <span class="comment">#用于演示精准匹配,不走LB http://localhost:8081/admin1/menu/manage/allMenu3</span>
<span class="key">filters</span>:
- <span class="string"><span class="content">name: MockResponse</span></span>
<span class="key">args</span>:
<span class="key">/admin1/menu/manage/allMenu3</span>: <span class="string"><span class="delimiter">"</span><span class="content">hello word!</span><span class="delimiter">"</span></span>
<span class="key">protocol</span>: <span class="string"><span class="content">http</span></span>
<span class="key">hosts</span>:
- <span class="string"><span class="content">127.0.0.1:8084</span></span>
<span class="key">predicates</span>: <span class="comment"># and ; if need or add a new route</span>
- <span class="string"><span class="content">name: PathPrecise</span></span>
<span class="key">args</span>:
<span class="key">paths</span>: <span class="string"><span class="content">/admin1/menu/manage/allMenu3</span></span>
- <span class="string"><span class="content">id: 6</span></span> <span class="comment">#用于演示精准匹配,不走LB,直接转发到指定的IP和端口 http://localhost:8081/admin2/menu/manage/allMenu2</span>
<span class="key">filters</span>:
- <span class="string"><span class="content">name: PathMapping</span></span>
<span class="key">args</span>:
<span class="key">/admin2/menu/manage/allMenu2</span>: <span class="string"><span class="delimiter">"</span><span class="content">/admin/menu/manage/allMenu</span><span class="delimiter">"</span></span>
<span class="key">protocol</span>: <span class="string"><span class="content">http</span></span>
<span class="key">hosts</span>:
- <span class="string"><span class="content">127.0.0.1:8084</span></span>
<span class="key">predicates</span>: <span class="comment"># and ; if need or add a new route</span>
- <span class="string"><span class="content">name: PathPrecise</span></span>
<span class="key">args</span>:
<span class="key">paths</span>: <span class="string"><span class="content">/admin2/menu/manage/allMenu2</span></span>
- <span class="string"><span class="content">id: 7</span></span> <span class="comment">#根据配置的多个Hosts不通过注册中心进行LB #http://localhost:8081/admin7/menu/manage/allMenu2</span>
<span class="key">filters</span>:
- <span class="string"><span class="content">name: PathMapping</span></span>
<span class="key">args</span>:
<span class="key">/admin7/menu/manage/allMenu2</span>: <span class="string"><span class="delimiter">"</span><span class="content">/admin/menu/manage/allMenu</span><span class="delimiter">"</span></span>
<span class="key">protocol</span>: <span class="string"><span class="content">lb://hosts</span></span>
<span class="key">hosts</span>:
- <span class="string"><span class="content">127.0.0.1:8084</span></span>
- <span class="string"><span class="content">admin.qingcloud.net:80</span></span>
<span class="key">predicates</span>: <span class="comment"># and ; if need or add a new route</span>
- <span class="string"><span class="content">name: PathPrecise</span></span>
<span class="key">args</span>:
<span class="key">paths</span>: <span class="string"><span class="content">/admin7/menu/manage/allMenu2</span></span></code></pre>
</div>
</div>
</div>
</div>
</div>
<div class="sect1">
<h2 id="_janus_predicates断言设计"><a class="anchor" href="#_janus_predicates断言设计"></a><a class="link" href="#_janus_predicates断言设计">6. Janus Predicates(断言设计)</a></h2>
<div class="sectionbody">
<div class="sect2">
<h3 id="_断言设计"><a class="anchor" href="#_断言设计"></a><a class="link" href="#_断言设计">6.1. 断言设计</a></h3>
</div>
<div class="sect2">
<h3 id="_精准匹配"><a class="anchor" href="#_精准匹配"></a><a class="link" href="#_精准匹配">6.2. 精准匹配</a></h3>
</div>
<div class="sect2">
<h3 id="_模糊匹配"><a class="anchor" href="#_模糊匹配"></a><a class="link" href="#_模糊匹配">6.3. 模糊匹配</a></h3>
</div>
</div>
</div>
<div class="sect1">
<h2 id="_janus_netty中的设计"><a class="anchor" href="#_janus_netty中的设计"></a><a class="link" href="#_janus_netty中的设计">7. Janus Netty中的设计</a></h2>
<div class="sectionbody">
<div class="paragraph">
<p>org.xujin.janus.core.netty.client.NettyConnectClient</p>
</div>
<div class="paragraph">
<p>org.xujin.janus.core.netty.server.NettyServer-→NettyServerHandler</p>
</div>
<div class="sect2">
<h3 id="_janus_server的设计"><a class="anchor" href="#_janus_server的设计"></a><a class="link" href="#_janus_server的设计">7.1. Janus Server的设计</a></h3>
<div class="sect4">
<h5 id="_网关接受请求的netty_server"><a class="anchor" href="#_网关接受请求的netty_server"></a><a class="link" href="#_网关接受请求的netty_server">7.1.1. 网关接受请求的Netty Server</a></h5>
<div class="paragraph">
<p>org.xujin.janus.core.netty.NettyServer.java</p>
</div>
<div class="listingblock">
<div class="content">
<pre class="CodeRay highlight"><code data-lang="java"><span class="comment">/**
* 初始化EventPool 参数
*/</span>
<span class="directive">private</span> <span class="type">void</span> initEventPool() {
bossGroup = <span class="keyword">new</span> NioEventLoopGroup(serverConfig.getBossThread(), <span class="keyword">new</span> <span class="predefined-type">ThreadFactory</span>() {
<span class="directive">private</span> <span class="predefined-type">AtomicInteger</span> index = <span class="keyword">new</span> <span class="predefined-type">AtomicInteger</span>(<span class="integer">0</span>);
<span class="annotation">@Override</span>
<span class="directive">public</span> <span class="predefined-type">Thread</span> newThread(<span class="predefined-type">Runnable</span> r) {
<span class="keyword">return</span> <span class="keyword">new</span> <span class="predefined-type">Thread</span>(r, <span class="string"><span class="delimiter">"</span><span class="content">Janus_Boss_</span><span class="delimiter">"</span></span> + index.incrementAndGet());
}
});
workGroup = <span class="keyword">new</span> NioEventLoopGroup(serverConfig.getWorkThread(), <span class="keyword">new</span> <span class="predefined-type">ThreadFactory</span>() {
<span class="directive">private</span> <span class="predefined-type">AtomicInteger</span> index = <span class="keyword">new</span> <span class="predefined-type">AtomicInteger</span>(<span class="integer">0</span>);
<span class="annotation">@Override</span>
<span class="directive">public</span> <span class="predefined-type">Thread</span> newThread(<span class="predefined-type">Runnable</span> r) {
<span class="keyword">return</span> <span class="keyword">new</span> <span class="predefined-type">Thread</span>(r, <span class="string"><span class="delimiter">"</span><span class="content">Janus_Work_</span><span class="delimiter">"</span></span> + index.incrementAndGet());
}
});
}
<span class="comment">/**
* 服务开启
*/</span>
<span class="directive">public</span> <span class="type">void</span> start(<span class="type">int</span> port) {
<span class="comment">//TODO 上生产时去掉</span>
ResourceLeakDetector.setLevel(ResourceLeakDetector.Level.ADVANCED);
initEventPool();
ServerBootstrap bootstrap = <span class="keyword">new</span> ServerBootstrap();
<span class="comment">//绑定线程池</span>
bootstrap.group(bossGroup, workGroup)
.channel(NioServerSocketChannel.class) <span class="comment">//指定使用的channel</span>
.option(ChannelOption.SO_REUSEADDR, serverConfig.isReUseAddr())
.option(ChannelOption.SO_BACKLOG, serverConfig.getBackLog())
.childOption(ChannelOption.SO_RCVBUF, serverConfig.getRevBuf())
.childOption(ChannelOption.SO_SNDBUF, serverConfig.getSndBuf())
.childOption(ChannelOption.TCP_NODELAY, serverConfig.isTcpNoDelay())
.childOption(ChannelOption.SO_KEEPALIVE, serverConfig.isKeepalive())
.childHandler(initChildHandler());
bootstrap.bind(port).addListener((ChannelFutureListener) channelFuture -> {
<span class="keyword">if</span> (channelFuture.isSuccess()) {
changeOnLine(<span class="predefined-constant">true</span>);
log.info(<span class="string"><span class="delimiter">"</span><span class="content">服务端启动成功【</span><span class="delimiter">"</span></span> + IpUtils.getHost() + <span class="string"><span class="delimiter">"</span><span class="content">:</span><span class="delimiter">"</span></span> + port + <span class="string"><span class="delimiter">"</span><span class="content">】</span><span class="delimiter">"</span></span>);
} <span class="keyword">else</span> {
log.error(<span class="string"><span class="delimiter">"</span><span class="content">服务端启动失败【</span><span class="delimiter">"</span></span> + IpUtils.getHost() + <span class="string"><span class="delimiter">"</span><span class="content">:</span><span class="delimiter">"</span></span> + port + <span class="string"><span class="delimiter">"</span><span class="content">】,cause:</span><span class="delimiter">"</span></span>
+ channelFuture.cause().getMessage());
shutdown(port);
}
});
}</code></pre>
</div>
</div>
<div class="ulist">
<ul>
<li>
<p>Netty的Server端,不管是Netty Server端和Client端都有NioEventLoopGroup</p>
</li>
<li>
<p>因为是Netty Server端,所以Channel类型是NioServerSocketChannel.</p>
</li>
<li>
<p>childHandler(initChildHandler())是基于Pipeline的自定义Handler机制。</p>
</li>
<li>
<p>EventLoopGroup:无论是服务端还是客户端,都必须指定EventLoopGroup。
在上面的代码中,
指定了NioEventLoopGroup,表示一个NIO的EventLoopGroup,不过服务端需要指定两个EventLoopGroup,一个是bossGroup,
用于处理客户端的连接请求;另一个是workerGroup,用于处理与各个客户端连接的I/O操作。</p>
</li>
</ul>
</div>
<div class="paragraph">
<p>(2)指定Channel的类型。这里是服务端,所以使用了NioServerSocketChannel。</p>
</div>
<div class="paragraph">
<p>(3)配置自定义的业务处理器Handler。</p>
</div>
<div class="listingblock">
<div class="content">
<pre class="CodeRay highlight"><code data-lang="java"><span class="annotation">@SuppressWarnings</span>(<span class="string"><span class="delimiter">"</span><span class="content">rawtypes</span><span class="delimiter">"</span></span>)
<span class="directive">private</span> ChannelInitializer initChildHandler() {
<span class="keyword">return</span> <span class="keyword">new</span> ChannelInitializer<<span class="predefined-type">SocketChannel</span>>() {
<span class="directive">final</span> <span class="predefined-type">ThreadPoolExecutor</span> serverHandlerPool = ThreadPoolUtils.makeServerThreadPool(NettyServer.class.getSimpleName());
<span class="comment">//网关Server的Http请求入口Handler</span>
<span class="directive">final</span> NettyServerHandler nettyServerHandler = <span class="keyword">new</span> NettyServerHandler(serverHandlerPool);
<span class="annotation">@Override</span>
<span class="directive">protected</span> <span class="type">void</span> initChannel(<span class="predefined-type">SocketChannel</span> ch) <span class="directive">throws</span> <span class="exception">Exception</span> {
<span class="comment">//initHandler(ch.pipeline(), serverConfig);</span>
ch.pipeline().addLast(<span class="keyword">new</span> IdleStateHandler(<span class="integer">180</span>, <span class="integer">0</span>, <span class="integer">0</span>));
ch.pipeline().addLast(<span class="string"><span class="delimiter">"</span><span class="content">logging</span><span class="delimiter">"</span></span>, <span class="keyword">new</span> LoggingHandler(LogLevel.DEBUG));
<span class="comment">// We want to allow longer request lines, headers, and chunks</span>
<span class="comment">// respectively.</span>
ch.pipeline().addLast(<span class="string"><span class="delimiter">"</span><span class="content">decoder</span><span class="delimiter">"</span></span>, <span class="keyword">new</span> HttpRequestDecoder(
serverConfig.getMaxInitialLineLength(),
serverConfig.getMaxHeaderSize(),
serverConfig.getMaxChunkSize()));
<span class="comment">//ch.pipeline().addLast("inflater", new HttpContentDecompressor());</span>
ch.pipeline().addLast(<span class="string"><span class="delimiter">"</span><span class="content">aggregator</span><span class="delimiter">"</span></span>, <span class="keyword">new</span> HttpObjectAggregator(serverConfig.getMaxHttpLength()));
<span class="comment">//响应解码器</span>
ch.pipeline().addLast(<span class="string"><span class="delimiter">"</span><span class="content">http-encoder</span><span class="delimiter">"</span></span>, <span class="keyword">new</span> HttpResponseEncoder());
<span class="comment">//目的是支持异步大文件传输()</span>
ch.pipeline().addLast(<span class="string"><span class="delimiter">"</span><span class="content">http-chunked</span><span class="delimiter">"</span></span>, <span class="keyword">new</span> ChunkedWriteHandler());
<span class="comment">//网关Server的Netty HTTP连接处理类</span>
ch.pipeline().addLast(<span class="string"><span class="delimiter">"</span><span class="content">process</span><span class="delimiter">"</span></span>, nettyServerHandler);
}
};
}</code></pre>
</div>
</div>
</div>
<div class="sect4">
<h5 id="_网关转发调用内部源服务的client"><a class="anchor" href="#_网关转发调用内部源服务的client"></a><a class="link" href="#_网关转发调用内部源服务的client">7.1.2. 网关转发调用内部源服务的Client</a></h5>
<div class="olist arabic">
<ol class="arabic">
<li>
<p>网关内部转发的客户端Java类 org.xujin.janus.core.netty.client.NettyConnectClient.java</p>
</li>
</ol>
</div>
<div class="listingblock">
<div class="content">
<pre class="CodeRay highlight"><code data-lang="java"><span class="annotation">@Slf4j</span>
<span class="directive">public</span> <span class="type">class</span> <span class="class">NettyConnectClient</span> <span class="directive">extends</span> ConnectClient {
<span class="directive">public</span> NioEventLoopGroup clientGroup = <span class="keyword">new</span> NioEventLoopGroup(<span class="integer">0</span>,
<span class="keyword">new</span> DefaultThreadFactory(<span class="string"><span class="delimiter">"</span><span class="content">Janus-client-Worker</span><span class="delimiter">"</span></span>, <span class="predefined-constant">true</span>));
<span class="directive">private</span> <span class="predefined-type">Channel</span> channel;
<span class="annotation">@Override</span>
<span class="directive">public</span> <span class="type">void</span> init(<span class="predefined-type">String</span> address) <span class="directive">throws</span> <span class="exception">Exception</span> {
<span class="predefined-type">Object</span><span class="type">[]</span> array = IpUtils.parseIpPort(address);
<span class="predefined-type">String</span> host = (<span class="predefined-type">String</span>) array[<span class="integer">0</span>];
<span class="type">int</span> port = (<span class="type">int</span>) array[<span class="integer">1</span>];
Bootstrap bootstrap = <span class="keyword">new</span> Bootstrap();
bootstrap.group(clientGroup)
.channel(NioSocketChannel.class)
.handler(<span class="keyword">new</span> ChannelInitializer<<span class="predefined-type">SocketChannel</span>>() {
<span class="annotation">@Override</span>
<span class="directive">public</span> <span class="type">void</span> initChannel(<span class="predefined-type">SocketChannel</span> channel) <span class="directive">throws</span> <span class="exception">Exception</span> {
channel.pipeline()
.addLast(<span class="keyword">new</span> IdleStateHandler(<span class="integer">0</span>, <span class="integer">0</span>, <span class="integer">60</span>, <span class="predefined-type">TimeUnit</span>.SECONDS))
<span class="comment">// .addLast(new HttpClientCodec())</span>
<span class="comment">// .addLast(new HttpObjectAggregator(65536))</span>
<span class="comment">//解压</span>
<span class="comment">//.addLast(new HttpContentDecompressor())</span>
.addLast(<span class="keyword">new</span> HttpClientCodec(NettyConstants.MAX_INITIAL_LINE_LENGTH,NettyConstants.MAX_HEADER_SIZE, NettyConstants.MAX_CHUNK_SIZE),
<span class="keyword">new</span> HttpObjectAggregator(NettyConstants.MAX_RESPONSE_SIZE))
<span class="comment">//Netty Client把请求转发给内网源服务的Handler</span>
.addLast(<span class="string"><span class="delimiter">"</span><span class="content">handler</span><span class="delimiter">"</span></span>, <span class="keyword">new</span> NettyClientHandler());
}
})
.option(ChannelOption.TCP_NODELAY, <span class="predefined-constant">true</span>)
.option(ChannelOption.SO_KEEPALIVE, <span class="predefined-constant">true</span>)
.option(ChannelOption.CONNECT_TIMEOUT_MILLIS, <span class="integer">60</span>*<span class="integer">1000</span>);
<span class="local-variable">this</span>.channel = bootstrap.connect(host, port).sync().channel();
<span class="comment">// valid</span>
<span class="keyword">if</span> (!isValidate()) {
close();
<span class="keyword">return</span>;
}
log.debug(<span class="string"><span class="delimiter">"</span><span class="content">netty client proxy, connect to server success at host:{}, port:{}</span><span class="delimiter">"</span></span>, host, port);
}
}</code></pre>
</div>
</div>
<div class="ulist">
<ul>
<li>
<p>Netty客户端必须有NioEventLoopGroup</p>
</li>
<li>
<p>ChannelType:指定Channel的类型。因为是客户端,所以使用了NioSocketChannel。</p>
</li>
<li>
<p>new NioEventLoopGroup()核心线程数是CPU*2,如果我们传入的线程数nThreads是0,那么Netty会设置默认的线程数DEFAULT_EVENT_LOOP_THREADS,而这个默认的</p>
</li>
</ul>
</div>
<div class="paragraph">
<p>Netty的客户端如何发起TCP长连接</p>
</div>
<div class="paragraph">
<p>bootstrap.connect(host, port).sync().channel()</p>
</div>
<div class="paragraph">
<p>客户端通过调用Bootstrap的connect()方法进行连接。在connect()方法中进行一些参数检查,并调用doConnect()方法,</p>
</div>
<div class="listingblock">
<div class="content">
<pre class="CodeRay highlight"><code data-lang="java"><span class="directive">static</span> {
DEFAULT_EVENT_LOOP_THREADS = <span class="predefined-type">Math</span>.max(<span class="integer">1</span>, SystemPropertyUtil.getInt(
<span class="string"><span class="delimiter">"</span><span class="content">io.netty.eventLoopThreads</span><span class="delimiter">"</span></span>, NettyRuntime.availableProcessors() * <span class="integer">2</span>));
<span class="keyword">if</span> (logger.isDebugEnabled()) {
logger.debug(<span class="string"><span class="delimiter">"</span><span class="content">-Dio.netty.eventLoopThreads: {}</span><span class="delimiter">"</span></span>, DEFAULT_EVENT_LOOP_THREADS);
}
}
<span class="comment">/**
* @see MultithreadEventExecutorGroup#MultithreadEventExecutorGroup(int, ThreadFactory, Object...)
*/</span>
<span class="directive">protected</span> MultithreadEventLoopGroup(<span class="type">int</span> nThreads, <span class="predefined-type">ThreadFactory</span> threadFactory, <span class="predefined-type">Object</span>... args) {
<span class="local-variable">super</span>(nThreads == <span class="integer">0</span> ? DEFAULT_EVENT_LOOP_THREADS : nThreads, threadFactory, args);
}</code></pre>
</div>
</div>
</div>
<div class="sect4">
<h5 id="_网关转发调用源服务的连接池"><a class="anchor" href="#_网关转发调用源服务的连接池"></a><a class="link" href="#_网关转发调用源服务的连接池">7.1.3. 网关转发调用源服务的连接池</a></h5>
<div class="paragraph">
<p>网关Server内置的Netty客户端不是每次转发都立即创建一个连接,而是从连接池中获取一个连接。</p>
</div>
</div>
</div>
</div>
</div>
<div class="sect1">
<h2 id="_rpc数据传输"><a class="anchor" href="#_rpc数据传输"></a><a class="link" href="#_rpc数据传输">8. RPC数据传输</a></h2>
<div class="sectionbody">
</div>
</div>
<div class="sect1">
<h2 id="_http数据处理"><a class="anchor" href="#_http数据处理"></a><a class="link" href="#_http数据处理">9. http数据处理</a></h2>
<div class="sectionbody">
</div>
</div>
<div class="sect1">
<h2 id="_janus监控告警系统设计"><a class="anchor" href="#_janus监控告警系统设计"></a><a class="link" href="#_janus监控告警系统设计">10. Janus监控告警系统设计</a></h2>
<div class="sectionbody">
<div class="sect2">
<h3 id="_背景"><a class="anchor" href="#_背景"></a><a class="link" href="#_背景">10.1. 背景</a></h3>
<div class="olist arabic">
<ol class="arabic">
<li>
<p>需要统一的流量统计、监控告警指标,以便对Janus系统性能、运行状态进行分析。</p>
</li>
<li>
<p>Janus网关需要对进来的业务流量进行监控、统计和实时告警,以让业务方了解他们的服务经过Janus的实时状态。</p>
</li>
<li>
<p>对Janus本身运行情况进行监控和告警,以便发现Janus系统的问题,对产品持续做改进。</p>
</li>
<li>
<p>通过监控告警,直接定位到相应的处理人员,提高故障处理效率。</p>
</li>
</ol>
</div>
</div>
<div class="sect2">
<h3 id="_应用场景"><a class="anchor" href="#_应用场景"></a><a class="link" href="#_应用场景">10.2. 应用场景</a></h3>
<div class="olist arabic">
<ol class="arabic">
<li>
<p>业务方人员。了解服务调用统计信息、调用耗时、出错率、异常等信息,方便排查问题。</p>
</li>
<li>
<p>Janus开发人员。评估系统性能、流量负载情况,发现系统运行问题。</p>
</li>
<li>
<p>系统运维人员。了解Janus机器和进程运行状态,机器负载,以发现集群运行问题。</p>
</li>
</ol>
</div>
</div>
</div>
</div>
<div class="sect1">
<h2 id="_waf2_0"><a class="anchor" href="#_waf2_0"></a><a class="link" href="#_waf2_0">11. WAF2.0</a></h2>
<div class="sectionbody">
</div>
</div>
<div class="sect1">
<h2 id="_janus限流方案设计"><a class="anchor" href="#_janus限流方案设计"></a><a class="link" href="#_janus限流方案设计">12. Janus限流方案设计</a></h2>
<div class="sectionbody">
<div class="sect2">
<h3 id="_需求"><a class="anchor" href="#_需求"></a><a class="link" href="#_需求">12.1. 需求</a></h3>
<div class="olist arabic">
<ol class="arabic">
<li>
<p>保证Janus服务器在 瞬间 极限流量的冲击下,稳定提供服务。</p>
</li>
</ol>
</div>
</div>
</div>
</div>
<h1 id="janus-Admin-design" class="sect0"><a class="anchor" href="#janus-Admin-design"></a><a class="link" href="#janus-Admin-design">IV. janus Admin设计</a></h1>
<div class="sect1">
<h2 id="_数据库设计"><a class="anchor" href="#_数据库设计"></a><a class="link" href="#_数据库设计">13. 数据库设计</a></h2>
<div class="sectionbody">
<div class="sect2">
<h3 id="_db表结构设计"><a class="anchor" href="#_db表结构设计"></a><a class="link" href="#_db表结构设计">13.1. DB表结构设计</a></h3>
</div>
<div class="sect2">
<h3 id="_api的模型设计"><a class="anchor" href="#_api的模型设计"></a><a class="link" href="#_api的模型设计">13.2. API的模型设计</a></h3>
<div class="listingblock">
<div class="content">
<pre class="CodeRay highlight"><code data-lang="yml">- <span class="string"><span class="content">id: 7</span></span> <span class="comment">#根据配置的多个Hosts不通过注册中心进行LB #http://localhost:8081/admin7/menu/manage/allMenu2</span>
<span class="key">filters</span>:
- <span class="string"><span class="content">name: PathMapping</span></span>
<span class="key">args</span>:
<span class="key">/admin7/menu/manage/allMenu2</span>: <span class="string"><span class="delimiter">"</span><span class="content">/admin/menu/manage/allMenu</span><span class="delimiter">"</span></span>
<span class="key">protocol</span>: <span class="string"><span class="content">lb://hosts</span></span>
<span class="key">hosts</span>:
- <span class="string"><span class="content">127.0.0.1:8084</span></span>
- <span class="string"><span class="content">admin.qingcloud.net:80</span></span>
<span class="key">predicates</span>: <span class="comment"># and ; if need or add a new route</span>
- <span class="string"><span class="content">name: PathPrecise</span></span>
<span class="key">args</span>:
<span class="key">paths</span>: <span class="string"><span class="content">/admin7/menu/manage/allMenu2</span></span></code></pre>
</div>
</div>
</div>
</div>
</div>
<div class="sect1">
<h2 id="_janus_admin使用"><a class="anchor" href="#_janus_admin使用"></a><a class="link" href="#_janus_admin使用">14. Janus Admin使用</a></h2>
<div class="sectionbody">
<div class="sect2">
<h3 id="_api管理"><a class="anchor" href="#_api管理"></a><a class="link" href="#_api管理">14.1. API管理</a></h3>
<div class="sect3">
<h4 id="_新建api"><a class="anchor" href="#_新建api"></a><a class="link" href="#_新建api">14.1.1. 新建API</a></h4>
<div class="ulist">
<ul>
<li>
<p>新建路由进行负载均衡</p>
</li>
</ul>
</div>
<div class="listingblock">
<div class="content">
<pre class="CodeRay highlight"><code data-lang="yml">- <span class="string"><span class="content">id: 7</span></span> <span class="comment">#根据配置的多个Hosts不通过注册中心进行LB #http://localhost:8081/admin7/menu/manage/allMenu2</span>
<span class="key">filters</span>:
- <span class="string"><span class="content">name: PathMapping</span></span>
<span class="key">args</span>:
<span class="key">/admin7/menu/manage/allMenu2</span>: <span class="string"><span class="delimiter">"</span><span class="content">/admin/menu/manage/allMenu</span><span class="delimiter">"</span></span>
<span class="key">protocol</span>: <span class="string"><span class="content">lb://hosts</span></span>
<span class="key">hosts</span>:
- <span class="string"><span class="content">127.0.0.1:8084</span></span>
- <span class="string"><span class="content">admin.qingcloud.net:80</span></span>
<span class="key">predicates</span>: <span class="comment"># and ; if need or add a new route</span>
- <span class="string"><span class="content">name: PathPrecise</span></span>
<span class="key">args</span>:
<span class="key">paths</span>: <span class="string"><span class="content">/admin7/menu/manage/allMenu2</span></span></code></pre>
</div>
</div>
<div class="paragraph">
<p>Janus Admin的UI操作</p>
</div>
<div class="imageblock">
<div class="content">
<img src="images/admin/api/lb-hosts-1.png" alt="lb hosts 1" width="100%">
</div>
</div>
<div class="imageblock">
<div class="content">
<img src="images/admin/api/lb-hosts-2.png" alt="lb hosts 2" width="100%">
</div>
</div>
</div>
</div>
</div>
</div>
<div class="sect1">
<h2 id="_开发者手册"><a class="anchor" href="#_开发者手册"></a><a class="link" href="#_开发者手册">15. 开发者手册</a></h2>
<div class="sectionbody">
<div class="sect2">
<h3 id="_启动janus_server"><a class="anchor" href="#_启动janus_server"></a><a class="link" href="#_启动janus_server">15.1. 启动Janus Server</a></h3>
<div class="paragraph">
<p>在IDEA中运行JanusServerApplication.java,设置启动参数即可。
eg:-Dcluster=Janus_Test -Dlocal=true,如下图所示:</p>
</div>
<div class="imageblock">
<div class="content">
<img src="images/dev-guide/1.png" alt="1" width="100%">
</div>
</div>
<div class="admonitionblock note">
<table>
<tr>
<td class="icon">
<div class="title">Note</div>
</td>
<td class="content">
-Dcluster=Janus_Test是网关集群编码Janus_Test,
-Dlocal=true表示启动的时候读取本地配置文件,而不是远端配置文件
</td>
</tr>
</table>
</div>
</div>
</div>
</div>
</div>
<div id="footer">
<div id="footer-text">
version: 1.0.0.REALESE<br>
Last updated 2020-08-02 12:35:57 UTC
</div>
</div>
</body>
</html>