forked from Echosong/beego_blog
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdb_beego.sql
188 lines (170 loc) · 407 KB
/
db_beego.sql
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
/*
Navicat MySQL Data Transfer
Source Server : localhost1
Source Server Version : 50726
Source Host : localhost:3306
Source Database : db_beego
Target Server Type : MYSQL
Target Server Version : 50726
File Encoding : 65001
Date: 2021-10-24 18:06:42
*/
SET FOREIGN_KEY_CHECKS=0;
-- ----------------------------
-- Table structure for `tb_category`
-- ----------------------------
DROP TABLE IF EXISTS `tb_category`;
CREATE TABLE `tb_category` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`name` varchar(255) NOT NULL,
`created` timestamp NULL DEFAULT CURRENT_TIMESTAMP,
`updated` timestamp NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=10 DEFAULT CHARSET=utf8mb4;
-- ----------------------------
-- Records of tb_category
-- ----------------------------
INSERT INTO `tb_category` VALUES ('1', '单页', '2021-10-24 16:21:00', '2021-10-24 16:21:04');
INSERT INTO `tb_category` VALUES ('2', '公告', null, '2021-10-24 17:29:35');
INSERT INTO `tb_category` VALUES ('6', 'python', null, '2021-10-24 12:10:31');
INSERT INTO `tb_category` VALUES ('7', 'java', null, '2021-10-24 12:10:21');
INSERT INTO `tb_category` VALUES ('8', 'golang', null, '2021-10-24 12:10:25');
INSERT INTO `tb_category` VALUES ('9', 'php', '2021-10-24 12:10:36', '2021-10-24 12:10:36');
-- ----------------------------
-- Table structure for `tb_comment`
-- ----------------------------
DROP TABLE IF EXISTS `tb_comment`;
CREATE TABLE `tb_comment` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`username` varchar(200) DEFAULT NULL,
`content` varchar(500) DEFAULT NULL,
`created` timestamp NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
`ip` varchar(100) DEFAULT NULL,
`post_id` int(11) DEFAULT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=10 DEFAULT CHARSET=utf8;
-- ----------------------------
-- Records of tb_comment
-- ----------------------------
INSERT INTO `tb_comment` VALUES ('4', 'dsdfsfdsfds', 'fsdfdsfds', '2017-08-16 15:34:09', '[', '0');
INSERT INTO `tb_comment` VALUES ('5', 'dsfds', 'fdsfds', '2017-08-09 15:41:12', '111', '1');
INSERT INTO `tb_comment` VALUES ('7', 'fsdfdsfdsfds', 'sdfdsfdsf', null, '[', '8');
INSERT INTO `tb_comment` VALUES ('8', 'sdfdsfds', 'fsdfdsfdsfds', null, '[', '8');
INSERT INTO `tb_comment` VALUES ('9', 'fdsfdsfdsfds', '<p style=\"text-align: left;\"><b>fdsfdsfdsffdsfdsfdsfdsfdsdsfdsfds</b></p><p style=\"text-align: left;\"><b><br></b></p><p style=\"text-align: left;\"><b>a. fsdfdsf</b></p>', '2017-08-09 15:42:54', '[', '8');
-- ----------------------------
-- Table structure for `tb_config`
-- ----------------------------
DROP TABLE IF EXISTS `tb_config`;
CREATE TABLE `tb_config` (
`id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
`name` varchar(30) NOT NULL DEFAULT '',
`value` text NOT NULL,
PRIMARY KEY (`id`),
UNIQUE KEY `name` (`name`)
) ENGINE=InnoDB AUTO_INCREMENT=13 DEFAULT CHARSET=utf8;
-- ----------------------------
-- Records of tb_config
-- ----------------------------
INSERT INTO `tb_config` VALUES ('1', 'title', 'beego_Blog');
INSERT INTO `tb_config` VALUES ('2', 'url', 'http://www.hn1024.cn/');
INSERT INTO `tb_config` VALUES ('5', 'keywords', 'beego');
INSERT INTO `tb_config` VALUES ('6', 'description', '基于Go语言和beego框架 前端使用layui 布局 开发的个人博客系统');
INSERT INTO `tb_config` VALUES ('7', 'email', '[email protected]');
INSERT INTO `tb_config` VALUES ('9', 'timezone', '8');
INSERT INTO `tb_config` VALUES ('11', 'start', '1');
INSERT INTO `tb_config` VALUES ('12', 'qq', '313690636');
-- ----------------------------
-- Table structure for `tb_post`
-- ----------------------------
DROP TABLE IF EXISTS `tb_post`;
CREATE TABLE `tb_post` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`user_id` int(11) NOT NULL,
`title` varchar(255) NOT NULL,
`url` varchar(255) CHARACTER SET utf8 NOT NULL COMMENT '下载地址',
`content` mediumtext,
`tags` varchar(100) NOT NULL,
`views` mediumint(9) NOT NULL,
`status` tinyint(4) NOT NULL,
`is_top` tinyint(4) NOT NULL DEFAULT '0',
`created` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
`updated` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
`category_id` int(11) NOT NULL,
`types` tinyint(4) DEFAULT NULL COMMENT '1. 文章 0 下载',
`info` varchar(500) CHARACTER SET utf8 DEFAULT NULL COMMENT '简介',
`image` varchar(200) DEFAULT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=28 DEFAULT CHARSET=utf8mb4;
-- ----------------------------
-- Records of tb_post
-- ----------------------------
INSERT INTO `tb_post` VALUES ('1', '1', '关于本站', 'http://www.hn1024.cn/', '<p>我们致力于为国内外企业及个人提供基于互联网的技术服务,一零二四遵循专业,高效,可持续的方式旨在为广大客户提供全面细致精准的服务。以传统高品质要求为产品标准,结合互联网传媒环境特性,为用户提供更有效的品质服务。 秉持“以人为本”的发展理念,聚合核心技术成员,注重培养新生代团队力量。坚持技术与理念的双重发展,始终保持一零二四在纷繁的第三方技术服务市场中,保持自身独有的核心竞争力。 为广大用户开辟出专属于企业自身的互联网发展之路。</p>', '关于本站', '0', '0', '1', '2021-10-24 17:00:12', '2021-10-24 17:00:24', '1', '1', '关于本站', '');
INSERT INTO `tb_post` VALUES ('13', '1', '华为发布 HarmonyOS 3 开发者预览版,将推出为 HarmonyOS 全新研发的编程语言', 'https://www.infoq.cn/news/8r3lsBU3yU1mQOdoZti6', '<p data-type=\"paragraph\" style=\"margin-top: 0px; margin-bottom: 0px; padding: 0px; line-height: 1.875; font-size: 16px; min-height: 30px; white-space: pre-wrap; word-break: break-all; color: rgb(48, 48, 48); font-family: "Helvetica Neue", "PingFang SC", Verdana, "Microsoft Yahei", "Hiragino Sans GB", "Microsoft Sans Serif", "WenQuanYi Micro Hei", sans-serif; background-color: rgb(255, 255, 255);\">10 月 22 日,华为开发者大会 2021(Together)在东莞举办,华为常务董事,消费者业务 CEO,智能汽车解决方案 BU CEO 余承东宣布,HarmonyOS 设备数量超 1.5 亿,成为史上发展最快的终端操作系统。</p><p data-type=\"paragraph\" style=\"margin-top: 0px; margin-bottom: 0px; padding: 0px; line-height: 1.875; font-size: 16px; min-height: 30px; white-space: pre-wrap; word-break: break-all; color: rgb(48, 48, 48); font-family: "Helvetica Neue", "PingFang SC", Verdana, "Microsoft Yahei", "Hiragino Sans GB", "Microsoft Sans Serif", "WenQuanYi Micro Hei", sans-serif; background-color: rgb(255, 255, 255);\"><br style=\"margin: 0px; padding: 0px;\"/></p><p data-type=\"paragraph\" style=\"margin-top: 0px; margin-bottom: 0px; padding: 0px; line-height: 1.875; font-size: 16px; min-height: 30px; white-space: pre-wrap; word-break: break-all; color: rgb(48, 48, 48); font-family: "Helvetica Neue", "PingFang SC", Verdana, "Microsoft Yahei", "Hiragino Sans GB", "Microsoft Sans Serif", "WenQuanYi Micro Hei", sans-serif; background-color: rgb(255, 255, 255);\">会上,华为消费者业务软件部总裁龚体正式发布 HarmonyOS 3 开发者预览版,HarmonyOS 3 Beta 预计将在 2022 年第一季度发布。同时,他表示在不久的将来,<span data-type=\"strong\" style=\"margin: 0px; padding: 0px; font-weight: 700;\">将带来为 HarmonyOS 全新研发的编程语言</span>,为鸿蒙生态基础设施补上最后一环。</p><h4 data-id=\"heading0\" data-type=\"heading\" top=\"1055\" style=\"margin: 0px; padding: 26px 0px 4px; font-size: 20px; line-height: 36px; color: rgb(53, 53, 53); white-space: pre-wrap; font-family: "Helvetica Neue", "PingFang SC", Verdana, "Microsoft Yahei", "Hiragino Sans GB", "Microsoft Sans Serif", "WenQuanYi Micro Hei", sans-serif; background-color: rgb(255, 255, 255);\">围绕“弹性部署、超级终端、一次开发多端部署”继续演进</h4><p data-type=\"paragraph\" style=\"margin-top: 0px; margin-bottom: 0px; padding: 0px; line-height: 1.875; font-size: 16px; min-height: 30px; white-space: pre-wrap; word-break: break-all; color: rgb(48, 48, 48); font-family: "Helvetica Neue", "PingFang SC", Verdana, "Microsoft Yahei", "Hiragino Sans GB", "Microsoft Sans Serif", "WenQuanYi Micro Hei", sans-serif; background-color: rgb(255, 255, 255);\"><br style=\"margin: 0px; padding: 0px;\"/></p><p data-type=\"paragraph\" style=\"margin-top: 0px; margin-bottom: 0px; padding: 0px; line-height: 1.875; font-size: 16px; min-height: 30px; white-space: pre-wrap; word-break: break-all; color: rgb(48, 48, 48); font-family: "Helvetica Neue", "PingFang SC", Verdana, "Microsoft Yahei", "Hiragino Sans GB", "Microsoft Sans Serif", "WenQuanYi Micro Hei", sans-serif; background-color: rgb(255, 255, 255);\">据介绍,HarmonyOS 3 开发者预览版,围绕弹性部署、超级终端、一次开发多端部署三个核心价值再创新,系统性能和开发工具全面升级。</p><p data-type=\"paragraph\" style=\"margin-top: 0px; margin-bottom: 0px; padding: 0px; line-height: 1.875; font-size: 16px; min-height: 30px; white-space: pre-wrap; word-break: break-all; color: rgb(48, 48, 48); font-family: "Helvetica Neue", "PingFang SC", Verdana, "Microsoft Yahei", "Hiragino Sans GB", "Microsoft Sans Serif", "WenQuanYi Micro Hei", sans-serif; background-color: rgb(255, 255, 255);\"><br style=\"margin: 0px; padding: 0px;\"/></p><p data-type=\"paragraph\" style=\"margin-top: 0px; margin-bottom: 0px; padding: 0px; line-height: 1.875; font-size: 16px; min-height: 30px; white-space: pre-wrap; word-break: break-all; color: rgb(48, 48, 48); font-family: "Helvetica Neue", "PingFang SC", Verdana, "Microsoft Yahei", "Hiragino Sans GB", "Microsoft Sans Serif", "WenQuanYi Micro Hei", sans-serif; background-color: rgb(255, 255, 255);\">HarmonyOS 的系统架构可以实现弹性部署,让不同内存的智能设备都使用同一语言交流。HarmonyOS 3 开发者预览版带来了全新的可视的弹性部署自动化工具,设备开发者可以根据不同硬件灵活选择操作系统所需组件,让更多的设备能够更简单地搭载 HarmonyOS。据悉,<span data-type=\"strong\" style=\"margin: 0px; padding: 0px; font-weight: 700;\">弹性部署自动化工具未来也会开源,以让更多的设备用得到这个工具。</span></p><p data-type=\"paragraph\" style=\"margin-top: 0px; margin-bottom: 0px; padding: 0px; line-height: 1.875; font-size: 16px; min-height: 30px; white-space: pre-wrap; word-break: break-all; color: rgb(48, 48, 48); font-family: "Helvetica Neue", "PingFang SC", Verdana, "Microsoft Yahei", "Hiragino Sans GB", "Microsoft Sans Serif", "WenQuanYi Micro Hei", sans-serif; background-color: rgb(255, 255, 255);\"><br style=\"margin: 0px; padding: 0px;\"/></p><p data-type=\"paragraph\" style=\"margin-top: 0px; margin-bottom: 0px; padding: 0px; line-height: 1.875; font-size: 16px; min-height: 30px; white-space: pre-wrap; word-break: break-all; color: rgb(48, 48, 48); font-family: "Helvetica Neue", "PingFang SC", Verdana, "Microsoft Yahei", "Hiragino Sans GB", "Microsoft Sans Serif", "WenQuanYi Micro Hei", sans-serif; background-color: rgb(255, 255, 255);\">分布式技术一直是 HarmonyOS 的能力核心,能够让多个设备自由组合,在系统层融合成一个超级终端。每个设备都能成为互相的功能模块,实现能力互助,资源共享。本次发布的 HarmonyOS 3 开发者预览版带来创新的异构组网技术,让分布式能力支撑更多设备、更佳性能,打造更坚固的超级终端底座。比如,手机、智慧屏、4 台音箱可以组合成 6 个设备的超级终端,让手机视频也可以享受超大屏幕和 5.1 声道影院级体验;手机、平板、PC 组合带来升级版多屏协同,三屏协作提升办公效率。</p><p data-type=\"paragraph\" style=\"margin-top: 0px; margin-bottom: 0px; padding: 0px; line-height: 1.875; font-size: 16px; min-height: 30px; white-space: pre-wrap; word-break: break-all; color: rgb(48, 48, 48); font-family: "Helvetica Neue", "PingFang SC", Verdana, "Microsoft Yahei", "Hiragino Sans GB", "Microsoft Sans Serif", "WenQuanYi Micro Hei", sans-serif; background-color: rgb(255, 255, 255);\"><br style=\"margin: 0px; padding: 0px;\"/></p><p data-type=\"paragraph\" style=\"margin-top: 0px; margin-bottom: 0px; padding: 0px; line-height: 1.875; font-size: 16px; min-height: 30px; white-space: pre-wrap; word-break: break-all; color: rgb(48, 48, 48); font-family: "Helvetica Neue", "PingFang SC", Verdana, "Microsoft Yahei", "Hiragino Sans GB", "Microsoft Sans Serif", "WenQuanYi Micro Hei", sans-serif; background-color: rgb(255, 255, 255);\">随着全新的 HarmonyOS 3 开发者预览版发布,HarmonyOS 应用与服务开发工具套件全家桶也全面升级,端到端帮助开发者高效率、低成本地完成跨端应用与服务的开发。</p><p data-type=\"paragraph\" style=\"margin-top: 0px; margin-bottom: 0px; padding: 0px; line-height: 1.875; font-size: 16px; min-height: 30px; white-space: pre-wrap; word-break: break-all; color: rgb(48, 48, 48); font-family: "Helvetica Neue", "PingFang SC", Verdana, "Microsoft Yahei", "Hiragino Sans GB", "Microsoft Sans Serif", "WenQuanYi Micro Hei", sans-serif; background-color: rgb(255, 255, 255);\"><br style=\"margin: 0px; padding: 0px;\"/></p><p data-type=\"paragraph\" style=\"margin-top: 0px; margin-bottom: 0px; padding: 0px; line-height: 1.875; font-size: 16px; min-height: 30px; white-space: pre-wrap; word-break: break-all; color: rgb(48, 48, 48); font-family: "Helvetica Neue", "PingFang SC", Verdana, "Microsoft Yahei", "Hiragino Sans GB", "Microsoft Sans Serif", "WenQuanYi Micro Hei", sans-serif; background-color: rgb(255, 255, 255);\">其中,Harmony 设计系统(Harmony Design System)提供完整面向多端设备的设计规范、原子化自适应布局能力插件、支持不同设备的服务卡片模板等设计工具,让不同设备达到一致的视觉体验的同时保持整体设计语言的一致性。</p><p data-type=\"paragraph\" style=\"margin-top: 0px; margin-bottom: 0px; padding: 0px; line-height: 1.875; font-size: 16px; min-height: 30px; white-space: pre-wrap; word-break: break-all; color: rgb(48, 48, 48); font-family: "Helvetica Neue", "PingFang SC", Verdana, "Microsoft Yahei", "Hiragino Sans GB", "Microsoft Sans Serif", "WenQuanYi Micro Hei", sans-serif; background-color: rgb(255, 255, 255);\"><br style=\"margin: 0px; padding: 0px;\"/></p><p><img src=\"https://static001.infoq.cn/resource/image/98/0a/98078f10b3cc12be36fe008b5ec10e0a.jpg\" style=\"margin: 0px; padding: 0px; border: 0px; vertical-align: top; max-width: 100%; height: auto;\"/></p><p data-type=\"paragraph\" style=\"margin-top: 0px; margin-bottom: 0px; padding: 0px; line-height: 1.875; font-size: 16px; min-height: 30px; white-space: pre-wrap; word-break: break-all; color: rgb(48, 48, 48); font-family: "Helvetica Neue", "PingFang SC", Verdana, "Microsoft Yahei", "Hiragino Sans GB", "Microsoft Sans Serif", "WenQuanYi Micro Hei", sans-serif; background-color: rgb(255, 255, 255);\"><br style=\"margin: 0px; padding: 0px;\"/></p><p data-type=\"paragraph\" style=\"margin-top: 0px; margin-bottom: 0px; padding: 0px; line-height: 1.875; font-size: 16px; min-height: 30px; white-space: pre-wrap; word-break: break-all; color: rgb(48, 48, 48); font-family: "Helvetica Neue", "PingFang SC", Verdana, "Microsoft Yahei", "Hiragino Sans GB", "Microsoft Sans Serif", "WenQuanYi Micro Hei", sans-serif; background-color: rgb(255, 255, 255);\">方舟开发框架 3.0(ArkUI 3.0)带来全新声明式 UI 框架,使用 TS/JS 语言,减少跨端应用前端开发设计代码量,效率、性能均大幅度提升;方舟编译器 3.0(ArkCompiler 3.0)实现跨设备统一编译,只需一次编译即可跨端运行;DevEco Studio 3.0 带来高效率编码、跨端协同调测、多设备集成测试等工具升级,有效提升跨端应用开发效率;HarmonyOS SDK 开放 6000+ TS/JS API 能力,支持跨端分布式体验高效开发。龚体举例道,一次开发、多端部署的能力帮助新浪新闻、Wish 107.5 等全球多个头部应用快速覆盖多设备。</p><p data-type=\"paragraph\" style=\"margin-top: 0px; margin-bottom: 0px; padding: 0px; line-height: 1.875; font-size: 16px; min-height: 30px; white-space: pre-wrap; word-break: break-all; color: rgb(48, 48, 48); font-family: "Helvetica Neue", "PingFang SC", Verdana, "Microsoft Yahei", "Hiragino Sans GB", "Microsoft Sans Serif", "WenQuanYi Micro Hei", sans-serif; background-color: rgb(255, 255, 255);\"><br style=\"margin: 0px; padding: 0px;\"/></p><h4 data-id=\"heading1\" data-type=\"heading\" top=\"2040\" style=\"margin: 0px; padding: 26px 0px 4px; font-size: 20px; line-height: 36px; color: rgb(53, 53, 53); white-space: pre-wrap; font-family: "Helvetica Neue", "PingFang SC", Verdana, "Microsoft Yahei", "Hiragino Sans GB", "Microsoft Sans Serif", "WenQuanYi Micro Hei", sans-serif; background-color: rgb(255, 255, 255);\">通过 AI 技术实现新的智慧交互体验</h4><p data-type=\"paragraph\" style=\"margin-top: 0px; margin-bottom: 0px; padding: 0px; line-height: 1.875; font-size: 16px; min-height: 30px; white-space: pre-wrap; word-break: break-all; color: rgb(48, 48, 48); font-family: "Helvetica Neue", "PingFang SC", Verdana, "Microsoft Yahei", "Hiragino Sans GB", "Microsoft Sans Serif", "WenQuanYi Micro Hei", sans-serif; background-color: rgb(255, 255, 255);\"><br style=\"margin: 0px; padding: 0px;\"/></p><p data-type=\"paragraph\" style=\"margin-top: 0px; margin-bottom: 0px; padding: 0px; line-height: 1.875; font-size: 16px; min-height: 30px; white-space: pre-wrap; word-break: break-all; color: rgb(48, 48, 48); font-family: "Helvetica Neue", "PingFang SC", Verdana, "Microsoft Yahei", "Hiragino Sans GB", "Microsoft Sans Serif", "WenQuanYi Micro Hei", sans-serif; background-color: rgb(255, 255, 255);\">在即将到来的万物智联时代,更需要新的智慧交互体验。华为消费者业务 AI 与智慧全场景业务部总裁王成录表示。“华为用业界领先的 AI 技术赋能万物智联新时代,让设备、服务、交互三者进行有机地协同组合,给合作伙伴、开发者带来的全新想象空间,为消费者打造全场景智慧生活体验。”</p><p data-type=\"paragraph\" style=\"margin-top: 0px; margin-bottom: 0px; padding: 0px; line-height: 1.875; font-size: 16px; min-height: 30px; white-space: pre-wrap; word-break: break-all; color: rgb(48, 48, 48); font-family: "Helvetica Neue", "PingFang SC", Verdana, "Microsoft Yahei", "Hiragino Sans GB", "Microsoft Sans Serif", "WenQuanYi Micro Hei", sans-serif; background-color: rgb(255, 255, 255);\"><br style=\"margin: 0px; padding: 0px;\"/></p><p data-type=\"paragraph\" style=\"margin-top: 0px; margin-bottom: 0px; padding: 0px; line-height: 1.875; font-size: 16px; min-height: 30px; white-space: pre-wrap; word-break: break-all; color: rgb(48, 48, 48); font-family: "Helvetica Neue", "PingFang SC", Verdana, "Microsoft Yahei", "Hiragino Sans GB", "Microsoft Sans Serif", "WenQuanYi Micro Hei", sans-serif; background-color: rgb(255, 255, 255);\">面向鸿蒙生态的设备和应用服务开发者,华为提供了能让开发者快速、高效、低成本地开发具有智慧 AI 能力的硬件设备及原子化服务。</p><p data-type=\"paragraph\" style=\"margin-top: 0px; margin-bottom: 0px; padding: 0px; line-height: 1.875; font-size: 16px; min-height: 30px; white-space: pre-wrap; word-break: break-all; color: rgb(48, 48, 48); font-family: "Helvetica Neue", "PingFang SC", Verdana, "Microsoft Yahei", "Hiragino Sans GB", "Microsoft Sans Serif", "WenQuanYi Micro Hei", sans-serif; background-color: rgb(255, 255, 255);\"><br style=\"margin: 0px; padding: 0px;\"/></p><p><img src=\"https://static001.infoq.cn/resource/image/d1/39/d1917aaced015010c6c131be84806639.jpg\" style=\"margin: 0px; padding: 0px; border: 0px; vertical-align: top; max-width: 100%; height: auto;\"/></p><p data-type=\"paragraph\" style=\"margin-top: 0px; margin-bottom: 0px; padding: 0px; line-height: 1.875; font-size: 16px; min-height: 30px; white-space: pre-wrap; word-break: break-all; color: rgb(48, 48, 48); font-family: "Helvetica Neue", "PingFang SC", Verdana, "Microsoft Yahei", "Hiragino Sans GB", "Microsoft Sans Serif", "WenQuanYi Micro Hei", sans-serif; background-color: rgb(255, 255, 255);\"><br style=\"margin: 0px; padding: 0px;\"/></p><p data-type=\"paragraph\" style=\"margin-top: 0px; margin-bottom: 0px; padding: 0px; line-height: 1.875; font-size: 16px; min-height: 30px; white-space: pre-wrap; word-break: break-all; color: rgb(48, 48, 48); font-family: "Helvetica Neue", "PingFang SC", Verdana, "Microsoft Yahei", "Hiragino Sans GB", "Microsoft Sans Serif", "WenQuanYi Micro Hei", sans-serif; background-color: rgb(255, 255, 255);\">全新的鸿蒙智联(HarmonyOS Connect)软件服务包 3.0 新增支持垂类应用的带屏设备,并升级了基础服务包、增强服务包以及支持小艺、服务中心、畅连等应用在内的应用服务包,开发者直接调用即可快速开发出具备智慧 AI 能力的设备,预计到 2022 年将全面适配支持丰富应用的带屏设备。</p><p data-type=\"paragraph\" style=\"margin-top: 0px; margin-bottom: 0px; padding: 0px; line-height: 1.875; font-size: 16px; min-height: 30px; white-space: pre-wrap; word-break: break-all; color: rgb(48, 48, 48); font-family: "Helvetica Neue", "PingFang SC", Verdana, "Microsoft Yahei", "Hiragino Sans GB", "Microsoft Sans Serif", "WenQuanYi Micro Hei", sans-serif; background-color: rgb(255, 255, 255);\"><br style=\"margin: 0px; padding: 0px;\"/></p><p data-type=\"paragraph\" style=\"margin-top: 0px; margin-bottom: 0px; padding: 0px; line-height: 1.875; font-size: 16px; min-height: 30px; white-space: pre-wrap; word-break: break-all; color: rgb(48, 48, 48); font-family: "Helvetica Neue", "PingFang SC", Verdana, "Microsoft Yahei", "Hiragino Sans GB", "Microsoft Sans Serif", "WenQuanYi Micro Hei", sans-serif; background-color: rgb(255, 255, 255);\">一站式集成开放环境支持远程开发、按需定制、一键编译和烧录、一键集成服务包和设备仿真器,降低了开发者的接入门槛和开发周期,让开发效率倍增,无屏设备开发周期已由 2 个月减少至 2 周,带屏设备预计 2023 年将缩减到 2 个月以内。</p><p data-type=\"paragraph\" style=\"margin-top: 0px; margin-bottom: 0px; padding: 0px; line-height: 1.875; font-size: 16px; min-height: 30px; white-space: pre-wrap; word-break: break-all; color: rgb(48, 48, 48); font-family: "Helvetica Neue", "PingFang SC", Verdana, "Microsoft Yahei", "Hiragino Sans GB", "Microsoft Sans Serif", "WenQuanYi Micro Hei", sans-serif; background-color: rgb(255, 255, 255);\"><br style=\"margin: 0px; padding: 0px;\"/></p><p data-type=\"paragraph\" style=\"margin-top: 0px; margin-bottom: 0px; padding: 0px; line-height: 1.875; font-size: 16px; min-height: 30px; white-space: pre-wrap; word-break: break-all; color: rgb(48, 48, 48); font-family: "Helvetica Neue", "PingFang SC", Verdana, "Microsoft Yahei", "Hiragino Sans GB", "Microsoft Sans Serif", "WenQuanYi Micro Hei", sans-serif; background-color: rgb(255, 255, 255);\">对于应用与服务开发者,一站式集成开发的应用开发工具提供了超过 50 个原子化服务和卡片模板,支持多端双向预览、低代码开发、分布式模拟仿真以及分布式调测等。目前原子化服务开发效率已由 1 个月缩减至 15 天,预计 2023 年 5 天即可完成开发。</p><p data-type=\"paragraph\" style=\"margin-top: 0px; margin-bottom: 0px; padding: 0px; line-height: 1.875; font-size: 16px; min-height: 30px; white-space: pre-wrap; word-break: break-all; color: rgb(48, 48, 48); font-family: "Helvetica Neue", "PingFang SC", Verdana, "Microsoft Yahei", "Hiragino Sans GB", "Microsoft Sans Serif", "WenQuanYi Micro Hei", sans-serif; background-color: rgb(255, 255, 255);\"><br style=\"margin: 0px; padding: 0px;\"/></p><p data-type=\"paragraph\" style=\"margin-top: 0px; margin-bottom: 0px; padding: 0px; line-height: 1.875; font-size: 16px; min-height: 30px; white-space: pre-wrap; word-break: break-all; color: rgb(48, 48, 48); font-family: "Helvetica Neue", "PingFang SC", Verdana, "Microsoft Yahei", "Hiragino Sans GB", "Microsoft Sans Serif", "WenQuanYi Micro Hei", sans-serif; background-color: rgb(255, 255, 255);\">王成录表示,欢迎更多合作伙伴和开发者加入鸿蒙生态,持续添砖加瓦,开启万物智联的新时代。</p><p><br/></p>', 'HarmonyOS', '0', '0', '1', '2021-10-24 12:20:55', '2021-10-24 12:20:55', '7', '1', '', '');
INSERT INTO `tb_post` VALUES ('19', '1', '华为发布 HarmonyOS 3 开发者预览版,将推出为 HarmonyOS 全新研发的编程语言', 'https://www.infoq.cn/news/8r3lsBU3yU1mQOdoZti6', '<p data-type=\"paragraph\" style=\"margin-top: 0px; margin-bottom: 0px; padding: 0px; line-height: 1.875; font-size: 16px; min-height: 30px; white-space: pre-wrap; word-break: break-all; color: rgb(48, 48, 48); font-family: "Helvetica Neue", "PingFang SC", Verdana, "Microsoft Yahei", "Hiragino Sans GB", "Microsoft Sans Serif", "WenQuanYi Micro Hei", sans-serif; background-color: rgb(255, 255, 255);\">10 月 22 日,华为开发者大会 2021(Together)在东莞举办,华为常务董事,消费者业务 CEO,智能汽车解决方案 BU CEO 余承东宣布,HarmonyOS 设备数量超 1.5 亿,成为史上发展最快的终端操作系统。</p><p data-type=\"paragraph\" style=\"margin-top: 0px; margin-bottom: 0px; padding: 0px; line-height: 1.875; font-size: 16px; min-height: 30px; white-space: pre-wrap; word-break: break-all; color: rgb(48, 48, 48); font-family: "Helvetica Neue", "PingFang SC", Verdana, "Microsoft Yahei", "Hiragino Sans GB", "Microsoft Sans Serif", "WenQuanYi Micro Hei", sans-serif; background-color: rgb(255, 255, 255);\"><br style=\"margin: 0px; padding: 0px;\"/></p><p data-type=\"paragraph\" style=\"margin-top: 0px; margin-bottom: 0px; padding: 0px; line-height: 1.875; font-size: 16px; min-height: 30px; white-space: pre-wrap; word-break: break-all; color: rgb(48, 48, 48); font-family: "Helvetica Neue", "PingFang SC", Verdana, "Microsoft Yahei", "Hiragino Sans GB", "Microsoft Sans Serif", "WenQuanYi Micro Hei", sans-serif; background-color: rgb(255, 255, 255);\">会上,华为消费者业务软件部总裁龚体正式发布 HarmonyOS 3 开发者预览版,HarmonyOS 3 Beta 预计将在 2022 年第一季度发布。同时,他表示在不久的将来,<span data-type=\"strong\" style=\"margin: 0px; padding: 0px; font-weight: 700;\">将带来为 HarmonyOS 全新研发的编程语言</span>,为鸿蒙生态基础设施补上最后一环。</p><h4 data-id=\"heading0\" data-type=\"heading\" top=\"1055\" style=\"margin: 0px; padding: 26px 0px 4px; font-size: 20px; line-height: 36px; color: rgb(53, 53, 53); white-space: pre-wrap; font-family: "Helvetica Neue", "PingFang SC", Verdana, "Microsoft Yahei", "Hiragino Sans GB", "Microsoft Sans Serif", "WenQuanYi Micro Hei", sans-serif; background-color: rgb(255, 255, 255);\">围绕“弹性部署、超级终端、一次开发多端部署”继续演进</h4><p data-type=\"paragraph\" style=\"margin-top: 0px; margin-bottom: 0px; padding: 0px; line-height: 1.875; font-size: 16px; min-height: 30px; white-space: pre-wrap; word-break: break-all; color: rgb(48, 48, 48); font-family: "Helvetica Neue", "PingFang SC", Verdana, "Microsoft Yahei", "Hiragino Sans GB", "Microsoft Sans Serif", "WenQuanYi Micro Hei", sans-serif; background-color: rgb(255, 255, 255);\"><br style=\"margin: 0px; padding: 0px;\"/></p><p data-type=\"paragraph\" style=\"margin-top: 0px; margin-bottom: 0px; padding: 0px; line-height: 1.875; font-size: 16px; min-height: 30px; white-space: pre-wrap; word-break: break-all; color: rgb(48, 48, 48); font-family: "Helvetica Neue", "PingFang SC", Verdana, "Microsoft Yahei", "Hiragino Sans GB", "Microsoft Sans Serif", "WenQuanYi Micro Hei", sans-serif; background-color: rgb(255, 255, 255);\">据介绍,HarmonyOS 3 开发者预览版,围绕弹性部署、超级终端、一次开发多端部署三个核心价值再创新,系统性能和开发工具全面升级。</p><p data-type=\"paragraph\" style=\"margin-top: 0px; margin-bottom: 0px; padding: 0px; line-height: 1.875; font-size: 16px; min-height: 30px; white-space: pre-wrap; word-break: break-all; color: rgb(48, 48, 48); font-family: "Helvetica Neue", "PingFang SC", Verdana, "Microsoft Yahei", "Hiragino Sans GB", "Microsoft Sans Serif", "WenQuanYi Micro Hei", sans-serif; background-color: rgb(255, 255, 255);\"><br style=\"margin: 0px; padding: 0px;\"/></p><p data-type=\"paragraph\" style=\"margin-top: 0px; margin-bottom: 0px; padding: 0px; line-height: 1.875; font-size: 16px; min-height: 30px; white-space: pre-wrap; word-break: break-all; color: rgb(48, 48, 48); font-family: "Helvetica Neue", "PingFang SC", Verdana, "Microsoft Yahei", "Hiragino Sans GB", "Microsoft Sans Serif", "WenQuanYi Micro Hei", sans-serif; background-color: rgb(255, 255, 255);\">HarmonyOS 的系统架构可以实现弹性部署,让不同内存的智能设备都使用同一语言交流。HarmonyOS 3 开发者预览版带来了全新的可视的弹性部署自动化工具,设备开发者可以根据不同硬件灵活选择操作系统所需组件,让更多的设备能够更简单地搭载 HarmonyOS。据悉,<span data-type=\"strong\" style=\"margin: 0px; padding: 0px; font-weight: 700;\">弹性部署自动化工具未来也会开源,以让更多的设备用得到这个工具。</span></p><p data-type=\"paragraph\" style=\"margin-top: 0px; margin-bottom: 0px; padding: 0px; line-height: 1.875; font-size: 16px; min-height: 30px; white-space: pre-wrap; word-break: break-all; color: rgb(48, 48, 48); font-family: "Helvetica Neue", "PingFang SC", Verdana, "Microsoft Yahei", "Hiragino Sans GB", "Microsoft Sans Serif", "WenQuanYi Micro Hei", sans-serif; background-color: rgb(255, 255, 255);\"><br style=\"margin: 0px; padding: 0px;\"/></p><p data-type=\"paragraph\" style=\"margin-top: 0px; margin-bottom: 0px; padding: 0px; line-height: 1.875; font-size: 16px; min-height: 30px; white-space: pre-wrap; word-break: break-all; color: rgb(48, 48, 48); font-family: "Helvetica Neue", "PingFang SC", Verdana, "Microsoft Yahei", "Hiragino Sans GB", "Microsoft Sans Serif", "WenQuanYi Micro Hei", sans-serif; background-color: rgb(255, 255, 255);\">分布式技术一直是 HarmonyOS 的能力核心,能够让多个设备自由组合,在系统层融合成一个超级终端。每个设备都能成为互相的功能模块,实现能力互助,资源共享。本次发布的 HarmonyOS 3 开发者预览版带来创新的异构组网技术,让分布式能力支撑更多设备、更佳性能,打造更坚固的超级终端底座。比如,手机、智慧屏、4 台音箱可以组合成 6 个设备的超级终端,让手机视频也可以享受超大屏幕和 5.1 声道影院级体验;手机、平板、PC 组合带来升级版多屏协同,三屏协作提升办公效率。</p><p data-type=\"paragraph\" style=\"margin-top: 0px; margin-bottom: 0px; padding: 0px; line-height: 1.875; font-size: 16px; min-height: 30px; white-space: pre-wrap; word-break: break-all; color: rgb(48, 48, 48); font-family: "Helvetica Neue", "PingFang SC", Verdana, "Microsoft Yahei", "Hiragino Sans GB", "Microsoft Sans Serif", "WenQuanYi Micro Hei", sans-serif; background-color: rgb(255, 255, 255);\"><br style=\"margin: 0px; padding: 0px;\"/></p><p data-type=\"paragraph\" style=\"margin-top: 0px; margin-bottom: 0px; padding: 0px; line-height: 1.875; font-size: 16px; min-height: 30px; white-space: pre-wrap; word-break: break-all; color: rgb(48, 48, 48); font-family: "Helvetica Neue", "PingFang SC", Verdana, "Microsoft Yahei", "Hiragino Sans GB", "Microsoft Sans Serif", "WenQuanYi Micro Hei", sans-serif; background-color: rgb(255, 255, 255);\">随着全新的 HarmonyOS 3 开发者预览版发布,HarmonyOS 应用与服务开发工具套件全家桶也全面升级,端到端帮助开发者高效率、低成本地完成跨端应用与服务的开发。</p><p data-type=\"paragraph\" style=\"margin-top: 0px; margin-bottom: 0px; padding: 0px; line-height: 1.875; font-size: 16px; min-height: 30px; white-space: pre-wrap; word-break: break-all; color: rgb(48, 48, 48); font-family: "Helvetica Neue", "PingFang SC", Verdana, "Microsoft Yahei", "Hiragino Sans GB", "Microsoft Sans Serif", "WenQuanYi Micro Hei", sans-serif; background-color: rgb(255, 255, 255);\"><br style=\"margin: 0px; padding: 0px;\"/></p><p data-type=\"paragraph\" style=\"margin-top: 0px; margin-bottom: 0px; padding: 0px; line-height: 1.875; font-size: 16px; min-height: 30px; white-space: pre-wrap; word-break: break-all; color: rgb(48, 48, 48); font-family: "Helvetica Neue", "PingFang SC", Verdana, "Microsoft Yahei", "Hiragino Sans GB", "Microsoft Sans Serif", "WenQuanYi Micro Hei", sans-serif; background-color: rgb(255, 255, 255);\">其中,Harmony 设计系统(Harmony Design System)提供完整面向多端设备的设计规范、原子化自适应布局能力插件、支持不同设备的服务卡片模板等设计工具,让不同设备达到一致的视觉体验的同时保持整体设计语言的一致性。</p><p data-type=\"paragraph\" style=\"margin-top: 0px; margin-bottom: 0px; padding: 0px; line-height: 1.875; font-size: 16px; min-height: 30px; white-space: pre-wrap; word-break: break-all; color: rgb(48, 48, 48); font-family: "Helvetica Neue", "PingFang SC", Verdana, "Microsoft Yahei", "Hiragino Sans GB", "Microsoft Sans Serif", "WenQuanYi Micro Hei", sans-serif; background-color: rgb(255, 255, 255);\"><br style=\"margin: 0px; padding: 0px;\"/></p><p><img src=\"https://static001.infoq.cn/resource/image/98/0a/98078f10b3cc12be36fe008b5ec10e0a.jpg\" style=\"margin: 0px; padding: 0px; border: 0px; vertical-align: top; max-width: 100%; height: auto;\"/></p><p data-type=\"paragraph\" style=\"margin-top: 0px; margin-bottom: 0px; padding: 0px; line-height: 1.875; font-size: 16px; min-height: 30px; white-space: pre-wrap; word-break: break-all; color: rgb(48, 48, 48); font-family: "Helvetica Neue", "PingFang SC", Verdana, "Microsoft Yahei", "Hiragino Sans GB", "Microsoft Sans Serif", "WenQuanYi Micro Hei", sans-serif; background-color: rgb(255, 255, 255);\"><br style=\"margin: 0px; padding: 0px;\"/></p><p data-type=\"paragraph\" style=\"margin-top: 0px; margin-bottom: 0px; padding: 0px; line-height: 1.875; font-size: 16px; min-height: 30px; white-space: pre-wrap; word-break: break-all; color: rgb(48, 48, 48); font-family: "Helvetica Neue", "PingFang SC", Verdana, "Microsoft Yahei", "Hiragino Sans GB", "Microsoft Sans Serif", "WenQuanYi Micro Hei", sans-serif; background-color: rgb(255, 255, 255);\">方舟开发框架 3.0(ArkUI 3.0)带来全新声明式 UI 框架,使用 TS/JS 语言,减少跨端应用前端开发设计代码量,效率、性能均大幅度提升;方舟编译器 3.0(ArkCompiler 3.0)实现跨设备统一编译,只需一次编译即可跨端运行;DevEco Studio 3.0 带来高效率编码、跨端协同调测、多设备集成测试等工具升级,有效提升跨端应用开发效率;HarmonyOS SDK 开放 6000+ TS/JS API 能力,支持跨端分布式体验高效开发。龚体举例道,一次开发、多端部署的能力帮助新浪新闻、Wish 107.5 等全球多个头部应用快速覆盖多设备。</p><p data-type=\"paragraph\" style=\"margin-top: 0px; margin-bottom: 0px; padding: 0px; line-height: 1.875; font-size: 16px; min-height: 30px; white-space: pre-wrap; word-break: break-all; color: rgb(48, 48, 48); font-family: "Helvetica Neue", "PingFang SC", Verdana, "Microsoft Yahei", "Hiragino Sans GB", "Microsoft Sans Serif", "WenQuanYi Micro Hei", sans-serif; background-color: rgb(255, 255, 255);\"><br style=\"margin: 0px; padding: 0px;\"/></p><h4 data-id=\"heading1\" data-type=\"heading\" top=\"2040\" style=\"margin: 0px; padding: 26px 0px 4px; font-size: 20px; line-height: 36px; color: rgb(53, 53, 53); white-space: pre-wrap; font-family: "Helvetica Neue", "PingFang SC", Verdana, "Microsoft Yahei", "Hiragino Sans GB", "Microsoft Sans Serif", "WenQuanYi Micro Hei", sans-serif; background-color: rgb(255, 255, 255);\">通过 AI 技术实现新的智慧交互体验</h4><p data-type=\"paragraph\" style=\"margin-top: 0px; margin-bottom: 0px; padding: 0px; line-height: 1.875; font-size: 16px; min-height: 30px; white-space: pre-wrap; word-break: break-all; color: rgb(48, 48, 48); font-family: "Helvetica Neue", "PingFang SC", Verdana, "Microsoft Yahei", "Hiragino Sans GB", "Microsoft Sans Serif", "WenQuanYi Micro Hei", sans-serif; background-color: rgb(255, 255, 255);\"><br style=\"margin: 0px; padding: 0px;\"/></p><p data-type=\"paragraph\" style=\"margin-top: 0px; margin-bottom: 0px; padding: 0px; line-height: 1.875; font-size: 16px; min-height: 30px; white-space: pre-wrap; word-break: break-all; color: rgb(48, 48, 48); font-family: "Helvetica Neue", "PingFang SC", Verdana, "Microsoft Yahei", "Hiragino Sans GB", "Microsoft Sans Serif", "WenQuanYi Micro Hei", sans-serif; background-color: rgb(255, 255, 255);\">在即将到来的万物智联时代,更需要新的智慧交互体验。华为消费者业务 AI 与智慧全场景业务部总裁王成录表示。“华为用业界领先的 AI 技术赋能万物智联新时代,让设备、服务、交互三者进行有机地协同组合,给合作伙伴、开发者带来的全新想象空间,为消费者打造全场景智慧生活体验。”</p><p data-type=\"paragraph\" style=\"margin-top: 0px; margin-bottom: 0px; padding: 0px; line-height: 1.875; font-size: 16px; min-height: 30px; white-space: pre-wrap; word-break: break-all; color: rgb(48, 48, 48); font-family: "Helvetica Neue", "PingFang SC", Verdana, "Microsoft Yahei", "Hiragino Sans GB", "Microsoft Sans Serif", "WenQuanYi Micro Hei", sans-serif; background-color: rgb(255, 255, 255);\"><br style=\"margin: 0px; padding: 0px;\"/></p><p data-type=\"paragraph\" style=\"margin-top: 0px; margin-bottom: 0px; padding: 0px; line-height: 1.875; font-size: 16px; min-height: 30px; white-space: pre-wrap; word-break: break-all; color: rgb(48, 48, 48); font-family: "Helvetica Neue", "PingFang SC", Verdana, "Microsoft Yahei", "Hiragino Sans GB", "Microsoft Sans Serif", "WenQuanYi Micro Hei", sans-serif; background-color: rgb(255, 255, 255);\">面向鸿蒙生态的设备和应用服务开发者,华为提供了能让开发者快速、高效、低成本地开发具有智慧 AI 能力的硬件设备及原子化服务。</p><p data-type=\"paragraph\" style=\"margin-top: 0px; margin-bottom: 0px; padding: 0px; line-height: 1.875; font-size: 16px; min-height: 30px; white-space: pre-wrap; word-break: break-all; color: rgb(48, 48, 48); font-family: "Helvetica Neue", "PingFang SC", Verdana, "Microsoft Yahei", "Hiragino Sans GB", "Microsoft Sans Serif", "WenQuanYi Micro Hei", sans-serif; background-color: rgb(255, 255, 255);\"><br style=\"margin: 0px; padding: 0px;\"/></p><p><img src=\"https://static001.infoq.cn/resource/image/d1/39/d1917aaced015010c6c131be84806639.jpg\" style=\"margin: 0px; padding: 0px; border: 0px; vertical-align: top; max-width: 100%; height: auto;\"/></p><p data-type=\"paragraph\" style=\"margin-top: 0px; margin-bottom: 0px; padding: 0px; line-height: 1.875; font-size: 16px; min-height: 30px; white-space: pre-wrap; word-break: break-all; color: rgb(48, 48, 48); font-family: "Helvetica Neue", "PingFang SC", Verdana, "Microsoft Yahei", "Hiragino Sans GB", "Microsoft Sans Serif", "WenQuanYi Micro Hei", sans-serif; background-color: rgb(255, 255, 255);\"><br style=\"margin: 0px; padding: 0px;\"/></p><p data-type=\"paragraph\" style=\"margin-top: 0px; margin-bottom: 0px; padding: 0px; line-height: 1.875; font-size: 16px; min-height: 30px; white-space: pre-wrap; word-break: break-all; color: rgb(48, 48, 48); font-family: "Helvetica Neue", "PingFang SC", Verdana, "Microsoft Yahei", "Hiragino Sans GB", "Microsoft Sans Serif", "WenQuanYi Micro Hei", sans-serif; background-color: rgb(255, 255, 255);\">全新的鸿蒙智联(HarmonyOS Connect)软件服务包 3.0 新增支持垂类应用的带屏设备,并升级了基础服务包、增强服务包以及支持小艺、服务中心、畅连等应用在内的应用服务包,开发者直接调用即可快速开发出具备智慧 AI 能力的设备,预计到 2022 年将全面适配支持丰富应用的带屏设备。</p><p data-type=\"paragraph\" style=\"margin-top: 0px; margin-bottom: 0px; padding: 0px; line-height: 1.875; font-size: 16px; min-height: 30px; white-space: pre-wrap; word-break: break-all; color: rgb(48, 48, 48); font-family: "Helvetica Neue", "PingFang SC", Verdana, "Microsoft Yahei", "Hiragino Sans GB", "Microsoft Sans Serif", "WenQuanYi Micro Hei", sans-serif; background-color: rgb(255, 255, 255);\"><br style=\"margin: 0px; padding: 0px;\"/></p><p data-type=\"paragraph\" style=\"margin-top: 0px; margin-bottom: 0px; padding: 0px; line-height: 1.875; font-size: 16px; min-height: 30px; white-space: pre-wrap; word-break: break-all; color: rgb(48, 48, 48); font-family: "Helvetica Neue", "PingFang SC", Verdana, "Microsoft Yahei", "Hiragino Sans GB", "Microsoft Sans Serif", "WenQuanYi Micro Hei", sans-serif; background-color: rgb(255, 255, 255);\">一站式集成开放环境支持远程开发、按需定制、一键编译和烧录、一键集成服务包和设备仿真器,降低了开发者的接入门槛和开发周期,让开发效率倍增,无屏设备开发周期已由 2 个月减少至 2 周,带屏设备预计 2023 年将缩减到 2 个月以内。</p><p data-type=\"paragraph\" style=\"margin-top: 0px; margin-bottom: 0px; padding: 0px; line-height: 1.875; font-size: 16px; min-height: 30px; white-space: pre-wrap; word-break: break-all; color: rgb(48, 48, 48); font-family: "Helvetica Neue", "PingFang SC", Verdana, "Microsoft Yahei", "Hiragino Sans GB", "Microsoft Sans Serif", "WenQuanYi Micro Hei", sans-serif; background-color: rgb(255, 255, 255);\"><br style=\"margin: 0px; padding: 0px;\"/></p><p data-type=\"paragraph\" style=\"margin-top: 0px; margin-bottom: 0px; padding: 0px; line-height: 1.875; font-size: 16px; min-height: 30px; white-space: pre-wrap; word-break: break-all; color: rgb(48, 48, 48); font-family: "Helvetica Neue", "PingFang SC", Verdana, "Microsoft Yahei", "Hiragino Sans GB", "Microsoft Sans Serif", "WenQuanYi Micro Hei", sans-serif; background-color: rgb(255, 255, 255);\">对于应用与服务开发者,一站式集成开发的应用开发工具提供了超过 50 个原子化服务和卡片模板,支持多端双向预览、低代码开发、分布式模拟仿真以及分布式调测等。目前原子化服务开发效率已由 1 个月缩减至 15 天,预计 2023 年 5 天即可完成开发。</p><p data-type=\"paragraph\" style=\"margin-top: 0px; margin-bottom: 0px; padding: 0px; line-height: 1.875; font-size: 16px; min-height: 30px; white-space: pre-wrap; word-break: break-all; color: rgb(48, 48, 48); font-family: "Helvetica Neue", "PingFang SC", Verdana, "Microsoft Yahei", "Hiragino Sans GB", "Microsoft Sans Serif", "WenQuanYi Micro Hei", sans-serif; background-color: rgb(255, 255, 255);\"><br style=\"margin: 0px; padding: 0px;\"/></p><p data-type=\"paragraph\" style=\"margin-top: 0px; margin-bottom: 0px; padding: 0px; line-height: 1.875; font-size: 16px; min-height: 30px; white-space: pre-wrap; word-break: break-all; color: rgb(48, 48, 48); font-family: "Helvetica Neue", "PingFang SC", Verdana, "Microsoft Yahei", "Hiragino Sans GB", "Microsoft Sans Serif", "WenQuanYi Micro Hei", sans-serif; background-color: rgb(255, 255, 255);\">王成录表示,欢迎更多合作伙伴和开发者加入鸿蒙生态,持续添砖加瓦,开启万物智联的新时代。</p><p><br/></p>', 'HarmonyOS', '0', '0', '1', '2021-10-24 14:56:44', '2021-10-24 14:56:44', '6', '1', '', '');
INSERT INTO `tb_post` VALUES ('20', '1', '华为发布 HarmonyOS 3 开发者预览版,将推出为 HarmonyOS 全新研发的编程语言', 'https://www.infoq.cn/news/8r3lsBU3yU1mQOdoZti6', '<p data-type=\"paragraph\" style=\"margin-top: 0px; margin-bottom: 0px; padding: 0px; line-height: 1.875; font-size: 16px; min-height: 30px; white-space: pre-wrap; word-break: break-all; color: rgb(48, 48, 48); font-family: "Helvetica Neue", "PingFang SC", Verdana, "Microsoft Yahei", "Hiragino Sans GB", "Microsoft Sans Serif", "WenQuanYi Micro Hei", sans-serif; background-color: rgb(255, 255, 255);\">10 月 22 日,华为开发者大会 2021(Together)在东莞举办,华为常务董事,消费者业务 CEO,智能汽车解决方案 BU CEO 余承东宣布,HarmonyOS 设备数量超 1.5 亿,成为史上发展最快的终端操作系统。</p><p data-type=\"paragraph\" style=\"margin-top: 0px; margin-bottom: 0px; padding: 0px; line-height: 1.875; font-size: 16px; min-height: 30px; white-space: pre-wrap; word-break: break-all; color: rgb(48, 48, 48); font-family: "Helvetica Neue", "PingFang SC", Verdana, "Microsoft Yahei", "Hiragino Sans GB", "Microsoft Sans Serif", "WenQuanYi Micro Hei", sans-serif; background-color: rgb(255, 255, 255);\"><br style=\"margin: 0px; padding: 0px;\"/></p><p data-type=\"paragraph\" style=\"margin-top: 0px; margin-bottom: 0px; padding: 0px; line-height: 1.875; font-size: 16px; min-height: 30px; white-space: pre-wrap; word-break: break-all; color: rgb(48, 48, 48); font-family: "Helvetica Neue", "PingFang SC", Verdana, "Microsoft Yahei", "Hiragino Sans GB", "Microsoft Sans Serif", "WenQuanYi Micro Hei", sans-serif; background-color: rgb(255, 255, 255);\">会上,华为消费者业务软件部总裁龚体正式发布 HarmonyOS 3 开发者预览版,HarmonyOS 3 Beta 预计将在 2022 年第一季度发布。同时,他表示在不久的将来,<span data-type=\"strong\" style=\"margin: 0px; padding: 0px; font-weight: 700;\">将带来为 HarmonyOS 全新研发的编程语言</span>,为鸿蒙生态基础设施补上最后一环。</p><h4 data-id=\"heading0\" data-type=\"heading\" top=\"1055\" style=\"margin: 0px; padding: 26px 0px 4px; font-size: 20px; line-height: 36px; color: rgb(53, 53, 53); white-space: pre-wrap; font-family: "Helvetica Neue", "PingFang SC", Verdana, "Microsoft Yahei", "Hiragino Sans GB", "Microsoft Sans Serif", "WenQuanYi Micro Hei", sans-serif; background-color: rgb(255, 255, 255);\">围绕“弹性部署、超级终端、一次开发多端部署”继续演进</h4><p data-type=\"paragraph\" style=\"margin-top: 0px; margin-bottom: 0px; padding: 0px; line-height: 1.875; font-size: 16px; min-height: 30px; white-space: pre-wrap; word-break: break-all; color: rgb(48, 48, 48); font-family: "Helvetica Neue", "PingFang SC", Verdana, "Microsoft Yahei", "Hiragino Sans GB", "Microsoft Sans Serif", "WenQuanYi Micro Hei", sans-serif; background-color: rgb(255, 255, 255);\"><br style=\"margin: 0px; padding: 0px;\"/></p><p data-type=\"paragraph\" style=\"margin-top: 0px; margin-bottom: 0px; padding: 0px; line-height: 1.875; font-size: 16px; min-height: 30px; white-space: pre-wrap; word-break: break-all; color: rgb(48, 48, 48); font-family: "Helvetica Neue", "PingFang SC", Verdana, "Microsoft Yahei", "Hiragino Sans GB", "Microsoft Sans Serif", "WenQuanYi Micro Hei", sans-serif; background-color: rgb(255, 255, 255);\">据介绍,HarmonyOS 3 开发者预览版,围绕弹性部署、超级终端、一次开发多端部署三个核心价值再创新,系统性能和开发工具全面升级。</p><p data-type=\"paragraph\" style=\"margin-top: 0px; margin-bottom: 0px; padding: 0px; line-height: 1.875; font-size: 16px; min-height: 30px; white-space: pre-wrap; word-break: break-all; color: rgb(48, 48, 48); font-family: "Helvetica Neue", "PingFang SC", Verdana, "Microsoft Yahei", "Hiragino Sans GB", "Microsoft Sans Serif", "WenQuanYi Micro Hei", sans-serif; background-color: rgb(255, 255, 255);\"><br style=\"margin: 0px; padding: 0px;\"/></p><p data-type=\"paragraph\" style=\"margin-top: 0px; margin-bottom: 0px; padding: 0px; line-height: 1.875; font-size: 16px; min-height: 30px; white-space: pre-wrap; word-break: break-all; color: rgb(48, 48, 48); font-family: "Helvetica Neue", "PingFang SC", Verdana, "Microsoft Yahei", "Hiragino Sans GB", "Microsoft Sans Serif", "WenQuanYi Micro Hei", sans-serif; background-color: rgb(255, 255, 255);\">HarmonyOS 的系统架构可以实现弹性部署,让不同内存的智能设备都使用同一语言交流。HarmonyOS 3 开发者预览版带来了全新的可视的弹性部署自动化工具,设备开发者可以根据不同硬件灵活选择操作系统所需组件,让更多的设备能够更简单地搭载 HarmonyOS。据悉,<span data-type=\"strong\" style=\"margin: 0px; padding: 0px; font-weight: 700;\">弹性部署自动化工具未来也会开源,以让更多的设备用得到这个工具。</span></p><p data-type=\"paragraph\" style=\"margin-top: 0px; margin-bottom: 0px; padding: 0px; line-height: 1.875; font-size: 16px; min-height: 30px; white-space: pre-wrap; word-break: break-all; color: rgb(48, 48, 48); font-family: "Helvetica Neue", "PingFang SC", Verdana, "Microsoft Yahei", "Hiragino Sans GB", "Microsoft Sans Serif", "WenQuanYi Micro Hei", sans-serif; background-color: rgb(255, 255, 255);\"><br style=\"margin: 0px; padding: 0px;\"/></p><p data-type=\"paragraph\" style=\"margin-top: 0px; margin-bottom: 0px; padding: 0px; line-height: 1.875; font-size: 16px; min-height: 30px; white-space: pre-wrap; word-break: break-all; color: rgb(48, 48, 48); font-family: "Helvetica Neue", "PingFang SC", Verdana, "Microsoft Yahei", "Hiragino Sans GB", "Microsoft Sans Serif", "WenQuanYi Micro Hei", sans-serif; background-color: rgb(255, 255, 255);\">分布式技术一直是 HarmonyOS 的能力核心,能够让多个设备自由组合,在系统层融合成一个超级终端。每个设备都能成为互相的功能模块,实现能力互助,资源共享。本次发布的 HarmonyOS 3 开发者预览版带来创新的异构组网技术,让分布式能力支撑更多设备、更佳性能,打造更坚固的超级终端底座。比如,手机、智慧屏、4 台音箱可以组合成 6 个设备的超级终端,让手机视频也可以享受超大屏幕和 5.1 声道影院级体验;手机、平板、PC 组合带来升级版多屏协同,三屏协作提升办公效率。</p><p data-type=\"paragraph\" style=\"margin-top: 0px; margin-bottom: 0px; padding: 0px; line-height: 1.875; font-size: 16px; min-height: 30px; white-space: pre-wrap; word-break: break-all; color: rgb(48, 48, 48); font-family: "Helvetica Neue", "PingFang SC", Verdana, "Microsoft Yahei", "Hiragino Sans GB", "Microsoft Sans Serif", "WenQuanYi Micro Hei", sans-serif; background-color: rgb(255, 255, 255);\"><br style=\"margin: 0px; padding: 0px;\"/></p><p data-type=\"paragraph\" style=\"margin-top: 0px; margin-bottom: 0px; padding: 0px; line-height: 1.875; font-size: 16px; min-height: 30px; white-space: pre-wrap; word-break: break-all; color: rgb(48, 48, 48); font-family: "Helvetica Neue", "PingFang SC", Verdana, "Microsoft Yahei", "Hiragino Sans GB", "Microsoft Sans Serif", "WenQuanYi Micro Hei", sans-serif; background-color: rgb(255, 255, 255);\">随着全新的 HarmonyOS 3 开发者预览版发布,HarmonyOS 应用与服务开发工具套件全家桶也全面升级,端到端帮助开发者高效率、低成本地完成跨端应用与服务的开发。</p><p data-type=\"paragraph\" style=\"margin-top: 0px; margin-bottom: 0px; padding: 0px; line-height: 1.875; font-size: 16px; min-height: 30px; white-space: pre-wrap; word-break: break-all; color: rgb(48, 48, 48); font-family: "Helvetica Neue", "PingFang SC", Verdana, "Microsoft Yahei", "Hiragino Sans GB", "Microsoft Sans Serif", "WenQuanYi Micro Hei", sans-serif; background-color: rgb(255, 255, 255);\"><br style=\"margin: 0px; padding: 0px;\"/></p><p data-type=\"paragraph\" style=\"margin-top: 0px; margin-bottom: 0px; padding: 0px; line-height: 1.875; font-size: 16px; min-height: 30px; white-space: pre-wrap; word-break: break-all; color: rgb(48, 48, 48); font-family: "Helvetica Neue", "PingFang SC", Verdana, "Microsoft Yahei", "Hiragino Sans GB", "Microsoft Sans Serif", "WenQuanYi Micro Hei", sans-serif; background-color: rgb(255, 255, 255);\">其中,Harmony 设计系统(Harmony Design System)提供完整面向多端设备的设计规范、原子化自适应布局能力插件、支持不同设备的服务卡片模板等设计工具,让不同设备达到一致的视觉体验的同时保持整体设计语言的一致性。</p><p data-type=\"paragraph\" style=\"margin-top: 0px; margin-bottom: 0px; padding: 0px; line-height: 1.875; font-size: 16px; min-height: 30px; white-space: pre-wrap; word-break: break-all; color: rgb(48, 48, 48); font-family: "Helvetica Neue", "PingFang SC", Verdana, "Microsoft Yahei", "Hiragino Sans GB", "Microsoft Sans Serif", "WenQuanYi Micro Hei", sans-serif; background-color: rgb(255, 255, 255);\"><br style=\"margin: 0px; padding: 0px;\"/></p><p><img src=\"https://static001.infoq.cn/resource/image/98/0a/98078f10b3cc12be36fe008b5ec10e0a.jpg\" style=\"margin: 0px; padding: 0px; border: 0px; vertical-align: top; max-width: 100%; height: auto;\"/></p><p data-type=\"paragraph\" style=\"margin-top: 0px; margin-bottom: 0px; padding: 0px; line-height: 1.875; font-size: 16px; min-height: 30px; white-space: pre-wrap; word-break: break-all; color: rgb(48, 48, 48); font-family: "Helvetica Neue", "PingFang SC", Verdana, "Microsoft Yahei", "Hiragino Sans GB", "Microsoft Sans Serif", "WenQuanYi Micro Hei", sans-serif; background-color: rgb(255, 255, 255);\"><br style=\"margin: 0px; padding: 0px;\"/></p><p data-type=\"paragraph\" style=\"margin-top: 0px; margin-bottom: 0px; padding: 0px; line-height: 1.875; font-size: 16px; min-height: 30px; white-space: pre-wrap; word-break: break-all; color: rgb(48, 48, 48); font-family: "Helvetica Neue", "PingFang SC", Verdana, "Microsoft Yahei", "Hiragino Sans GB", "Microsoft Sans Serif", "WenQuanYi Micro Hei", sans-serif; background-color: rgb(255, 255, 255);\">方舟开发框架 3.0(ArkUI 3.0)带来全新声明式 UI 框架,使用 TS/JS 语言,减少跨端应用前端开发设计代码量,效率、性能均大幅度提升;方舟编译器 3.0(ArkCompiler 3.0)实现跨设备统一编译,只需一次编译即可跨端运行;DevEco Studio 3.0 带来高效率编码、跨端协同调测、多设备集成测试等工具升级,有效提升跨端应用开发效率;HarmonyOS SDK 开放 6000+ TS/JS API 能力,支持跨端分布式体验高效开发。龚体举例道,一次开发、多端部署的能力帮助新浪新闻、Wish 107.5 等全球多个头部应用快速覆盖多设备。</p><p data-type=\"paragraph\" style=\"margin-top: 0px; margin-bottom: 0px; padding: 0px; line-height: 1.875; font-size: 16px; min-height: 30px; white-space: pre-wrap; word-break: break-all; color: rgb(48, 48, 48); font-family: "Helvetica Neue", "PingFang SC", Verdana, "Microsoft Yahei", "Hiragino Sans GB", "Microsoft Sans Serif", "WenQuanYi Micro Hei", sans-serif; background-color: rgb(255, 255, 255);\"><br style=\"margin: 0px; padding: 0px;\"/></p><h4 data-id=\"heading1\" data-type=\"heading\" top=\"2040\" style=\"margin: 0px; padding: 26px 0px 4px; font-size: 20px; line-height: 36px; color: rgb(53, 53, 53); white-space: pre-wrap; font-family: "Helvetica Neue", "PingFang SC", Verdana, "Microsoft Yahei", "Hiragino Sans GB", "Microsoft Sans Serif", "WenQuanYi Micro Hei", sans-serif; background-color: rgb(255, 255, 255);\">通过 AI 技术实现新的智慧交互体验</h4><p data-type=\"paragraph\" style=\"margin-top: 0px; margin-bottom: 0px; padding: 0px; line-height: 1.875; font-size: 16px; min-height: 30px; white-space: pre-wrap; word-break: break-all; color: rgb(48, 48, 48); font-family: "Helvetica Neue", "PingFang SC", Verdana, "Microsoft Yahei", "Hiragino Sans GB", "Microsoft Sans Serif", "WenQuanYi Micro Hei", sans-serif; background-color: rgb(255, 255, 255);\"><br style=\"margin: 0px; padding: 0px;\"/></p><p data-type=\"paragraph\" style=\"margin-top: 0px; margin-bottom: 0px; padding: 0px; line-height: 1.875; font-size: 16px; min-height: 30px; white-space: pre-wrap; word-break: break-all; color: rgb(48, 48, 48); font-family: "Helvetica Neue", "PingFang SC", Verdana, "Microsoft Yahei", "Hiragino Sans GB", "Microsoft Sans Serif", "WenQuanYi Micro Hei", sans-serif; background-color: rgb(255, 255, 255);\">在即将到来的万物智联时代,更需要新的智慧交互体验。华为消费者业务 AI 与智慧全场景业务部总裁王成录表示。“华为用业界领先的 AI 技术赋能万物智联新时代,让设备、服务、交互三者进行有机地协同组合,给合作伙伴、开发者带来的全新想象空间,为消费者打造全场景智慧生活体验。”</p><p data-type=\"paragraph\" style=\"margin-top: 0px; margin-bottom: 0px; padding: 0px; line-height: 1.875; font-size: 16px; min-height: 30px; white-space: pre-wrap; word-break: break-all; color: rgb(48, 48, 48); font-family: "Helvetica Neue", "PingFang SC", Verdana, "Microsoft Yahei", "Hiragino Sans GB", "Microsoft Sans Serif", "WenQuanYi Micro Hei", sans-serif; background-color: rgb(255, 255, 255);\"><br style=\"margin: 0px; padding: 0px;\"/></p><p data-type=\"paragraph\" style=\"margin-top: 0px; margin-bottom: 0px; padding: 0px; line-height: 1.875; font-size: 16px; min-height: 30px; white-space: pre-wrap; word-break: break-all; color: rgb(48, 48, 48); font-family: "Helvetica Neue", "PingFang SC", Verdana, "Microsoft Yahei", "Hiragino Sans GB", "Microsoft Sans Serif", "WenQuanYi Micro Hei", sans-serif; background-color: rgb(255, 255, 255);\">面向鸿蒙生态的设备和应用服务开发者,华为提供了能让开发者快速、高效、低成本地开发具有智慧 AI 能力的硬件设备及原子化服务。</p><p data-type=\"paragraph\" style=\"margin-top: 0px; margin-bottom: 0px; padding: 0px; line-height: 1.875; font-size: 16px; min-height: 30px; white-space: pre-wrap; word-break: break-all; color: rgb(48, 48, 48); font-family: "Helvetica Neue", "PingFang SC", Verdana, "Microsoft Yahei", "Hiragino Sans GB", "Microsoft Sans Serif", "WenQuanYi Micro Hei", sans-serif; background-color: rgb(255, 255, 255);\"><br style=\"margin: 0px; padding: 0px;\"/></p><p><img src=\"https://static001.infoq.cn/resource/image/d1/39/d1917aaced015010c6c131be84806639.jpg\" style=\"margin: 0px; padding: 0px; border: 0px; vertical-align: top; max-width: 100%; height: auto;\"/></p><p data-type=\"paragraph\" style=\"margin-top: 0px; margin-bottom: 0px; padding: 0px; line-height: 1.875; font-size: 16px; min-height: 30px; white-space: pre-wrap; word-break: break-all; color: rgb(48, 48, 48); font-family: "Helvetica Neue", "PingFang SC", Verdana, "Microsoft Yahei", "Hiragino Sans GB", "Microsoft Sans Serif", "WenQuanYi Micro Hei", sans-serif; background-color: rgb(255, 255, 255);\"><br style=\"margin: 0px; padding: 0px;\"/></p><p data-type=\"paragraph\" style=\"margin-top: 0px; margin-bottom: 0px; padding: 0px; line-height: 1.875; font-size: 16px; min-height: 30px; white-space: pre-wrap; word-break: break-all; color: rgb(48, 48, 48); font-family: "Helvetica Neue", "PingFang SC", Verdana, "Microsoft Yahei", "Hiragino Sans GB", "Microsoft Sans Serif", "WenQuanYi Micro Hei", sans-serif; background-color: rgb(255, 255, 255);\">全新的鸿蒙智联(HarmonyOS Connect)软件服务包 3.0 新增支持垂类应用的带屏设备,并升级了基础服务包、增强服务包以及支持小艺、服务中心、畅连等应用在内的应用服务包,开发者直接调用即可快速开发出具备智慧 AI 能力的设备,预计到 2022 年将全面适配支持丰富应用的带屏设备。</p><p data-type=\"paragraph\" style=\"margin-top: 0px; margin-bottom: 0px; padding: 0px; line-height: 1.875; font-size: 16px; min-height: 30px; white-space: pre-wrap; word-break: break-all; color: rgb(48, 48, 48); font-family: "Helvetica Neue", "PingFang SC", Verdana, "Microsoft Yahei", "Hiragino Sans GB", "Microsoft Sans Serif", "WenQuanYi Micro Hei", sans-serif; background-color: rgb(255, 255, 255);\"><br style=\"margin: 0px; padding: 0px;\"/></p><p data-type=\"paragraph\" style=\"margin-top: 0px; margin-bottom: 0px; padding: 0px; line-height: 1.875; font-size: 16px; min-height: 30px; white-space: pre-wrap; word-break: break-all; color: rgb(48, 48, 48); font-family: "Helvetica Neue", "PingFang SC", Verdana, "Microsoft Yahei", "Hiragino Sans GB", "Microsoft Sans Serif", "WenQuanYi Micro Hei", sans-serif; background-color: rgb(255, 255, 255);\">一站式集成开放环境支持远程开发、按需定制、一键编译和烧录、一键集成服务包和设备仿真器,降低了开发者的接入门槛和开发周期,让开发效率倍增,无屏设备开发周期已由 2 个月减少至 2 周,带屏设备预计 2023 年将缩减到 2 个月以内。</p><p data-type=\"paragraph\" style=\"margin-top: 0px; margin-bottom: 0px; padding: 0px; line-height: 1.875; font-size: 16px; min-height: 30px; white-space: pre-wrap; word-break: break-all; color: rgb(48, 48, 48); font-family: "Helvetica Neue", "PingFang SC", Verdana, "Microsoft Yahei", "Hiragino Sans GB", "Microsoft Sans Serif", "WenQuanYi Micro Hei", sans-serif; background-color: rgb(255, 255, 255);\"><br style=\"margin: 0px; padding: 0px;\"/></p><p data-type=\"paragraph\" style=\"margin-top: 0px; margin-bottom: 0px; padding: 0px; line-height: 1.875; font-size: 16px; min-height: 30px; white-space: pre-wrap; word-break: break-all; color: rgb(48, 48, 48); font-family: "Helvetica Neue", "PingFang SC", Verdana, "Microsoft Yahei", "Hiragino Sans GB", "Microsoft Sans Serif", "WenQuanYi Micro Hei", sans-serif; background-color: rgb(255, 255, 255);\">对于应用与服务开发者,一站式集成开发的应用开发工具提供了超过 50 个原子化服务和卡片模板,支持多端双向预览、低代码开发、分布式模拟仿真以及分布式调测等。目前原子化服务开发效率已由 1 个月缩减至 15 天,预计 2023 年 5 天即可完成开发。</p><p data-type=\"paragraph\" style=\"margin-top: 0px; margin-bottom: 0px; padding: 0px; line-height: 1.875; font-size: 16px; min-height: 30px; white-space: pre-wrap; word-break: break-all; color: rgb(48, 48, 48); font-family: "Helvetica Neue", "PingFang SC", Verdana, "Microsoft Yahei", "Hiragino Sans GB", "Microsoft Sans Serif", "WenQuanYi Micro Hei", sans-serif; background-color: rgb(255, 255, 255);\"><br style=\"margin: 0px; padding: 0px;\"/></p><p data-type=\"paragraph\" style=\"margin-top: 0px; margin-bottom: 0px; padding: 0px; line-height: 1.875; font-size: 16px; min-height: 30px; white-space: pre-wrap; word-break: break-all; color: rgb(48, 48, 48); font-family: "Helvetica Neue", "PingFang SC", Verdana, "Microsoft Yahei", "Hiragino Sans GB", "Microsoft Sans Serif", "WenQuanYi Micro Hei", sans-serif; background-color: rgb(255, 255, 255);\">王成录表示,欢迎更多合作伙伴和开发者加入鸿蒙生态,持续添砖加瓦,开启万物智联的新时代。</p><p><br/></p>', 'HarmonyOS', '0', '0', '1', '2021-10-24 15:17:56', '2021-10-24 15:17:56', '6', '1', '', '');
INSERT INTO `tb_post` VALUES ('21', '1', '华为发布 HarmonyOS 3 开发者预览版,将推出为 HarmonyOS 全新研发的编程语言', 'https://www.infoq.cn/news/8r3lsBU3yU1mQOdoZti6', '<p data-type=\"paragraph\" style=\"margin-top: 0px; margin-bottom: 0px; padding: 0px; line-height: 1.875; font-size: 16px; min-height: 30px; white-space: pre-wrap; word-break: break-all; color: rgb(48, 48, 48); font-family: "Helvetica Neue", "PingFang SC", Verdana, "Microsoft Yahei", "Hiragino Sans GB", "Microsoft Sans Serif", "WenQuanYi Micro Hei", sans-serif; background-color: rgb(255, 255, 255);\">10 月 22 日,华为开发者大会 2021(Together)在东莞举办,华为常务董事,消费者业务 CEO,智能汽车解决方案 BU CEO 余承东宣布,HarmonyOS 设备数量超 1.5 亿,成为史上发展最快的终端操作系统。</p><p data-type=\"paragraph\" style=\"margin-top: 0px; margin-bottom: 0px; padding: 0px; line-height: 1.875; font-size: 16px; min-height: 30px; white-space: pre-wrap; word-break: break-all; color: rgb(48, 48, 48); font-family: "Helvetica Neue", "PingFang SC", Verdana, "Microsoft Yahei", "Hiragino Sans GB", "Microsoft Sans Serif", "WenQuanYi Micro Hei", sans-serif; background-color: rgb(255, 255, 255);\"><br style=\"margin: 0px; padding: 0px;\"/></p><p data-type=\"paragraph\" style=\"margin-top: 0px; margin-bottom: 0px; padding: 0px; line-height: 1.875; font-size: 16px; min-height: 30px; white-space: pre-wrap; word-break: break-all; color: rgb(48, 48, 48); font-family: "Helvetica Neue", "PingFang SC", Verdana, "Microsoft Yahei", "Hiragino Sans GB", "Microsoft Sans Serif", "WenQuanYi Micro Hei", sans-serif; background-color: rgb(255, 255, 255);\">会上,华为消费者业务软件部总裁龚体正式发布 HarmonyOS 3 开发者预览版,HarmonyOS 3 Beta 预计将在 2022 年第一季度发布。同时,他表示在不久的将来,<span data-type=\"strong\" style=\"margin: 0px; padding: 0px; font-weight: 700;\">将带来为 HarmonyOS 全新研发的编程语言</span>,为鸿蒙生态基础设施补上最后一环。</p><h4 data-id=\"heading0\" data-type=\"heading\" top=\"1055\" style=\"margin: 0px; padding: 26px 0px 4px; font-size: 20px; line-height: 36px; color: rgb(53, 53, 53); white-space: pre-wrap; font-family: "Helvetica Neue", "PingFang SC", Verdana, "Microsoft Yahei", "Hiragino Sans GB", "Microsoft Sans Serif", "WenQuanYi Micro Hei", sans-serif; background-color: rgb(255, 255, 255);\">围绕“弹性部署、超级终端、一次开发多端部署”继续演进</h4><p data-type=\"paragraph\" style=\"margin-top: 0px; margin-bottom: 0px; padding: 0px; line-height: 1.875; font-size: 16px; min-height: 30px; white-space: pre-wrap; word-break: break-all; color: rgb(48, 48, 48); font-family: "Helvetica Neue", "PingFang SC", Verdana, "Microsoft Yahei", "Hiragino Sans GB", "Microsoft Sans Serif", "WenQuanYi Micro Hei", sans-serif; background-color: rgb(255, 255, 255);\"><br style=\"margin: 0px; padding: 0px;\"/></p><p data-type=\"paragraph\" style=\"margin-top: 0px; margin-bottom: 0px; padding: 0px; line-height: 1.875; font-size: 16px; min-height: 30px; white-space: pre-wrap; word-break: break-all; color: rgb(48, 48, 48); font-family: "Helvetica Neue", "PingFang SC", Verdana, "Microsoft Yahei", "Hiragino Sans GB", "Microsoft Sans Serif", "WenQuanYi Micro Hei", sans-serif; background-color: rgb(255, 255, 255);\">据介绍,HarmonyOS 3 开发者预览版,围绕弹性部署、超级终端、一次开发多端部署三个核心价值再创新,系统性能和开发工具全面升级。</p><p data-type=\"paragraph\" style=\"margin-top: 0px; margin-bottom: 0px; padding: 0px; line-height: 1.875; font-size: 16px; min-height: 30px; white-space: pre-wrap; word-break: break-all; color: rgb(48, 48, 48); font-family: "Helvetica Neue", "PingFang SC", Verdana, "Microsoft Yahei", "Hiragino Sans GB", "Microsoft Sans Serif", "WenQuanYi Micro Hei", sans-serif; background-color: rgb(255, 255, 255);\"><br style=\"margin: 0px; padding: 0px;\"/></p><p data-type=\"paragraph\" style=\"margin-top: 0px; margin-bottom: 0px; padding: 0px; line-height: 1.875; font-size: 16px; min-height: 30px; white-space: pre-wrap; word-break: break-all; color: rgb(48, 48, 48); font-family: "Helvetica Neue", "PingFang SC", Verdana, "Microsoft Yahei", "Hiragino Sans GB", "Microsoft Sans Serif", "WenQuanYi Micro Hei", sans-serif; background-color: rgb(255, 255, 255);\">HarmonyOS 的系统架构可以实现弹性部署,让不同内存的智能设备都使用同一语言交流。HarmonyOS 3 开发者预览版带来了全新的可视的弹性部署自动化工具,设备开发者可以根据不同硬件灵活选择操作系统所需组件,让更多的设备能够更简单地搭载 HarmonyOS。据悉,<span data-type=\"strong\" style=\"margin: 0px; padding: 0px; font-weight: 700;\">弹性部署自动化工具未来也会开源,以让更多的设备用得到这个工具。</span></p><p data-type=\"paragraph\" style=\"margin-top: 0px; margin-bottom: 0px; padding: 0px; line-height: 1.875; font-size: 16px; min-height: 30px; white-space: pre-wrap; word-break: break-all; color: rgb(48, 48, 48); font-family: "Helvetica Neue", "PingFang SC", Verdana, "Microsoft Yahei", "Hiragino Sans GB", "Microsoft Sans Serif", "WenQuanYi Micro Hei", sans-serif; background-color: rgb(255, 255, 255);\"><br style=\"margin: 0px; padding: 0px;\"/></p><p data-type=\"paragraph\" style=\"margin-top: 0px; margin-bottom: 0px; padding: 0px; line-height: 1.875; font-size: 16px; min-height: 30px; white-space: pre-wrap; word-break: break-all; color: rgb(48, 48, 48); font-family: "Helvetica Neue", "PingFang SC", Verdana, "Microsoft Yahei", "Hiragino Sans GB", "Microsoft Sans Serif", "WenQuanYi Micro Hei", sans-serif; background-color: rgb(255, 255, 255);\">分布式技术一直是 HarmonyOS 的能力核心,能够让多个设备自由组合,在系统层融合成一个超级终端。每个设备都能成为互相的功能模块,实现能力互助,资源共享。本次发布的 HarmonyOS 3 开发者预览版带来创新的异构组网技术,让分布式能力支撑更多设备、更佳性能,打造更坚固的超级终端底座。比如,手机、智慧屏、4 台音箱可以组合成 6 个设备的超级终端,让手机视频也可以享受超大屏幕和 5.1 声道影院级体验;手机、平板、PC 组合带来升级版多屏协同,三屏协作提升办公效率。</p><p data-type=\"paragraph\" style=\"margin-top: 0px; margin-bottom: 0px; padding: 0px; line-height: 1.875; font-size: 16px; min-height: 30px; white-space: pre-wrap; word-break: break-all; color: rgb(48, 48, 48); font-family: "Helvetica Neue", "PingFang SC", Verdana, "Microsoft Yahei", "Hiragino Sans GB", "Microsoft Sans Serif", "WenQuanYi Micro Hei", sans-serif; background-color: rgb(255, 255, 255);\"><br style=\"margin: 0px; padding: 0px;\"/></p><p data-type=\"paragraph\" style=\"margin-top: 0px; margin-bottom: 0px; padding: 0px; line-height: 1.875; font-size: 16px; min-height: 30px; white-space: pre-wrap; word-break: break-all; color: rgb(48, 48, 48); font-family: "Helvetica Neue", "PingFang SC", Verdana, "Microsoft Yahei", "Hiragino Sans GB", "Microsoft Sans Serif", "WenQuanYi Micro Hei", sans-serif; background-color: rgb(255, 255, 255);\">随着全新的 HarmonyOS 3 开发者预览版发布,HarmonyOS 应用与服务开发工具套件全家桶也全面升级,端到端帮助开发者高效率、低成本地完成跨端应用与服务的开发。</p><p data-type=\"paragraph\" style=\"margin-top: 0px; margin-bottom: 0px; padding: 0px; line-height: 1.875; font-size: 16px; min-height: 30px; white-space: pre-wrap; word-break: break-all; color: rgb(48, 48, 48); font-family: "Helvetica Neue", "PingFang SC", Verdana, "Microsoft Yahei", "Hiragino Sans GB", "Microsoft Sans Serif", "WenQuanYi Micro Hei", sans-serif; background-color: rgb(255, 255, 255);\"><br style=\"margin: 0px; padding: 0px;\"/></p><p data-type=\"paragraph\" style=\"margin-top: 0px; margin-bottom: 0px; padding: 0px; line-height: 1.875; font-size: 16px; min-height: 30px; white-space: pre-wrap; word-break: break-all; color: rgb(48, 48, 48); font-family: "Helvetica Neue", "PingFang SC", Verdana, "Microsoft Yahei", "Hiragino Sans GB", "Microsoft Sans Serif", "WenQuanYi Micro Hei", sans-serif; background-color: rgb(255, 255, 255);\">其中,Harmony 设计系统(Harmony Design System)提供完整面向多端设备的设计规范、原子化自适应布局能力插件、支持不同设备的服务卡片模板等设计工具,让不同设备达到一致的视觉体验的同时保持整体设计语言的一致性。</p><p data-type=\"paragraph\" style=\"margin-top: 0px; margin-bottom: 0px; padding: 0px; line-height: 1.875; font-size: 16px; min-height: 30px; white-space: pre-wrap; word-break: break-all; color: rgb(48, 48, 48); font-family: "Helvetica Neue", "PingFang SC", Verdana, "Microsoft Yahei", "Hiragino Sans GB", "Microsoft Sans Serif", "WenQuanYi Micro Hei", sans-serif; background-color: rgb(255, 255, 255);\"><br style=\"margin: 0px; padding: 0px;\"/></p><p><img src=\"https://static001.infoq.cn/resource/image/98/0a/98078f10b3cc12be36fe008b5ec10e0a.jpg\" style=\"margin: 0px; padding: 0px; border: 0px; vertical-align: top; max-width: 100%; height: auto;\"/></p><p data-type=\"paragraph\" style=\"margin-top: 0px; margin-bottom: 0px; padding: 0px; line-height: 1.875; font-size: 16px; min-height: 30px; white-space: pre-wrap; word-break: break-all; color: rgb(48, 48, 48); font-family: "Helvetica Neue", "PingFang SC", Verdana, "Microsoft Yahei", "Hiragino Sans GB", "Microsoft Sans Serif", "WenQuanYi Micro Hei", sans-serif; background-color: rgb(255, 255, 255);\"><br style=\"margin: 0px; padding: 0px;\"/></p><p data-type=\"paragraph\" style=\"margin-top: 0px; margin-bottom: 0px; padding: 0px; line-height: 1.875; font-size: 16px; min-height: 30px; white-space: pre-wrap; word-break: break-all; color: rgb(48, 48, 48); font-family: "Helvetica Neue", "PingFang SC", Verdana, "Microsoft Yahei", "Hiragino Sans GB", "Microsoft Sans Serif", "WenQuanYi Micro Hei", sans-serif; background-color: rgb(255, 255, 255);\">方舟开发框架 3.0(ArkUI 3.0)带来全新声明式 UI 框架,使用 TS/JS 语言,减少跨端应用前端开发设计代码量,效率、性能均大幅度提升;方舟编译器 3.0(ArkCompiler 3.0)实现跨设备统一编译,只需一次编译即可跨端运行;DevEco Studio 3.0 带来高效率编码、跨端协同调测、多设备集成测试等工具升级,有效提升跨端应用开发效率;HarmonyOS SDK 开放 6000+ TS/JS API 能力,支持跨端分布式体验高效开发。龚体举例道,一次开发、多端部署的能力帮助新浪新闻、Wish 107.5 等全球多个头部应用快速覆盖多设备。</p><p data-type=\"paragraph\" style=\"margin-top: 0px; margin-bottom: 0px; padding: 0px; line-height: 1.875; font-size: 16px; min-height: 30px; white-space: pre-wrap; word-break: break-all; color: rgb(48, 48, 48); font-family: "Helvetica Neue", "PingFang SC", Verdana, "Microsoft Yahei", "Hiragino Sans GB", "Microsoft Sans Serif", "WenQuanYi Micro Hei", sans-serif; background-color: rgb(255, 255, 255);\"><br style=\"margin: 0px; padding: 0px;\"/></p><h4 data-id=\"heading1\" data-type=\"heading\" top=\"2040\" style=\"margin: 0px; padding: 26px 0px 4px; font-size: 20px; line-height: 36px; color: rgb(53, 53, 53); white-space: pre-wrap; font-family: "Helvetica Neue", "PingFang SC", Verdana, "Microsoft Yahei", "Hiragino Sans GB", "Microsoft Sans Serif", "WenQuanYi Micro Hei", sans-serif; background-color: rgb(255, 255, 255);\">通过 AI 技术实现新的智慧交互体验</h4><p data-type=\"paragraph\" style=\"margin-top: 0px; margin-bottom: 0px; padding: 0px; line-height: 1.875; font-size: 16px; min-height: 30px; white-space: pre-wrap; word-break: break-all; color: rgb(48, 48, 48); font-family: "Helvetica Neue", "PingFang SC", Verdana, "Microsoft Yahei", "Hiragino Sans GB", "Microsoft Sans Serif", "WenQuanYi Micro Hei", sans-serif; background-color: rgb(255, 255, 255);\"><br style=\"margin: 0px; padding: 0px;\"/></p><p data-type=\"paragraph\" style=\"margin-top: 0px; margin-bottom: 0px; padding: 0px; line-height: 1.875; font-size: 16px; min-height: 30px; white-space: pre-wrap; word-break: break-all; color: rgb(48, 48, 48); font-family: "Helvetica Neue", "PingFang SC", Verdana, "Microsoft Yahei", "Hiragino Sans GB", "Microsoft Sans Serif", "WenQuanYi Micro Hei", sans-serif; background-color: rgb(255, 255, 255);\">在即将到来的万物智联时代,更需要新的智慧交互体验。华为消费者业务 AI 与智慧全场景业务部总裁王成录表示。“华为用业界领先的 AI 技术赋能万物智联新时代,让设备、服务、交互三者进行有机地协同组合,给合作伙伴、开发者带来的全新想象空间,为消费者打造全场景智慧生活体验。”</p><p data-type=\"paragraph\" style=\"margin-top: 0px; margin-bottom: 0px; padding: 0px; line-height: 1.875; font-size: 16px; min-height: 30px; white-space: pre-wrap; word-break: break-all; color: rgb(48, 48, 48); font-family: "Helvetica Neue", "PingFang SC", Verdana, "Microsoft Yahei", "Hiragino Sans GB", "Microsoft Sans Serif", "WenQuanYi Micro Hei", sans-serif; background-color: rgb(255, 255, 255);\"><br style=\"margin: 0px; padding: 0px;\"/></p><p data-type=\"paragraph\" style=\"margin-top: 0px; margin-bottom: 0px; padding: 0px; line-height: 1.875; font-size: 16px; min-height: 30px; white-space: pre-wrap; word-break: break-all; color: rgb(48, 48, 48); font-family: "Helvetica Neue", "PingFang SC", Verdana, "Microsoft Yahei", "Hiragino Sans GB", "Microsoft Sans Serif", "WenQuanYi Micro Hei", sans-serif; background-color: rgb(255, 255, 255);\">面向鸿蒙生态的设备和应用服务开发者,华为提供了能让开发者快速、高效、低成本地开发具有智慧 AI 能力的硬件设备及原子化服务。</p><p data-type=\"paragraph\" style=\"margin-top: 0px; margin-bottom: 0px; padding: 0px; line-height: 1.875; font-size: 16px; min-height: 30px; white-space: pre-wrap; word-break: break-all; color: rgb(48, 48, 48); font-family: "Helvetica Neue", "PingFang SC", Verdana, "Microsoft Yahei", "Hiragino Sans GB", "Microsoft Sans Serif", "WenQuanYi Micro Hei", sans-serif; background-color: rgb(255, 255, 255);\"><br style=\"margin: 0px; padding: 0px;\"/></p><p><img src=\"https://static001.infoq.cn/resource/image/d1/39/d1917aaced015010c6c131be84806639.jpg\" style=\"margin: 0px; padding: 0px; border: 0px; vertical-align: top; max-width: 100%; height: auto;\"/></p><p data-type=\"paragraph\" style=\"margin-top: 0px; margin-bottom: 0px; padding: 0px; line-height: 1.875; font-size: 16px; min-height: 30px; white-space: pre-wrap; word-break: break-all; color: rgb(48, 48, 48); font-family: "Helvetica Neue", "PingFang SC", Verdana, "Microsoft Yahei", "Hiragino Sans GB", "Microsoft Sans Serif", "WenQuanYi Micro Hei", sans-serif; background-color: rgb(255, 255, 255);\"><br style=\"margin: 0px; padding: 0px;\"/></p><p data-type=\"paragraph\" style=\"margin-top: 0px; margin-bottom: 0px; padding: 0px; line-height: 1.875; font-size: 16px; min-height: 30px; white-space: pre-wrap; word-break: break-all; color: rgb(48, 48, 48); font-family: "Helvetica Neue", "PingFang SC", Verdana, "Microsoft Yahei", "Hiragino Sans GB", "Microsoft Sans Serif", "WenQuanYi Micro Hei", sans-serif; background-color: rgb(255, 255, 255);\">全新的鸿蒙智联(HarmonyOS Connect)软件服务包 3.0 新增支持垂类应用的带屏设备,并升级了基础服务包、增强服务包以及支持小艺、服务中心、畅连等应用在内的应用服务包,开发者直接调用即可快速开发出具备智慧 AI 能力的设备,预计到 2022 年将全面适配支持丰富应用的带屏设备。</p><p data-type=\"paragraph\" style=\"margin-top: 0px; margin-bottom: 0px; padding: 0px; line-height: 1.875; font-size: 16px; min-height: 30px; white-space: pre-wrap; word-break: break-all; color: rgb(48, 48, 48); font-family: "Helvetica Neue", "PingFang SC", Verdana, "Microsoft Yahei", "Hiragino Sans GB", "Microsoft Sans Serif", "WenQuanYi Micro Hei", sans-serif; background-color: rgb(255, 255, 255);\"><br style=\"margin: 0px; padding: 0px;\"/></p><p data-type=\"paragraph\" style=\"margin-top: 0px; margin-bottom: 0px; padding: 0px; line-height: 1.875; font-size: 16px; min-height: 30px; white-space: pre-wrap; word-break: break-all; color: rgb(48, 48, 48); font-family: "Helvetica Neue", "PingFang SC", Verdana, "Microsoft Yahei", "Hiragino Sans GB", "Microsoft Sans Serif", "WenQuanYi Micro Hei", sans-serif; background-color: rgb(255, 255, 255);\">一站式集成开放环境支持远程开发、按需定制、一键编译和烧录、一键集成服务包和设备仿真器,降低了开发者的接入门槛和开发周期,让开发效率倍增,无屏设备开发周期已由 2 个月减少至 2 周,带屏设备预计 2023 年将缩减到 2 个月以内。</p><p data-type=\"paragraph\" style=\"margin-top: 0px; margin-bottom: 0px; padding: 0px; line-height: 1.875; font-size: 16px; min-height: 30px; white-space: pre-wrap; word-break: break-all; color: rgb(48, 48, 48); font-family: "Helvetica Neue", "PingFang SC", Verdana, "Microsoft Yahei", "Hiragino Sans GB", "Microsoft Sans Serif", "WenQuanYi Micro Hei", sans-serif; background-color: rgb(255, 255, 255);\"><br style=\"margin: 0px; padding: 0px;\"/></p><p data-type=\"paragraph\" style=\"margin-top: 0px; margin-bottom: 0px; padding: 0px; line-height: 1.875; font-size: 16px; min-height: 30px; white-space: pre-wrap; word-break: break-all; color: rgb(48, 48, 48); font-family: "Helvetica Neue", "PingFang SC", Verdana, "Microsoft Yahei", "Hiragino Sans GB", "Microsoft Sans Serif", "WenQuanYi Micro Hei", sans-serif; background-color: rgb(255, 255, 255);\">对于应用与服务开发者,一站式集成开发的应用开发工具提供了超过 50 个原子化服务和卡片模板,支持多端双向预览、低代码开发、分布式模拟仿真以及分布式调测等。目前原子化服务开发效率已由 1 个月缩减至 15 天,预计 2023 年 5 天即可完成开发。</p><p data-type=\"paragraph\" style=\"margin-top: 0px; margin-bottom: 0px; padding: 0px; line-height: 1.875; font-size: 16px; min-height: 30px; white-space: pre-wrap; word-break: break-all; color: rgb(48, 48, 48); font-family: "Helvetica Neue", "PingFang SC", Verdana, "Microsoft Yahei", "Hiragino Sans GB", "Microsoft Sans Serif", "WenQuanYi Micro Hei", sans-serif; background-color: rgb(255, 255, 255);\"><br style=\"margin: 0px; padding: 0px;\"/></p><p data-type=\"paragraph\" style=\"margin-top: 0px; margin-bottom: 0px; padding: 0px; line-height: 1.875; font-size: 16px; min-height: 30px; white-space: pre-wrap; word-break: break-all; color: rgb(48, 48, 48); font-family: "Helvetica Neue", "PingFang SC", Verdana, "Microsoft Yahei", "Hiragino Sans GB", "Microsoft Sans Serif", "WenQuanYi Micro Hei", sans-serif; background-color: rgb(255, 255, 255);\">王成录表示,欢迎更多合作伙伴和开发者加入鸿蒙生态,持续添砖加瓦,开启万物智联的新时代。</p><p><br/></p>', 'HarmonyOS', '0', '0', '1', '2021-10-24 15:18:00', '2021-10-24 15:18:00', '6', '1', '', '');
INSERT INTO `tb_post` VALUES ('22', '1', '华为发布 HarmonyOS 3 开发者预览版,将推出为 HarmonyOS 全新研发的编程语言', 'https://www.infoq.cn/news/8r3lsBU3yU1mQOdoZti6', '<p data-type=\"paragraph\" style=\"margin-top: 0px; margin-bottom: 0px; padding: 0px; line-height: 1.875; font-size: 16px; min-height: 30px; white-space: pre-wrap; word-break: break-all; color: rgb(48, 48, 48); font-family: "Helvetica Neue", "PingFang SC", Verdana, "Microsoft Yahei", "Hiragino Sans GB", "Microsoft Sans Serif", "WenQuanYi Micro Hei", sans-serif; background-color: rgb(255, 255, 255);\">10 月 22 日,华为开发者大会 2021(Together)在东莞举办,华为常务董事,消费者业务 CEO,智能汽车解决方案 BU CEO 余承东宣布,HarmonyOS 设备数量超 1.5 亿,成为史上发展最快的终端操作系统。</p><p data-type=\"paragraph\" style=\"margin-top: 0px; margin-bottom: 0px; padding: 0px; line-height: 1.875; font-size: 16px; min-height: 30px; white-space: pre-wrap; word-break: break-all; color: rgb(48, 48, 48); font-family: "Helvetica Neue", "PingFang SC", Verdana, "Microsoft Yahei", "Hiragino Sans GB", "Microsoft Sans Serif", "WenQuanYi Micro Hei", sans-serif; background-color: rgb(255, 255, 255);\"><br style=\"margin: 0px; padding: 0px;\"/></p><p data-type=\"paragraph\" style=\"margin-top: 0px; margin-bottom: 0px; padding: 0px; line-height: 1.875; font-size: 16px; min-height: 30px; white-space: pre-wrap; word-break: break-all; color: rgb(48, 48, 48); font-family: "Helvetica Neue", "PingFang SC", Verdana, "Microsoft Yahei", "Hiragino Sans GB", "Microsoft Sans Serif", "WenQuanYi Micro Hei", sans-serif; background-color: rgb(255, 255, 255);\">会上,华为消费者业务软件部总裁龚体正式发布 HarmonyOS 3 开发者预览版,HarmonyOS 3 Beta 预计将在 2022 年第一季度发布。同时,他表示在不久的将来,<span data-type=\"strong\" style=\"margin: 0px; padding: 0px; font-weight: 700;\">将带来为 HarmonyOS 全新研发的编程语言</span>,为鸿蒙生态基础设施补上最后一环。</p><h4 data-id=\"heading0\" data-type=\"heading\" top=\"1055\" style=\"margin: 0px; padding: 26px 0px 4px; font-size: 20px; line-height: 36px; color: rgb(53, 53, 53); white-space: pre-wrap; font-family: "Helvetica Neue", "PingFang SC", Verdana, "Microsoft Yahei", "Hiragino Sans GB", "Microsoft Sans Serif", "WenQuanYi Micro Hei", sans-serif; background-color: rgb(255, 255, 255);\">围绕“弹性部署、超级终端、一次开发多端部署”继续演进</h4><p data-type=\"paragraph\" style=\"margin-top: 0px; margin-bottom: 0px; padding: 0px; line-height: 1.875; font-size: 16px; min-height: 30px; white-space: pre-wrap; word-break: break-all; color: rgb(48, 48, 48); font-family: "Helvetica Neue", "PingFang SC", Verdana, "Microsoft Yahei", "Hiragino Sans GB", "Microsoft Sans Serif", "WenQuanYi Micro Hei", sans-serif; background-color: rgb(255, 255, 255);\"><br style=\"margin: 0px; padding: 0px;\"/></p><p data-type=\"paragraph\" style=\"margin-top: 0px; margin-bottom: 0px; padding: 0px; line-height: 1.875; font-size: 16px; min-height: 30px; white-space: pre-wrap; word-break: break-all; color: rgb(48, 48, 48); font-family: "Helvetica Neue", "PingFang SC", Verdana, "Microsoft Yahei", "Hiragino Sans GB", "Microsoft Sans Serif", "WenQuanYi Micro Hei", sans-serif; background-color: rgb(255, 255, 255);\">据介绍,HarmonyOS 3 开发者预览版,围绕弹性部署、超级终端、一次开发多端部署三个核心价值再创新,系统性能和开发工具全面升级。</p><p data-type=\"paragraph\" style=\"margin-top: 0px; margin-bottom: 0px; padding: 0px; line-height: 1.875; font-size: 16px; min-height: 30px; white-space: pre-wrap; word-break: break-all; color: rgb(48, 48, 48); font-family: "Helvetica Neue", "PingFang SC", Verdana, "Microsoft Yahei", "Hiragino Sans GB", "Microsoft Sans Serif", "WenQuanYi Micro Hei", sans-serif; background-color: rgb(255, 255, 255);\"><br style=\"margin: 0px; padding: 0px;\"/></p><p data-type=\"paragraph\" style=\"margin-top: 0px; margin-bottom: 0px; padding: 0px; line-height: 1.875; font-size: 16px; min-height: 30px; white-space: pre-wrap; word-break: break-all; color: rgb(48, 48, 48); font-family: "Helvetica Neue", "PingFang SC", Verdana, "Microsoft Yahei", "Hiragino Sans GB", "Microsoft Sans Serif", "WenQuanYi Micro Hei", sans-serif; background-color: rgb(255, 255, 255);\">HarmonyOS 的系统架构可以实现弹性部署,让不同内存的智能设备都使用同一语言交流。HarmonyOS 3 开发者预览版带来了全新的可视的弹性部署自动化工具,设备开发者可以根据不同硬件灵活选择操作系统所需组件,让更多的设备能够更简单地搭载 HarmonyOS。据悉,<span data-type=\"strong\" style=\"margin: 0px; padding: 0px; font-weight: 700;\">弹性部署自动化工具未来也会开源,以让更多的设备用得到这个工具。</span></p><p data-type=\"paragraph\" style=\"margin-top: 0px; margin-bottom: 0px; padding: 0px; line-height: 1.875; font-size: 16px; min-height: 30px; white-space: pre-wrap; word-break: break-all; color: rgb(48, 48, 48); font-family: "Helvetica Neue", "PingFang SC", Verdana, "Microsoft Yahei", "Hiragino Sans GB", "Microsoft Sans Serif", "WenQuanYi Micro Hei", sans-serif; background-color: rgb(255, 255, 255);\"><br style=\"margin: 0px; padding: 0px;\"/></p><p data-type=\"paragraph\" style=\"margin-top: 0px; margin-bottom: 0px; padding: 0px; line-height: 1.875; font-size: 16px; min-height: 30px; white-space: pre-wrap; word-break: break-all; color: rgb(48, 48, 48); font-family: "Helvetica Neue", "PingFang SC", Verdana, "Microsoft Yahei", "Hiragino Sans GB", "Microsoft Sans Serif", "WenQuanYi Micro Hei", sans-serif; background-color: rgb(255, 255, 255);\">分布式技术一直是 HarmonyOS 的能力核心,能够让多个设备自由组合,在系统层融合成一个超级终端。每个设备都能成为互相的功能模块,实现能力互助,资源共享。本次发布的 HarmonyOS 3 开发者预览版带来创新的异构组网技术,让分布式能力支撑更多设备、更佳性能,打造更坚固的超级终端底座。比如,手机、智慧屏、4 台音箱可以组合成 6 个设备的超级终端,让手机视频也可以享受超大屏幕和 5.1 声道影院级体验;手机、平板、PC 组合带来升级版多屏协同,三屏协作提升办公效率。</p><p data-type=\"paragraph\" style=\"margin-top: 0px; margin-bottom: 0px; padding: 0px; line-height: 1.875; font-size: 16px; min-height: 30px; white-space: pre-wrap; word-break: break-all; color: rgb(48, 48, 48); font-family: "Helvetica Neue", "PingFang SC", Verdana, "Microsoft Yahei", "Hiragino Sans GB", "Microsoft Sans Serif", "WenQuanYi Micro Hei", sans-serif; background-color: rgb(255, 255, 255);\"><br style=\"margin: 0px; padding: 0px;\"/></p><p data-type=\"paragraph\" style=\"margin-top: 0px; margin-bottom: 0px; padding: 0px; line-height: 1.875; font-size: 16px; min-height: 30px; white-space: pre-wrap; word-break: break-all; color: rgb(48, 48, 48); font-family: "Helvetica Neue", "PingFang SC", Verdana, "Microsoft Yahei", "Hiragino Sans GB", "Microsoft Sans Serif", "WenQuanYi Micro Hei", sans-serif; background-color: rgb(255, 255, 255);\">随着全新的 HarmonyOS 3 开发者预览版发布,HarmonyOS 应用与服务开发工具套件全家桶也全面升级,端到端帮助开发者高效率、低成本地完成跨端应用与服务的开发。</p><p data-type=\"paragraph\" style=\"margin-top: 0px; margin-bottom: 0px; padding: 0px; line-height: 1.875; font-size: 16px; min-height: 30px; white-space: pre-wrap; word-break: break-all; color: rgb(48, 48, 48); font-family: "Helvetica Neue", "PingFang SC", Verdana, "Microsoft Yahei", "Hiragino Sans GB", "Microsoft Sans Serif", "WenQuanYi Micro Hei", sans-serif; background-color: rgb(255, 255, 255);\"><br style=\"margin: 0px; padding: 0px;\"/></p><p data-type=\"paragraph\" style=\"margin-top: 0px; margin-bottom: 0px; padding: 0px; line-height: 1.875; font-size: 16px; min-height: 30px; white-space: pre-wrap; word-break: break-all; color: rgb(48, 48, 48); font-family: "Helvetica Neue", "PingFang SC", Verdana, "Microsoft Yahei", "Hiragino Sans GB", "Microsoft Sans Serif", "WenQuanYi Micro Hei", sans-serif; background-color: rgb(255, 255, 255);\">其中,Harmony 设计系统(Harmony Design System)提供完整面向多端设备的设计规范、原子化自适应布局能力插件、支持不同设备的服务卡片模板等设计工具,让不同设备达到一致的视觉体验的同时保持整体设计语言的一致性。</p><p data-type=\"paragraph\" style=\"margin-top: 0px; margin-bottom: 0px; padding: 0px; line-height: 1.875; font-size: 16px; min-height: 30px; white-space: pre-wrap; word-break: break-all; color: rgb(48, 48, 48); font-family: "Helvetica Neue", "PingFang SC", Verdana, "Microsoft Yahei", "Hiragino Sans GB", "Microsoft Sans Serif", "WenQuanYi Micro Hei", sans-serif; background-color: rgb(255, 255, 255);\"><br style=\"margin: 0px; padding: 0px;\"/></p><p><img src=\"https://static001.infoq.cn/resource/image/98/0a/98078f10b3cc12be36fe008b5ec10e0a.jpg\" style=\"margin: 0px; padding: 0px; border: 0px; vertical-align: top; max-width: 100%; height: auto;\"/></p><p data-type=\"paragraph\" style=\"margin-top: 0px; margin-bottom: 0px; padding: 0px; line-height: 1.875; font-size: 16px; min-height: 30px; white-space: pre-wrap; word-break: break-all; color: rgb(48, 48, 48); font-family: "Helvetica Neue", "PingFang SC", Verdana, "Microsoft Yahei", "Hiragino Sans GB", "Microsoft Sans Serif", "WenQuanYi Micro Hei", sans-serif; background-color: rgb(255, 255, 255);\"><br style=\"margin: 0px; padding: 0px;\"/></p><p data-type=\"paragraph\" style=\"margin-top: 0px; margin-bottom: 0px; padding: 0px; line-height: 1.875; font-size: 16px; min-height: 30px; white-space: pre-wrap; word-break: break-all; color: rgb(48, 48, 48); font-family: "Helvetica Neue", "PingFang SC", Verdana, "Microsoft Yahei", "Hiragino Sans GB", "Microsoft Sans Serif", "WenQuanYi Micro Hei", sans-serif; background-color: rgb(255, 255, 255);\">方舟开发框架 3.0(ArkUI 3.0)带来全新声明式 UI 框架,使用 TS/JS 语言,减少跨端应用前端开发设计代码量,效率、性能均大幅度提升;方舟编译器 3.0(ArkCompiler 3.0)实现跨设备统一编译,只需一次编译即可跨端运行;DevEco Studio 3.0 带来高效率编码、跨端协同调测、多设备集成测试等工具升级,有效提升跨端应用开发效率;HarmonyOS SDK 开放 6000+ TS/JS API 能力,支持跨端分布式体验高效开发。龚体举例道,一次开发、多端部署的能力帮助新浪新闻、Wish 107.5 等全球多个头部应用快速覆盖多设备。</p><p data-type=\"paragraph\" style=\"margin-top: 0px; margin-bottom: 0px; padding: 0px; line-height: 1.875; font-size: 16px; min-height: 30px; white-space: pre-wrap; word-break: break-all; color: rgb(48, 48, 48); font-family: "Helvetica Neue", "PingFang SC", Verdana, "Microsoft Yahei", "Hiragino Sans GB", "Microsoft Sans Serif", "WenQuanYi Micro Hei", sans-serif; background-color: rgb(255, 255, 255);\"><br style=\"margin: 0px; padding: 0px;\"/></p><h4 data-id=\"heading1\" data-type=\"heading\" top=\"2040\" style=\"margin: 0px; padding: 26px 0px 4px; font-size: 20px; line-height: 36px; color: rgb(53, 53, 53); white-space: pre-wrap; font-family: "Helvetica Neue", "PingFang SC", Verdana, "Microsoft Yahei", "Hiragino Sans GB", "Microsoft Sans Serif", "WenQuanYi Micro Hei", sans-serif; background-color: rgb(255, 255, 255);\">通过 AI 技术实现新的智慧交互体验</h4><p data-type=\"paragraph\" style=\"margin-top: 0px; margin-bottom: 0px; padding: 0px; line-height: 1.875; font-size: 16px; min-height: 30px; white-space: pre-wrap; word-break: break-all; color: rgb(48, 48, 48); font-family: "Helvetica Neue", "PingFang SC", Verdana, "Microsoft Yahei", "Hiragino Sans GB", "Microsoft Sans Serif", "WenQuanYi Micro Hei", sans-serif; background-color: rgb(255, 255, 255);\"><br style=\"margin: 0px; padding: 0px;\"/></p><p data-type=\"paragraph\" style=\"margin-top: 0px; margin-bottom: 0px; padding: 0px; line-height: 1.875; font-size: 16px; min-height: 30px; white-space: pre-wrap; word-break: break-all; color: rgb(48, 48, 48); font-family: "Helvetica Neue", "PingFang SC", Verdana, "Microsoft Yahei", "Hiragino Sans GB", "Microsoft Sans Serif", "WenQuanYi Micro Hei", sans-serif; background-color: rgb(255, 255, 255);\">在即将到来的万物智联时代,更需要新的智慧交互体验。华为消费者业务 AI 与智慧全场景业务部总裁王成录表示。“华为用业界领先的 AI 技术赋能万物智联新时代,让设备、服务、交互三者进行有机地协同组合,给合作伙伴、开发者带来的全新想象空间,为消费者打造全场景智慧生活体验。”</p><p data-type=\"paragraph\" style=\"margin-top: 0px; margin-bottom: 0px; padding: 0px; line-height: 1.875; font-size: 16px; min-height: 30px; white-space: pre-wrap; word-break: break-all; color: rgb(48, 48, 48); font-family: "Helvetica Neue", "PingFang SC", Verdana, "Microsoft Yahei", "Hiragino Sans GB", "Microsoft Sans Serif", "WenQuanYi Micro Hei", sans-serif; background-color: rgb(255, 255, 255);\"><br style=\"margin: 0px; padding: 0px;\"/></p><p data-type=\"paragraph\" style=\"margin-top: 0px; margin-bottom: 0px; padding: 0px; line-height: 1.875; font-size: 16px; min-height: 30px; white-space: pre-wrap; word-break: break-all; color: rgb(48, 48, 48); font-family: "Helvetica Neue", "PingFang SC", Verdana, "Microsoft Yahei", "Hiragino Sans GB", "Microsoft Sans Serif", "WenQuanYi Micro Hei", sans-serif; background-color: rgb(255, 255, 255);\">面向鸿蒙生态的设备和应用服务开发者,华为提供了能让开发者快速、高效、低成本地开发具有智慧 AI 能力的硬件设备及原子化服务。</p><p data-type=\"paragraph\" style=\"margin-top: 0px; margin-bottom: 0px; padding: 0px; line-height: 1.875; font-size: 16px; min-height: 30px; white-space: pre-wrap; word-break: break-all; color: rgb(48, 48, 48); font-family: "Helvetica Neue", "PingFang SC", Verdana, "Microsoft Yahei", "Hiragino Sans GB", "Microsoft Sans Serif", "WenQuanYi Micro Hei", sans-serif; background-color: rgb(255, 255, 255);\"><br style=\"margin: 0px; padding: 0px;\"/></p><p><img src=\"https://static001.infoq.cn/resource/image/d1/39/d1917aaced015010c6c131be84806639.jpg\" style=\"margin: 0px; padding: 0px; border: 0px; vertical-align: top; max-width: 100%; height: auto;\"/></p><p data-type=\"paragraph\" style=\"margin-top: 0px; margin-bottom: 0px; padding: 0px; line-height: 1.875; font-size: 16px; min-height: 30px; white-space: pre-wrap; word-break: break-all; color: rgb(48, 48, 48); font-family: "Helvetica Neue", "PingFang SC", Verdana, "Microsoft Yahei", "Hiragino Sans GB", "Microsoft Sans Serif", "WenQuanYi Micro Hei", sans-serif; background-color: rgb(255, 255, 255);\"><br style=\"margin: 0px; padding: 0px;\"/></p><p data-type=\"paragraph\" style=\"margin-top: 0px; margin-bottom: 0px; padding: 0px; line-height: 1.875; font-size: 16px; min-height: 30px; white-space: pre-wrap; word-break: break-all; color: rgb(48, 48, 48); font-family: "Helvetica Neue", "PingFang SC", Verdana, "Microsoft Yahei", "Hiragino Sans GB", "Microsoft Sans Serif", "WenQuanYi Micro Hei", sans-serif; background-color: rgb(255, 255, 255);\">全新的鸿蒙智联(HarmonyOS Connect)软件服务包 3.0 新增支持垂类应用的带屏设备,并升级了基础服务包、增强服务包以及支持小艺、服务中心、畅连等应用在内的应用服务包,开发者直接调用即可快速开发出具备智慧 AI 能力的设备,预计到 2022 年将全面适配支持丰富应用的带屏设备。</p><p data-type=\"paragraph\" style=\"margin-top: 0px; margin-bottom: 0px; padding: 0px; line-height: 1.875; font-size: 16px; min-height: 30px; white-space: pre-wrap; word-break: break-all; color: rgb(48, 48, 48); font-family: "Helvetica Neue", "PingFang SC", Verdana, "Microsoft Yahei", "Hiragino Sans GB", "Microsoft Sans Serif", "WenQuanYi Micro Hei", sans-serif; background-color: rgb(255, 255, 255);\"><br style=\"margin: 0px; padding: 0px;\"/></p><p data-type=\"paragraph\" style=\"margin-top: 0px; margin-bottom: 0px; padding: 0px; line-height: 1.875; font-size: 16px; min-height: 30px; white-space: pre-wrap; word-break: break-all; color: rgb(48, 48, 48); font-family: "Helvetica Neue", "PingFang SC", Verdana, "Microsoft Yahei", "Hiragino Sans GB", "Microsoft Sans Serif", "WenQuanYi Micro Hei", sans-serif; background-color: rgb(255, 255, 255);\">一站式集成开放环境支持远程开发、按需定制、一键编译和烧录、一键集成服务包和设备仿真器,降低了开发者的接入门槛和开发周期,让开发效率倍增,无屏设备开发周期已由 2 个月减少至 2 周,带屏设备预计 2023 年将缩减到 2 个月以内。</p><p data-type=\"paragraph\" style=\"margin-top: 0px; margin-bottom: 0px; padding: 0px; line-height: 1.875; font-size: 16px; min-height: 30px; white-space: pre-wrap; word-break: break-all; color: rgb(48, 48, 48); font-family: "Helvetica Neue", "PingFang SC", Verdana, "Microsoft Yahei", "Hiragino Sans GB", "Microsoft Sans Serif", "WenQuanYi Micro Hei", sans-serif; background-color: rgb(255, 255, 255);\"><br style=\"margin: 0px; padding: 0px;\"/></p><p data-type=\"paragraph\" style=\"margin-top: 0px; margin-bottom: 0px; padding: 0px; line-height: 1.875; font-size: 16px; min-height: 30px; white-space: pre-wrap; word-break: break-all; color: rgb(48, 48, 48); font-family: "Helvetica Neue", "PingFang SC", Verdana, "Microsoft Yahei", "Hiragino Sans GB", "Microsoft Sans Serif", "WenQuanYi Micro Hei", sans-serif; background-color: rgb(255, 255, 255);\">对于应用与服务开发者,一站式集成开发的应用开发工具提供了超过 50 个原子化服务和卡片模板,支持多端双向预览、低代码开发、分布式模拟仿真以及分布式调测等。目前原子化服务开发效率已由 1 个月缩减至 15 天,预计 2023 年 5 天即可完成开发。</p><p data-type=\"paragraph\" style=\"margin-top: 0px; margin-bottom: 0px; padding: 0px; line-height: 1.875; font-size: 16px; min-height: 30px; white-space: pre-wrap; word-break: break-all; color: rgb(48, 48, 48); font-family: "Helvetica Neue", "PingFang SC", Verdana, "Microsoft Yahei", "Hiragino Sans GB", "Microsoft Sans Serif", "WenQuanYi Micro Hei", sans-serif; background-color: rgb(255, 255, 255);\"><br style=\"margin: 0px; padding: 0px;\"/></p><p data-type=\"paragraph\" style=\"margin-top: 0px; margin-bottom: 0px; padding: 0px; line-height: 1.875; font-size: 16px; min-height: 30px; white-space: pre-wrap; word-break: break-all; color: rgb(48, 48, 48); font-family: "Helvetica Neue", "PingFang SC", Verdana, "Microsoft Yahei", "Hiragino Sans GB", "Microsoft Sans Serif", "WenQuanYi Micro Hei", sans-serif; background-color: rgb(255, 255, 255);\">王成录表示,欢迎更多合作伙伴和开发者加入鸿蒙生态,持续添砖加瓦,开启万物智联的新时代。</p><p><br/></p>', 'HarmonyOS', '0', '0', '1', '2021-10-24 15:29:01', '2021-10-24 15:29:01', '6', '1', '', '');
INSERT INTO `tb_post` VALUES ('23', '1', '华为发布 HarmonyOS 3 开发者预览版,将推出为 HarmonyOS 全新研发的编程语言', 'https://www.infoq.cn/news/8r3lsBU3yU1mQOdoZti6', '<p data-type=\"paragraph\" style=\"margin-top: 0px; margin-bottom: 0px; padding: 0px; line-height: 1.875; font-size: 16px; min-height: 30px; white-space: pre-wrap; word-break: break-all; color: rgb(48, 48, 48); font-family: "Helvetica Neue", "PingFang SC", Verdana, "Microsoft Yahei", "Hiragino Sans GB", "Microsoft Sans Serif", "WenQuanYi Micro Hei", sans-serif; background-color: rgb(255, 255, 255);\">10 月 22 日,华为开发者大会 2021(Together)在东莞举办,华为常务董事,消费者业务 CEO,智能汽车解决方案 BU CEO 余承东宣布,HarmonyOS 设备数量超 1.5 亿,成为史上发展最快的终端操作系统。</p><p data-type=\"paragraph\" style=\"margin-top: 0px; margin-bottom: 0px; padding: 0px; line-height: 1.875; font-size: 16px; min-height: 30px; white-space: pre-wrap; word-break: break-all; color: rgb(48, 48, 48); font-family: "Helvetica Neue", "PingFang SC", Verdana, "Microsoft Yahei", "Hiragino Sans GB", "Microsoft Sans Serif", "WenQuanYi Micro Hei", sans-serif; background-color: rgb(255, 255, 255);\"><br style=\"margin: 0px; padding: 0px;\"/></p><p data-type=\"paragraph\" style=\"margin-top: 0px; margin-bottom: 0px; padding: 0px; line-height: 1.875; font-size: 16px; min-height: 30px; white-space: pre-wrap; word-break: break-all; color: rgb(48, 48, 48); font-family: "Helvetica Neue", "PingFang SC", Verdana, "Microsoft Yahei", "Hiragino Sans GB", "Microsoft Sans Serif", "WenQuanYi Micro Hei", sans-serif; background-color: rgb(255, 255, 255);\">会上,华为消费者业务软件部总裁龚体正式发布 HarmonyOS 3 开发者预览版,HarmonyOS 3 Beta 预计将在 2022 年第一季度发布。同时,他表示在不久的将来,<span data-type=\"strong\" style=\"margin: 0px; padding: 0px; font-weight: 700;\">将带来为 HarmonyOS 全新研发的编程语言</span>,为鸿蒙生态基础设施补上最后一环。</p><h4 data-id=\"heading0\" data-type=\"heading\" top=\"1055\" style=\"margin: 0px; padding: 26px 0px 4px; font-size: 20px; line-height: 36px; color: rgb(53, 53, 53); white-space: pre-wrap; font-family: "Helvetica Neue", "PingFang SC", Verdana, "Microsoft Yahei", "Hiragino Sans GB", "Microsoft Sans Serif", "WenQuanYi Micro Hei", sans-serif; background-color: rgb(255, 255, 255);\">围绕“弹性部署、超级终端、一次开发多端部署”继续演进</h4><p data-type=\"paragraph\" style=\"margin-top: 0px; margin-bottom: 0px; padding: 0px; line-height: 1.875; font-size: 16px; min-height: 30px; white-space: pre-wrap; word-break: break-all; color: rgb(48, 48, 48); font-family: "Helvetica Neue", "PingFang SC", Verdana, "Microsoft Yahei", "Hiragino Sans GB", "Microsoft Sans Serif", "WenQuanYi Micro Hei", sans-serif; background-color: rgb(255, 255, 255);\"><br style=\"margin: 0px; padding: 0px;\"/></p><p data-type=\"paragraph\" style=\"margin-top: 0px; margin-bottom: 0px; padding: 0px; line-height: 1.875; font-size: 16px; min-height: 30px; white-space: pre-wrap; word-break: break-all; color: rgb(48, 48, 48); font-family: "Helvetica Neue", "PingFang SC", Verdana, "Microsoft Yahei", "Hiragino Sans GB", "Microsoft Sans Serif", "WenQuanYi Micro Hei", sans-serif; background-color: rgb(255, 255, 255);\">据介绍,HarmonyOS 3 开发者预览版,围绕弹性部署、超级终端、一次开发多端部署三个核心价值再创新,系统性能和开发工具全面升级。</p><p data-type=\"paragraph\" style=\"margin-top: 0px; margin-bottom: 0px; padding: 0px; line-height: 1.875; font-size: 16px; min-height: 30px; white-space: pre-wrap; word-break: break-all; color: rgb(48, 48, 48); font-family: "Helvetica Neue", "PingFang SC", Verdana, "Microsoft Yahei", "Hiragino Sans GB", "Microsoft Sans Serif", "WenQuanYi Micro Hei", sans-serif; background-color: rgb(255, 255, 255);\"><br style=\"margin: 0px; padding: 0px;\"/></p><p data-type=\"paragraph\" style=\"margin-top: 0px; margin-bottom: 0px; padding: 0px; line-height: 1.875; font-size: 16px; min-height: 30px; white-space: pre-wrap; word-break: break-all; color: rgb(48, 48, 48); font-family: "Helvetica Neue", "PingFang SC", Verdana, "Microsoft Yahei", "Hiragino Sans GB", "Microsoft Sans Serif", "WenQuanYi Micro Hei", sans-serif; background-color: rgb(255, 255, 255);\">HarmonyOS 的系统架构可以实现弹性部署,让不同内存的智能设备都使用同一语言交流。HarmonyOS 3 开发者预览版带来了全新的可视的弹性部署自动化工具,设备开发者可以根据不同硬件灵活选择操作系统所需组件,让更多的设备能够更简单地搭载 HarmonyOS。据悉,<span data-type=\"strong\" style=\"margin: 0px; padding: 0px; font-weight: 700;\">弹性部署自动化工具未来也会开源,以让更多的设备用得到这个工具。</span></p><p data-type=\"paragraph\" style=\"margin-top: 0px; margin-bottom: 0px; padding: 0px; line-height: 1.875; font-size: 16px; min-height: 30px; white-space: pre-wrap; word-break: break-all; color: rgb(48, 48, 48); font-family: "Helvetica Neue", "PingFang SC", Verdana, "Microsoft Yahei", "Hiragino Sans GB", "Microsoft Sans Serif", "WenQuanYi Micro Hei", sans-serif; background-color: rgb(255, 255, 255);\"><br style=\"margin: 0px; padding: 0px;\"/></p><p data-type=\"paragraph\" style=\"margin-top: 0px; margin-bottom: 0px; padding: 0px; line-height: 1.875; font-size: 16px; min-height: 30px; white-space: pre-wrap; word-break: break-all; color: rgb(48, 48, 48); font-family: "Helvetica Neue", "PingFang SC", Verdana, "Microsoft Yahei", "Hiragino Sans GB", "Microsoft Sans Serif", "WenQuanYi Micro Hei", sans-serif; background-color: rgb(255, 255, 255);\">分布式技术一直是 HarmonyOS 的能力核心,能够让多个设备自由组合,在系统层融合成一个超级终端。每个设备都能成为互相的功能模块,实现能力互助,资源共享。本次发布的 HarmonyOS 3 开发者预览版带来创新的异构组网技术,让分布式能力支撑更多设备、更佳性能,打造更坚固的超级终端底座。比如,手机、智慧屏、4 台音箱可以组合成 6 个设备的超级终端,让手机视频也可以享受超大屏幕和 5.1 声道影院级体验;手机、平板、PC 组合带来升级版多屏协同,三屏协作提升办公效率。</p><p data-type=\"paragraph\" style=\"margin-top: 0px; margin-bottom: 0px; padding: 0px; line-height: 1.875; font-size: 16px; min-height: 30px; white-space: pre-wrap; word-break: break-all; color: rgb(48, 48, 48); font-family: "Helvetica Neue", "PingFang SC", Verdana, "Microsoft Yahei", "Hiragino Sans GB", "Microsoft Sans Serif", "WenQuanYi Micro Hei", sans-serif; background-color: rgb(255, 255, 255);\"><br style=\"margin: 0px; padding: 0px;\"/></p><p data-type=\"paragraph\" style=\"margin-top: 0px; margin-bottom: 0px; padding: 0px; line-height: 1.875; font-size: 16px; min-height: 30px; white-space: pre-wrap; word-break: break-all; color: rgb(48, 48, 48); font-family: "Helvetica Neue", "PingFang SC", Verdana, "Microsoft Yahei", "Hiragino Sans GB", "Microsoft Sans Serif", "WenQuanYi Micro Hei", sans-serif; background-color: rgb(255, 255, 255);\">随着全新的 HarmonyOS 3 开发者预览版发布,HarmonyOS 应用与服务开发工具套件全家桶也全面升级,端到端帮助开发者高效率、低成本地完成跨端应用与服务的开发。</p><p data-type=\"paragraph\" style=\"margin-top: 0px; margin-bottom: 0px; padding: 0px; line-height: 1.875; font-size: 16px; min-height: 30px; white-space: pre-wrap; word-break: break-all; color: rgb(48, 48, 48); font-family: "Helvetica Neue", "PingFang SC", Verdana, "Microsoft Yahei", "Hiragino Sans GB", "Microsoft Sans Serif", "WenQuanYi Micro Hei", sans-serif; background-color: rgb(255, 255, 255);\"><br style=\"margin: 0px; padding: 0px;\"/></p><p data-type=\"paragraph\" style=\"margin-top: 0px; margin-bottom: 0px; padding: 0px; line-height: 1.875; font-size: 16px; min-height: 30px; white-space: pre-wrap; word-break: break-all; color: rgb(48, 48, 48); font-family: "Helvetica Neue", "PingFang SC", Verdana, "Microsoft Yahei", "Hiragino Sans GB", "Microsoft Sans Serif", "WenQuanYi Micro Hei", sans-serif; background-color: rgb(255, 255, 255);\">其中,Harmony 设计系统(Harmony Design System)提供完整面向多端设备的设计规范、原子化自适应布局能力插件、支持不同设备的服务卡片模板等设计工具,让不同设备达到一致的视觉体验的同时保持整体设计语言的一致性。</p><p data-type=\"paragraph\" style=\"margin-top: 0px; margin-bottom: 0px; padding: 0px; line-height: 1.875; font-size: 16px; min-height: 30px; white-space: pre-wrap; word-break: break-all; color: rgb(48, 48, 48); font-family: "Helvetica Neue", "PingFang SC", Verdana, "Microsoft Yahei", "Hiragino Sans GB", "Microsoft Sans Serif", "WenQuanYi Micro Hei", sans-serif; background-color: rgb(255, 255, 255);\"><br style=\"margin: 0px; padding: 0px;\"/></p><p><img src=\"https://static001.infoq.cn/resource/image/98/0a/98078f10b3cc12be36fe008b5ec10e0a.jpg\" style=\"margin: 0px; padding: 0px; border: 0px; vertical-align: top; max-width: 100%; height: auto;\"/></p><p data-type=\"paragraph\" style=\"margin-top: 0px; margin-bottom: 0px; padding: 0px; line-height: 1.875; font-size: 16px; min-height: 30px; white-space: pre-wrap; word-break: break-all; color: rgb(48, 48, 48); font-family: "Helvetica Neue", "PingFang SC", Verdana, "Microsoft Yahei", "Hiragino Sans GB", "Microsoft Sans Serif", "WenQuanYi Micro Hei", sans-serif; background-color: rgb(255, 255, 255);\"><br style=\"margin: 0px; padding: 0px;\"/></p><p data-type=\"paragraph\" style=\"margin-top: 0px; margin-bottom: 0px; padding: 0px; line-height: 1.875; font-size: 16px; min-height: 30px; white-space: pre-wrap; word-break: break-all; color: rgb(48, 48, 48); font-family: "Helvetica Neue", "PingFang SC", Verdana, "Microsoft Yahei", "Hiragino Sans GB", "Microsoft Sans Serif", "WenQuanYi Micro Hei", sans-serif; background-color: rgb(255, 255, 255);\">方舟开发框架 3.0(ArkUI 3.0)带来全新声明式 UI 框架,使用 TS/JS 语言,减少跨端应用前端开发设计代码量,效率、性能均大幅度提升;方舟编译器 3.0(ArkCompiler 3.0)实现跨设备统一编译,只需一次编译即可跨端运行;DevEco Studio 3.0 带来高效率编码、跨端协同调测、多设备集成测试等工具升级,有效提升跨端应用开发效率;HarmonyOS SDK 开放 6000+ TS/JS API 能力,支持跨端分布式体验高效开发。龚体举例道,一次开发、多端部署的能力帮助新浪新闻、Wish 107.5 等全球多个头部应用快速覆盖多设备。</p><p data-type=\"paragraph\" style=\"margin-top: 0px; margin-bottom: 0px; padding: 0px; line-height: 1.875; font-size: 16px; min-height: 30px; white-space: pre-wrap; word-break: break-all; color: rgb(48, 48, 48); font-family: "Helvetica Neue", "PingFang SC", Verdana, "Microsoft Yahei", "Hiragino Sans GB", "Microsoft Sans Serif", "WenQuanYi Micro Hei", sans-serif; background-color: rgb(255, 255, 255);\"><br style=\"margin: 0px; padding: 0px;\"/></p><h4 data-id=\"heading1\" data-type=\"heading\" top=\"2040\" style=\"margin: 0px; padding: 26px 0px 4px; font-size: 20px; line-height: 36px; color: rgb(53, 53, 53); white-space: pre-wrap; font-family: "Helvetica Neue", "PingFang SC", Verdana, "Microsoft Yahei", "Hiragino Sans GB", "Microsoft Sans Serif", "WenQuanYi Micro Hei", sans-serif; background-color: rgb(255, 255, 255);\">通过 AI 技术实现新的智慧交互体验</h4><p data-type=\"paragraph\" style=\"margin-top: 0px; margin-bottom: 0px; padding: 0px; line-height: 1.875; font-size: 16px; min-height: 30px; white-space: pre-wrap; word-break: break-all; color: rgb(48, 48, 48); font-family: "Helvetica Neue", "PingFang SC", Verdana, "Microsoft Yahei", "Hiragino Sans GB", "Microsoft Sans Serif", "WenQuanYi Micro Hei", sans-serif; background-color: rgb(255, 255, 255);\"><br style=\"margin: 0px; padding: 0px;\"/></p><p data-type=\"paragraph\" style=\"margin-top: 0px; margin-bottom: 0px; padding: 0px; line-height: 1.875; font-size: 16px; min-height: 30px; white-space: pre-wrap; word-break: break-all; color: rgb(48, 48, 48); font-family: "Helvetica Neue", "PingFang SC", Verdana, "Microsoft Yahei", "Hiragino Sans GB", "Microsoft Sans Serif", "WenQuanYi Micro Hei", sans-serif; background-color: rgb(255, 255, 255);\">在即将到来的万物智联时代,更需要新的智慧交互体验。华为消费者业务 AI 与智慧全场景业务部总裁王成录表示。“华为用业界领先的 AI 技术赋能万物智联新时代,让设备、服务、交互三者进行有机地协同组合,给合作伙伴、开发者带来的全新想象空间,为消费者打造全场景智慧生活体验。”</p><p data-type=\"paragraph\" style=\"margin-top: 0px; margin-bottom: 0px; padding: 0px; line-height: 1.875; font-size: 16px; min-height: 30px; white-space: pre-wrap; word-break: break-all; color: rgb(48, 48, 48); font-family: "Helvetica Neue", "PingFang SC", Verdana, "Microsoft Yahei", "Hiragino Sans GB", "Microsoft Sans Serif", "WenQuanYi Micro Hei", sans-serif; background-color: rgb(255, 255, 255);\"><br style=\"margin: 0px; padding: 0px;\"/></p><p data-type=\"paragraph\" style=\"margin-top: 0px; margin-bottom: 0px; padding: 0px; line-height: 1.875; font-size: 16px; min-height: 30px; white-space: pre-wrap; word-break: break-all; color: rgb(48, 48, 48); font-family: "Helvetica Neue", "PingFang SC", Verdana, "Microsoft Yahei", "Hiragino Sans GB", "Microsoft Sans Serif", "WenQuanYi Micro Hei", sans-serif; background-color: rgb(255, 255, 255);\">面向鸿蒙生态的设备和应用服务开发者,华为提供了能让开发者快速、高效、低成本地开发具有智慧 AI 能力的硬件设备及原子化服务。</p><p data-type=\"paragraph\" style=\"margin-top: 0px; margin-bottom: 0px; padding: 0px; line-height: 1.875; font-size: 16px; min-height: 30px; white-space: pre-wrap; word-break: break-all; color: rgb(48, 48, 48); font-family: "Helvetica Neue", "PingFang SC", Verdana, "Microsoft Yahei", "Hiragino Sans GB", "Microsoft Sans Serif", "WenQuanYi Micro Hei", sans-serif; background-color: rgb(255, 255, 255);\"><br style=\"margin: 0px; padding: 0px;\"/></p><p><img src=\"https://static001.infoq.cn/resource/image/d1/39/d1917aaced015010c6c131be84806639.jpg\" style=\"margin: 0px; padding: 0px; border: 0px; vertical-align: top; max-width: 100%; height: auto;\"/></p><p data-type=\"paragraph\" style=\"margin-top: 0px; margin-bottom: 0px; padding: 0px; line-height: 1.875; font-size: 16px; min-height: 30px; white-space: pre-wrap; word-break: break-all; color: rgb(48, 48, 48); font-family: "Helvetica Neue", "PingFang SC", Verdana, "Microsoft Yahei", "Hiragino Sans GB", "Microsoft Sans Serif", "WenQuanYi Micro Hei", sans-serif; background-color: rgb(255, 255, 255);\"><br style=\"margin: 0px; padding: 0px;\"/></p><p data-type=\"paragraph\" style=\"margin-top: 0px; margin-bottom: 0px; padding: 0px; line-height: 1.875; font-size: 16px; min-height: 30px; white-space: pre-wrap; word-break: break-all; color: rgb(48, 48, 48); font-family: "Helvetica Neue", "PingFang SC", Verdana, "Microsoft Yahei", "Hiragino Sans GB", "Microsoft Sans Serif", "WenQuanYi Micro Hei", sans-serif; background-color: rgb(255, 255, 255);\">全新的鸿蒙智联(HarmonyOS Connect)软件服务包 3.0 新增支持垂类应用的带屏设备,并升级了基础服务包、增强服务包以及支持小艺、服务中心、畅连等应用在内的应用服务包,开发者直接调用即可快速开发出具备智慧 AI 能力的设备,预计到 2022 年将全面适配支持丰富应用的带屏设备。</p><p data-type=\"paragraph\" style=\"margin-top: 0px; margin-bottom: 0px; padding: 0px; line-height: 1.875; font-size: 16px; min-height: 30px; white-space: pre-wrap; word-break: break-all; color: rgb(48, 48, 48); font-family: "Helvetica Neue", "PingFang SC", Verdana, "Microsoft Yahei", "Hiragino Sans GB", "Microsoft Sans Serif", "WenQuanYi Micro Hei", sans-serif; background-color: rgb(255, 255, 255);\"><br style=\"margin: 0px; padding: 0px;\"/></p><p data-type=\"paragraph\" style=\"margin-top: 0px; margin-bottom: 0px; padding: 0px; line-height: 1.875; font-size: 16px; min-height: 30px; white-space: pre-wrap; word-break: break-all; color: rgb(48, 48, 48); font-family: "Helvetica Neue", "PingFang SC", Verdana, "Microsoft Yahei", "Hiragino Sans GB", "Microsoft Sans Serif", "WenQuanYi Micro Hei", sans-serif; background-color: rgb(255, 255, 255);\">一站式集成开放环境支持远程开发、按需定制、一键编译和烧录、一键集成服务包和设备仿真器,降低了开发者的接入门槛和开发周期,让开发效率倍增,无屏设备开发周期已由 2 个月减少至 2 周,带屏设备预计 2023 年将缩减到 2 个月以内。</p><p data-type=\"paragraph\" style=\"margin-top: 0px; margin-bottom: 0px; padding: 0px; line-height: 1.875; font-size: 16px; min-height: 30px; white-space: pre-wrap; word-break: break-all; color: rgb(48, 48, 48); font-family: "Helvetica Neue", "PingFang SC", Verdana, "Microsoft Yahei", "Hiragino Sans GB", "Microsoft Sans Serif", "WenQuanYi Micro Hei", sans-serif; background-color: rgb(255, 255, 255);\"><br style=\"margin: 0px; padding: 0px;\"/></p><p data-type=\"paragraph\" style=\"margin-top: 0px; margin-bottom: 0px; padding: 0px; line-height: 1.875; font-size: 16px; min-height: 30px; white-space: pre-wrap; word-break: break-all; color: rgb(48, 48, 48); font-family: "Helvetica Neue", "PingFang SC", Verdana, "Microsoft Yahei", "Hiragino Sans GB", "Microsoft Sans Serif", "WenQuanYi Micro Hei", sans-serif; background-color: rgb(255, 255, 255);\">对于应用与服务开发者,一站式集成开发的应用开发工具提供了超过 50 个原子化服务和卡片模板,支持多端双向预览、低代码开发、分布式模拟仿真以及分布式调测等。目前原子化服务开发效率已由 1 个月缩减至 15 天,预计 2023 年 5 天即可完成开发。</p><p data-type=\"paragraph\" style=\"margin-top: 0px; margin-bottom: 0px; padding: 0px; line-height: 1.875; font-size: 16px; min-height: 30px; white-space: pre-wrap; word-break: break-all; color: rgb(48, 48, 48); font-family: "Helvetica Neue", "PingFang SC", Verdana, "Microsoft Yahei", "Hiragino Sans GB", "Microsoft Sans Serif", "WenQuanYi Micro Hei", sans-serif; background-color: rgb(255, 255, 255);\"><br style=\"margin: 0px; padding: 0px;\"/></p><p data-type=\"paragraph\" style=\"margin-top: 0px; margin-bottom: 0px; padding: 0px; line-height: 1.875; font-size: 16px; min-height: 30px; white-space: pre-wrap; word-break: break-all; color: rgb(48, 48, 48); font-family: "Helvetica Neue", "PingFang SC", Verdana, "Microsoft Yahei", "Hiragino Sans GB", "Microsoft Sans Serif", "WenQuanYi Micro Hei", sans-serif; background-color: rgb(255, 255, 255);\">王成录表示,欢迎更多合作伙伴和开发者加入鸿蒙生态,持续添砖加瓦,开启万物智联的新时代。</p><p><br/></p>', 'HarmonyOS', '0', '0', '1', '2021-10-24 15:29:28', '2021-10-24 15:29:28', '6', '1', '', '');
INSERT INTO `tb_post` VALUES ('24', '1', '华为发布 HarmonyOS 3 开发者预览版,将推出为 HarmonyOS 全新研发的编程语言', 'https://www.infoq.cn/news/8r3lsBU3yU1mQOdoZti6', '<p data-type=\"paragraph\" style=\"margin-top: 0px; margin-bottom: 0px; padding: 0px; line-height: 1.875; font-size: 16px; min-height: 30px; white-space: pre-wrap; word-break: break-all; color: rgb(48, 48, 48); font-family: "Helvetica Neue", "PingFang SC", Verdana, "Microsoft Yahei", "Hiragino Sans GB", "Microsoft Sans Serif", "WenQuanYi Micro Hei", sans-serif; background-color: rgb(255, 255, 255);\">10 月 22 日,华为开发者大会 2021(Together)在东莞举办,华为常务董事,消费者业务 CEO,智能汽车解决方案 BU CEO 余承东宣布,HarmonyOS 设备数量超 1.5 亿,成为史上发展最快的终端操作系统。</p><p data-type=\"paragraph\" style=\"margin-top: 0px; margin-bottom: 0px; padding: 0px; line-height: 1.875; font-size: 16px; min-height: 30px; white-space: pre-wrap; word-break: break-all; color: rgb(48, 48, 48); font-family: "Helvetica Neue", "PingFang SC", Verdana, "Microsoft Yahei", "Hiragino Sans GB", "Microsoft Sans Serif", "WenQuanYi Micro Hei", sans-serif; background-color: rgb(255, 255, 255);\"><br style=\"margin: 0px; padding: 0px;\"/></p><p data-type=\"paragraph\" style=\"margin-top: 0px; margin-bottom: 0px; padding: 0px; line-height: 1.875; font-size: 16px; min-height: 30px; white-space: pre-wrap; word-break: break-all; color: rgb(48, 48, 48); font-family: "Helvetica Neue", "PingFang SC", Verdana, "Microsoft Yahei", "Hiragino Sans GB", "Microsoft Sans Serif", "WenQuanYi Micro Hei", sans-serif; background-color: rgb(255, 255, 255);\">会上,华为消费者业务软件部总裁龚体正式发布 HarmonyOS 3 开发者预览版,HarmonyOS 3 Beta 预计将在 2022 年第一季度发布。同时,他表示在不久的将来,<span data-type=\"strong\" style=\"margin: 0px; padding: 0px; font-weight: 700;\">将带来为 HarmonyOS 全新研发的编程语言</span>,为鸿蒙生态基础设施补上最后一环。</p><h4 data-id=\"heading0\" data-type=\"heading\" top=\"1055\" style=\"margin: 0px; padding: 26px 0px 4px; font-size: 20px; line-height: 36px; color: rgb(53, 53, 53); white-space: pre-wrap; font-family: "Helvetica Neue", "PingFang SC", Verdana, "Microsoft Yahei", "Hiragino Sans GB", "Microsoft Sans Serif", "WenQuanYi Micro Hei", sans-serif; background-color: rgb(255, 255, 255);\">围绕“弹性部署、超级终端、一次开发多端部署”继续演进</h4><p data-type=\"paragraph\" style=\"margin-top: 0px; margin-bottom: 0px; padding: 0px; line-height: 1.875; font-size: 16px; min-height: 30px; white-space: pre-wrap; word-break: break-all; color: rgb(48, 48, 48); font-family: "Helvetica Neue", "PingFang SC", Verdana, "Microsoft Yahei", "Hiragino Sans GB", "Microsoft Sans Serif", "WenQuanYi Micro Hei", sans-serif; background-color: rgb(255, 255, 255);\"><br style=\"margin: 0px; padding: 0px;\"/></p><p data-type=\"paragraph\" style=\"margin-top: 0px; margin-bottom: 0px; padding: 0px; line-height: 1.875; font-size: 16px; min-height: 30px; white-space: pre-wrap; word-break: break-all; color: rgb(48, 48, 48); font-family: "Helvetica Neue", "PingFang SC", Verdana, "Microsoft Yahei", "Hiragino Sans GB", "Microsoft Sans Serif", "WenQuanYi Micro Hei", sans-serif; background-color: rgb(255, 255, 255);\">据介绍,HarmonyOS 3 开发者预览版,围绕弹性部署、超级终端、一次开发多端部署三个核心价值再创新,系统性能和开发工具全面升级。</p><p data-type=\"paragraph\" style=\"margin-top: 0px; margin-bottom: 0px; padding: 0px; line-height: 1.875; font-size: 16px; min-height: 30px; white-space: pre-wrap; word-break: break-all; color: rgb(48, 48, 48); font-family: "Helvetica Neue", "PingFang SC", Verdana, "Microsoft Yahei", "Hiragino Sans GB", "Microsoft Sans Serif", "WenQuanYi Micro Hei", sans-serif; background-color: rgb(255, 255, 255);\"><br style=\"margin: 0px; padding: 0px;\"/></p><p data-type=\"paragraph\" style=\"margin-top: 0px; margin-bottom: 0px; padding: 0px; line-height: 1.875; font-size: 16px; min-height: 30px; white-space: pre-wrap; word-break: break-all; color: rgb(48, 48, 48); font-family: "Helvetica Neue", "PingFang SC", Verdana, "Microsoft Yahei", "Hiragino Sans GB", "Microsoft Sans Serif", "WenQuanYi Micro Hei", sans-serif; background-color: rgb(255, 255, 255);\">HarmonyOS 的系统架构可以实现弹性部署,让不同内存的智能设备都使用同一语言交流。HarmonyOS 3 开发者预览版带来了全新的可视的弹性部署自动化工具,设备开发者可以根据不同硬件灵活选择操作系统所需组件,让更多的设备能够更简单地搭载 HarmonyOS。据悉,<span data-type=\"strong\" style=\"margin: 0px; padding: 0px; font-weight: 700;\">弹性部署自动化工具未来也会开源,以让更多的设备用得到这个工具。</span></p><p data-type=\"paragraph\" style=\"margin-top: 0px; margin-bottom: 0px; padding: 0px; line-height: 1.875; font-size: 16px; min-height: 30px; white-space: pre-wrap; word-break: break-all; color: rgb(48, 48, 48); font-family: "Helvetica Neue", "PingFang SC", Verdana, "Microsoft Yahei", "Hiragino Sans GB", "Microsoft Sans Serif", "WenQuanYi Micro Hei", sans-serif; background-color: rgb(255, 255, 255);\"><br style=\"margin: 0px; padding: 0px;\"/></p><p data-type=\"paragraph\" style=\"margin-top: 0px; margin-bottom: 0px; padding: 0px; line-height: 1.875; font-size: 16px; min-height: 30px; white-space: pre-wrap; word-break: break-all; color: rgb(48, 48, 48); font-family: "Helvetica Neue", "PingFang SC", Verdana, "Microsoft Yahei", "Hiragino Sans GB", "Microsoft Sans Serif", "WenQuanYi Micro Hei", sans-serif; background-color: rgb(255, 255, 255);\">分布式技术一直是 HarmonyOS 的能力核心,能够让多个设备自由组合,在系统层融合成一个超级终端。每个设备都能成为互相的功能模块,实现能力互助,资源共享。本次发布的 HarmonyOS 3 开发者预览版带来创新的异构组网技术,让分布式能力支撑更多设备、更佳性能,打造更坚固的超级终端底座。比如,手机、智慧屏、4 台音箱可以组合成 6 个设备的超级终端,让手机视频也可以享受超大屏幕和 5.1 声道影院级体验;手机、平板、PC 组合带来升级版多屏协同,三屏协作提升办公效率。</p><p data-type=\"paragraph\" style=\"margin-top: 0px; margin-bottom: 0px; padding: 0px; line-height: 1.875; font-size: 16px; min-height: 30px; white-space: pre-wrap; word-break: break-all; color: rgb(48, 48, 48); font-family: "Helvetica Neue", "PingFang SC", Verdana, "Microsoft Yahei", "Hiragino Sans GB", "Microsoft Sans Serif", "WenQuanYi Micro Hei", sans-serif; background-color: rgb(255, 255, 255);\"><br style=\"margin: 0px; padding: 0px;\"/></p><p data-type=\"paragraph\" style=\"margin-top: 0px; margin-bottom: 0px; padding: 0px; line-height: 1.875; font-size: 16px; min-height: 30px; white-space: pre-wrap; word-break: break-all; color: rgb(48, 48, 48); font-family: "Helvetica Neue", "PingFang SC", Verdana, "Microsoft Yahei", "Hiragino Sans GB", "Microsoft Sans Serif", "WenQuanYi Micro Hei", sans-serif; background-color: rgb(255, 255, 255);\">随着全新的 HarmonyOS 3 开发者预览版发布,HarmonyOS 应用与服务开发工具套件全家桶也全面升级,端到端帮助开发者高效率、低成本地完成跨端应用与服务的开发。</p><p data-type=\"paragraph\" style=\"margin-top: 0px; margin-bottom: 0px; padding: 0px; line-height: 1.875; font-size: 16px; min-height: 30px; white-space: pre-wrap; word-break: break-all; color: rgb(48, 48, 48); font-family: "Helvetica Neue", "PingFang SC", Verdana, "Microsoft Yahei", "Hiragino Sans GB", "Microsoft Sans Serif", "WenQuanYi Micro Hei", sans-serif; background-color: rgb(255, 255, 255);\"><br style=\"margin: 0px; padding: 0px;\"/></p><p data-type=\"paragraph\" style=\"margin-top: 0px; margin-bottom: 0px; padding: 0px; line-height: 1.875; font-size: 16px; min-height: 30px; white-space: pre-wrap; word-break: break-all; color: rgb(48, 48, 48); font-family: "Helvetica Neue", "PingFang SC", Verdana, "Microsoft Yahei", "Hiragino Sans GB", "Microsoft Sans Serif", "WenQuanYi Micro Hei", sans-serif; background-color: rgb(255, 255, 255);\">其中,Harmony 设计系统(Harmony Design System)提供完整面向多端设备的设计规范、原子化自适应布局能力插件、支持不同设备的服务卡片模板等设计工具,让不同设备达到一致的视觉体验的同时保持整体设计语言的一致性。</p><p data-type=\"paragraph\" style=\"margin-top: 0px; margin-bottom: 0px; padding: 0px; line-height: 1.875; font-size: 16px; min-height: 30px; white-space: pre-wrap; word-break: break-all; color: rgb(48, 48, 48); font-family: "Helvetica Neue", "PingFang SC", Verdana, "Microsoft Yahei", "Hiragino Sans GB", "Microsoft Sans Serif", "WenQuanYi Micro Hei", sans-serif; background-color: rgb(255, 255, 255);\"><br style=\"margin: 0px; padding: 0px;\"/></p><p><img src=\"https://static001.infoq.cn/resource/image/98/0a/98078f10b3cc12be36fe008b5ec10e0a.jpg\" style=\"margin: 0px; padding: 0px; border: 0px; vertical-align: top; max-width: 100%; height: auto;\"/></p><p data-type=\"paragraph\" style=\"margin-top: 0px; margin-bottom: 0px; padding: 0px; line-height: 1.875; font-size: 16px; min-height: 30px; white-space: pre-wrap; word-break: break-all; color: rgb(48, 48, 48); font-family: "Helvetica Neue", "PingFang SC", Verdana, "Microsoft Yahei", "Hiragino Sans GB", "Microsoft Sans Serif", "WenQuanYi Micro Hei", sans-serif; background-color: rgb(255, 255, 255);\"><br style=\"margin: 0px; padding: 0px;\"/></p><p data-type=\"paragraph\" style=\"margin-top: 0px; margin-bottom: 0px; padding: 0px; line-height: 1.875; font-size: 16px; min-height: 30px; white-space: pre-wrap; word-break: break-all; color: rgb(48, 48, 48); font-family: "Helvetica Neue", "PingFang SC", Verdana, "Microsoft Yahei", "Hiragino Sans GB", "Microsoft Sans Serif", "WenQuanYi Micro Hei", sans-serif; background-color: rgb(255, 255, 255);\">方舟开发框架 3.0(ArkUI 3.0)带来全新声明式 UI 框架,使用 TS/JS 语言,减少跨端应用前端开发设计代码量,效率、性能均大幅度提升;方舟编译器 3.0(ArkCompiler 3.0)实现跨设备统一编译,只需一次编译即可跨端运行;DevEco Studio 3.0 带来高效率编码、跨端协同调测、多设备集成测试等工具升级,有效提升跨端应用开发效率;HarmonyOS SDK 开放 6000+ TS/JS API 能力,支持跨端分布式体验高效开发。龚体举例道,一次开发、多端部署的能力帮助新浪新闻、Wish 107.5 等全球多个头部应用快速覆盖多设备。</p><p data-type=\"paragraph\" style=\"margin-top: 0px; margin-bottom: 0px; padding: 0px; line-height: 1.875; font-size: 16px; min-height: 30px; white-space: pre-wrap; word-break: break-all; color: rgb(48, 48, 48); font-family: "Helvetica Neue", "PingFang SC", Verdana, "Microsoft Yahei", "Hiragino Sans GB", "Microsoft Sans Serif", "WenQuanYi Micro Hei", sans-serif; background-color: rgb(255, 255, 255);\"><br style=\"margin: 0px; padding: 0px;\"/></p><h4 data-id=\"heading1\" data-type=\"heading\" top=\"2040\" style=\"margin: 0px; padding: 26px 0px 4px; font-size: 20px; line-height: 36px; color: rgb(53, 53, 53); white-space: pre-wrap; font-family: "Helvetica Neue", "PingFang SC", Verdana, "Microsoft Yahei", "Hiragino Sans GB", "Microsoft Sans Serif", "WenQuanYi Micro Hei", sans-serif; background-color: rgb(255, 255, 255);\">通过 AI 技术实现新的智慧交互体验</h4><p data-type=\"paragraph\" style=\"margin-top: 0px; margin-bottom: 0px; padding: 0px; line-height: 1.875; font-size: 16px; min-height: 30px; white-space: pre-wrap; word-break: break-all; color: rgb(48, 48, 48); font-family: "Helvetica Neue", "PingFang SC", Verdana, "Microsoft Yahei", "Hiragino Sans GB", "Microsoft Sans Serif", "WenQuanYi Micro Hei", sans-serif; background-color: rgb(255, 255, 255);\"><br style=\"margin: 0px; padding: 0px;\"/></p><p data-type=\"paragraph\" style=\"margin-top: 0px; margin-bottom: 0px; padding: 0px; line-height: 1.875; font-size: 16px; min-height: 30px; white-space: pre-wrap; word-break: break-all; color: rgb(48, 48, 48); font-family: "Helvetica Neue", "PingFang SC", Verdana, "Microsoft Yahei", "Hiragino Sans GB", "Microsoft Sans Serif", "WenQuanYi Micro Hei", sans-serif; background-color: rgb(255, 255, 255);\">在即将到来的万物智联时代,更需要新的智慧交互体验。华为消费者业务 AI 与智慧全场景业务部总裁王成录表示。“华为用业界领先的 AI 技术赋能万物智联新时代,让设备、服务、交互三者进行有机地协同组合,给合作伙伴、开发者带来的全新想象空间,为消费者打造全场景智慧生活体验。”</p><p data-type=\"paragraph\" style=\"margin-top: 0px; margin-bottom: 0px; padding: 0px; line-height: 1.875; font-size: 16px; min-height: 30px; white-space: pre-wrap; word-break: break-all; color: rgb(48, 48, 48); font-family: "Helvetica Neue", "PingFang SC", Verdana, "Microsoft Yahei", "Hiragino Sans GB", "Microsoft Sans Serif", "WenQuanYi Micro Hei", sans-serif; background-color: rgb(255, 255, 255);\"><br style=\"margin: 0px; padding: 0px;\"/></p><p data-type=\"paragraph\" style=\"margin-top: 0px; margin-bottom: 0px; padding: 0px; line-height: 1.875; font-size: 16px; min-height: 30px; white-space: pre-wrap; word-break: break-all; color: rgb(48, 48, 48); font-family: "Helvetica Neue", "PingFang SC", Verdana, "Microsoft Yahei", "Hiragino Sans GB", "Microsoft Sans Serif", "WenQuanYi Micro Hei", sans-serif; background-color: rgb(255, 255, 255);\">面向鸿蒙生态的设备和应用服务开发者,华为提供了能让开发者快速、高效、低成本地开发具有智慧 AI 能力的硬件设备及原子化服务。</p><p data-type=\"paragraph\" style=\"margin-top: 0px; margin-bottom: 0px; padding: 0px; line-height: 1.875; font-size: 16px; min-height: 30px; white-space: pre-wrap; word-break: break-all; color: rgb(48, 48, 48); font-family: "Helvetica Neue", "PingFang SC", Verdana, "Microsoft Yahei", "Hiragino Sans GB", "Microsoft Sans Serif", "WenQuanYi Micro Hei", sans-serif; background-color: rgb(255, 255, 255);\"><br style=\"margin: 0px; padding: 0px;\"/></p><p><img src=\"https://static001.infoq.cn/resource/image/d1/39/d1917aaced015010c6c131be84806639.jpg\" style=\"margin: 0px; padding: 0px; border: 0px; vertical-align: top; max-width: 100%; height: auto;\"/></p><p data-type=\"paragraph\" style=\"margin-top: 0px; margin-bottom: 0px; padding: 0px; line-height: 1.875; font-size: 16px; min-height: 30px; white-space: pre-wrap; word-break: break-all; color: rgb(48, 48, 48); font-family: "Helvetica Neue", "PingFang SC", Verdana, "Microsoft Yahei", "Hiragino Sans GB", "Microsoft Sans Serif", "WenQuanYi Micro Hei", sans-serif; background-color: rgb(255, 255, 255);\"><br style=\"margin: 0px; padding: 0px;\"/></p><p data-type=\"paragraph\" style=\"margin-top: 0px; margin-bottom: 0px; padding: 0px; line-height: 1.875; font-size: 16px; min-height: 30px; white-space: pre-wrap; word-break: break-all; color: rgb(48, 48, 48); font-family: "Helvetica Neue", "PingFang SC", Verdana, "Microsoft Yahei", "Hiragino Sans GB", "Microsoft Sans Serif", "WenQuanYi Micro Hei", sans-serif; background-color: rgb(255, 255, 255);\">全新的鸿蒙智联(HarmonyOS Connect)软件服务包 3.0 新增支持垂类应用的带屏设备,并升级了基础服务包、增强服务包以及支持小艺、服务中心、畅连等应用在内的应用服务包,开发者直接调用即可快速开发出具备智慧 AI 能力的设备,预计到 2022 年将全面适配支持丰富应用的带屏设备。</p><p data-type=\"paragraph\" style=\"margin-top: 0px; margin-bottom: 0px; padding: 0px; line-height: 1.875; font-size: 16px; min-height: 30px; white-space: pre-wrap; word-break: break-all; color: rgb(48, 48, 48); font-family: "Helvetica Neue", "PingFang SC", Verdana, "Microsoft Yahei", "Hiragino Sans GB", "Microsoft Sans Serif", "WenQuanYi Micro Hei", sans-serif; background-color: rgb(255, 255, 255);\"><br style=\"margin: 0px; padding: 0px;\"/></p><p data-type=\"paragraph\" style=\"margin-top: 0px; margin-bottom: 0px; padding: 0px; line-height: 1.875; font-size: 16px; min-height: 30px; white-space: pre-wrap; word-break: break-all; color: rgb(48, 48, 48); font-family: "Helvetica Neue", "PingFang SC", Verdana, "Microsoft Yahei", "Hiragino Sans GB", "Microsoft Sans Serif", "WenQuanYi Micro Hei", sans-serif; background-color: rgb(255, 255, 255);\">一站式集成开放环境支持远程开发、按需定制、一键编译和烧录、一键集成服务包和设备仿真器,降低了开发者的接入门槛和开发周期,让开发效率倍增,无屏设备开发周期已由 2 个月减少至 2 周,带屏设备预计 2023 年将缩减到 2 个月以内。</p><p data-type=\"paragraph\" style=\"margin-top: 0px; margin-bottom: 0px; padding: 0px; line-height: 1.875; font-size: 16px; min-height: 30px; white-space: pre-wrap; word-break: break-all; color: rgb(48, 48, 48); font-family: "Helvetica Neue", "PingFang SC", Verdana, "Microsoft Yahei", "Hiragino Sans GB", "Microsoft Sans Serif", "WenQuanYi Micro Hei", sans-serif; background-color: rgb(255, 255, 255);\"><br style=\"margin: 0px; padding: 0px;\"/></p><p data-type=\"paragraph\" style=\"margin-top: 0px; margin-bottom: 0px; padding: 0px; line-height: 1.875; font-size: 16px; min-height: 30px; white-space: pre-wrap; word-break: break-all; color: rgb(48, 48, 48); font-family: "Helvetica Neue", "PingFang SC", Verdana, "Microsoft Yahei", "Hiragino Sans GB", "Microsoft Sans Serif", "WenQuanYi Micro Hei", sans-serif; background-color: rgb(255, 255, 255);\">对于应用与服务开发者,一站式集成开发的应用开发工具提供了超过 50 个原子化服务和卡片模板,支持多端双向预览、低代码开发、分布式模拟仿真以及分布式调测等。目前原子化服务开发效率已由 1 个月缩减至 15 天,预计 2023 年 5 天即可完成开发。</p><p data-type=\"paragraph\" style=\"margin-top: 0px; margin-bottom: 0px; padding: 0px; line-height: 1.875; font-size: 16px; min-height: 30px; white-space: pre-wrap; word-break: break-all; color: rgb(48, 48, 48); font-family: "Helvetica Neue", "PingFang SC", Verdana, "Microsoft Yahei", "Hiragino Sans GB", "Microsoft Sans Serif", "WenQuanYi Micro Hei", sans-serif; background-color: rgb(255, 255, 255);\"><br style=\"margin: 0px; padding: 0px;\"/></p><p data-type=\"paragraph\" style=\"margin-top: 0px; margin-bottom: 0px; padding: 0px; line-height: 1.875; font-size: 16px; min-height: 30px; white-space: pre-wrap; word-break: break-all; color: rgb(48, 48, 48); font-family: "Helvetica Neue", "PingFang SC", Verdana, "Microsoft Yahei", "Hiragino Sans GB", "Microsoft Sans Serif", "WenQuanYi Micro Hei", sans-serif; background-color: rgb(255, 255, 255);\">王成录表示,欢迎更多合作伙伴和开发者加入鸿蒙生态,持续添砖加瓦,开启万物智联的新时代。</p><p><br/></p>', 'HarmonyOS', '0', '0', '1', '2021-10-24 15:32:46', '2021-10-24 15:32:46', '6', '1', '', '');
INSERT INTO `tb_post` VALUES ('25', '1', '发布一个下载链接', 'https://www.infoq.cn/news/8r3lsBU3yU1mQOdoZti6', '<p>232</p>', '2323', '0', '0', '0', '2021-10-24 16:48:49', '2021-10-24 16:48:49', '6', '0', '2323', 'static/upload/c4a38b67dc7d86038f4121e062cb4769.jpg');
INSERT INTO `tb_post` VALUES ('27', '1', '凌晨 12 点突发 Istio 生产事故!一顿操作猛如虎解决了', 'https://xie.infoq.cn/article/1e99c870223175f37e5ec329f', '<h1 data-id=\"heading0\" data-type=\"heading\" top=\"268\" style=\";padding: 26px 0px 4px;font-size: 32px;line-height: 48px;color: rgb(53, 53, 53);white-space: pre-wrap;font-family: 'Helvetica Neue', 'PingFang SC', Verdana, 'Microsoft Yahei', 'Hiragino Sans GB', 'Microsoft Sans Serif', 'WenQuanYi Micro Hei', sans-serif;background-color: rgb(255, 255, 255)\">事故起因</h1><p data-type=\"paragraph\" style=\"margin-top: 0px;margin-bottom: 0px;padding: 0px;line-height: 1.875;font-size: 16px;min-height: 30px;white-space: pre-wrap;color: rgb(48, 48, 48);font-family: 'Helvetica Neue', 'PingFang SC', Verdana, 'Microsoft Yahei', 'Hiragino Sans GB', 'Microsoft Sans Serif', 'WenQuanYi Micro Hei', sans-serif;background-color: rgb(255, 255, 255)\">业务上新集群,本来以为"洒洒水",11 点切,12 点就能在家睡觉了。流量切过来后,在验证过程中,发现网页能够正常打开,在登录时返回了 502,当场懵逼。在相关的容器日志发现一个高频的报错条目“7000 端口无法连接”,向业务组了解到这是 redis 集群中的一个端口,前后端是通过 redis 交互的,该集群同时还有 7001-7003 其它三个端口。</p><p data-type=\"paragraph\" style=\"margin-top: 0px;margin-bottom: 0px;padding: 0px;line-height: 1.875;font-size: 16px;min-height: 30px;white-space: pre-wrap;color: rgb(48, 48, 48);font-family: 'Helvetica Neue', 'PingFang SC', Verdana, 'Microsoft Yahei', 'Hiragino Sans GB', 'Microsoft Sans Serif', 'WenQuanYi Micro Hei', sans-serif;background-color: rgb(255, 255, 255)\"><br style=\";padding: 0px\"/></p><p data-type=\"paragraph\" style=\"margin-top: 0px;margin-bottom: 0px;padding: 0px;line-height: 1.875;font-size: 16px;min-height: 30px;white-space: pre-wrap;color: rgb(48, 48, 48);font-family: 'Helvetica Neue', 'PingFang SC', Verdana, 'Microsoft Yahei', 'Hiragino Sans GB', 'Microsoft Sans Serif', 'WenQuanYi Micro Hei', sans-serif;background-color: rgb(255, 255, 255)\">用 nc 命令对 redis 集群进行连接测试:向服务端发送 keys * 命令时,7000 端口返回的是 HTTP/1.1 400 Bad Request,其他三个端口是 redis 返回的 -NOAUTH Authentication required。</p><p data-type=\"paragraph\" style=\"margin-top: 0px;margin-bottom: 0px;padding: 0px;line-height: 1.875;font-size: 16px;min-height: 30px;white-space: pre-wrap;color: rgb(48, 48, 48);font-family: 'Helvetica Neue', 'PingFang SC', Verdana, 'Microsoft Yahei', 'Hiragino Sans GB', 'Microsoft Sans Serif', 'WenQuanYi Micro Hei', sans-serif;background-color: rgb(255, 255, 255)\"><br style=\";padding: 0px\"/></p><pre data-origin=\"pm_code_preview\" style=\"margin-top: 0px;margin-bottom: 0px;padding: 0px;font-family: Courier, 'Courier New', monospace\"><code data-type=\"codeline\" style=\";padding: 0px;font-family: Menlo, Monaco, 'Source Code Pro', 'Courier New', monospace;background: rgb(241, 243, 245);border: none;border-radius: 3px;display: block;line-height: 20px;height: 20px;font-size: 13px\"> $ nc 10.0.0.6 7000</code><code data-type=\"codeline\" style=\";padding: 0px;font-family: Menlo, Monaco, 'Source Code Pro', 'Courier New', monospace;background: rgb(241, 243, 245);border: none;border-radius: 3px;display: block;line-height: 20px;height: 20px;font-size: 13px\"> keys *</code><code data-type=\"codeline\" style=\";padding: 0px;font-family: Menlo, Monaco, 'Source Code Pro', 'Courier New', monospace;background: rgb(241, 243, 245);border: none;border-radius: 3px;display: block;line-height: 20px;height: 20px;font-size: 13px\"> HTTP/1.1 400 Bad Request</code><code data-type=\"codeline\" style=\";padding: 0px;font-family: Menlo, Monaco, 'Source Code Pro', 'Courier New', monospace;background: rgb(241, 243, 245);border: none;border-radius: 3px;display: block;line-height: 20px;height: 20px;font-size: 13px\"> content-length: 0</code><code data-type=\"codeline\" style=\";padding: 0px;font-family: Menlo, Monaco, 'Source Code Pro', 'Courier New', monospace;background: rgb(241, 243, 245);border: none;border-radius: 3px;display: block;line-height: 20px;height: 20px;font-size: 13px\"> connection: close</code><code data-type=\"codeline\" style=\";padding: 0px;font-family: Menlo, Monaco, 'Source Code Pro', 'Courier New', monospace;background: rgb(241, 243, 245);border: none;border-radius: 3px;display: block;line-height: 20px;height: 20px;font-size: 13px\"><br style=\";padding: 0px\"/></code><code data-type=\"codeline\" style=\";padding: 0px;font-family: Menlo, Monaco, 'Source Code Pro', 'Courier New', monospace;background: rgb(241, 243, 245);border: none;border-radius: 3px;display: block;line-height: 20px;height: 20px;font-size: 13px\"> $ nc 10.0.0.6 7003</code><code data-type=\"codeline\" style=\";padding: 0px;font-family: Menlo, Monaco, 'Source Code Pro', 'Courier New', monospace;background: rgb(241, 243, 245);border: none;border-radius: 3px;display: block;line-height: 20px;height: 20px;font-size: 13px\"> keys *</code><code data-type=\"codeline\" style=\";padding: 0px;font-family: Menlo, Monaco, 'Source Code Pro', 'Courier New', monospace;background: rgb(241, 243, 245);border: none;border-radius: 3px;display: block;line-height: 20px;height: 20px;font-size: 13px\"> -NOAUTH Authentication required</code><code data-type=\"codeline\" style=\";padding: 0px;font-family: Menlo, Monaco, 'Source Code Pro', 'Courier New', monospace;background: rgb(241, 243, 245);border: none;border-radius: 3px;display: block;line-height: 20px;height: 20px;font-size: 13px\"><br style=\";padding: 0px\"/></code></pre><p>复制代码</p><p data-type=\"paragraph\" style=\"margin-top: 0px;margin-bottom: 0px;padding: 0px;line-height: 1.875;font-size: 16px;min-height: 30px;white-space: pre-wrap;color: rgb(48, 48, 48);font-family: 'Helvetica Neue', 'PingFang SC', Verdana, 'Microsoft Yahei', 'Hiragino Sans GB', 'Microsoft Sans Serif', 'WenQuanYi Micro Hei', sans-serif;background-color: rgb(255, 255, 255)\"><br style=\";padding: 0px\"/></p><p data-type=\"paragraph\" style=\"margin-top: 0px;margin-bottom: 0px;padding: 0px;line-height: 1.875;font-size: 16px;min-height: 30px;white-space: pre-wrap;color: rgb(48, 48, 48);font-family: 'Helvetica Neue', 'PingFang SC', Verdana, 'Microsoft Yahei', 'Hiragino Sans GB', 'Microsoft Sans Serif', 'WenQuanYi Micro Hei', sans-serif;background-color: rgb(255, 255, 255)\">判断 7000 端口连接到了其他应用上,至少不是 redis。在宿主机上抓包发现没有抓到访问 7000 端口的流量,然后查看容器的 nf_conntrackb 表,发现 7000 端口的数据只有到本地的会话信息;7003 的有两条会话信息,一条到本机的,一条到目标服务器的。</p><p data-type=\"paragraph\" style=\"margin-top: 0px;margin-bottom: 0px;padding: 0px;line-height: 1.875;font-size: 16px;min-height: 30px;white-space: pre-wrap;color: rgb(48, 48, 48);font-family: 'Helvetica Neue', 'PingFang SC', Verdana, 'Microsoft Yahei', 'Hiragino Sans GB', 'Microsoft Sans Serif', 'WenQuanYi Micro Hei', sans-serif;background-color: rgb(255, 255, 255)\"><br style=\";padding: 0px\"/></p><pre data-origin=\"pm_code_preview\" style=\"margin-top: 0px;margin-bottom: 0px;padding: 0px;font-family: Courier, 'Courier New', monospace\"><code data-type=\"codeline\" style=\";padding: 0px;font-family: Menlo, Monaco, 'Source Code Pro', 'Courier New', monospace;background: rgb(241, 243, 245);border: none;border-radius: 3px;display: block;line-height: 20px;height: 20px;font-size: 13px\"> $ grep 7000 /proc/net/nf_conntrack</code><code data-type=\"codeline\" style=\";padding: 0px;font-family: Menlo, Monaco, 'Source Code Pro', 'Courier New', monospace;background: rgb(241, 243, 245);border: none;border-radius: 3px;display: block;line-height: 20px;height: 20px;font-size: 13px\"> ipv4 2 tcp 6 110 TIME_WAIT src=10.64.192.14 dst=10.0.0.6 sport=50498 dport=7000 src=127.0.0.1 dst=10.64.192.14 sport=15001 dport=50498 [ASSURED] mark=0 zone=0 use=2</code><code data-type=\"codeline\" style=\";padding: 0px;font-family: Menlo, Monaco, 'Source Code Pro', 'Courier New', monospace;background: rgb(241, 243, 245);border: none;border-radius: 3px;display: block;line-height: 20px;height: 20px;font-size: 13px\"><br style=\";padding: 0px\"/></code><code data-type=\"codeline\" style=\";padding: 0px;font-family: Menlo, Monaco, 'Source Code Pro', 'Courier New', monospace;background: rgb(241, 243, 245);border: none;border-radius: 3px;display: block;line-height: 20px;height: 20px;font-size: 13px\"> $ grep 7003 /proc/net/nf_conntrack</code><code data-type=\"codeline\" style=\";padding: 0px;font-family: Menlo, Monaco, 'Source Code Pro', 'Courier New', monospace;background: rgb(241, 243, 245);border: none;border-radius: 3px;display: block;line-height: 20px;height: 20px;font-size: 13px\"> ipv4 2 tcp 6 104 TIME_WAIT src=10.64.192.14 dst=10.0.0.6 sport=38952 dport=7003 src=127.0.0.1 dst=10.64.192.14 sport=15001 dport=38952 [ASSURED] mark=0 zone=0 use=2</code><code data-type=\"codeline\" style=\";padding: 0px;font-family: Menlo, Monaco, 'Source Code Pro', 'Courier New', monospace;background: rgb(241, 243, 245);border: none;border-radius: 3px;display: block;line-height: 20px;height: 20px;font-size: 13px\"> ipv4 2 tcp 6 104 TIME_WAIT src=10.64.192.14 dst=10.0.0.6 sport=38954 dport=7003 src=10.0.0.6 dst=10.64.192.14 sport=7003 dport=38954 [ASSURED] mark=0 zone=0 use=2</code><code data-type=\"codeline\" style=\";padding: 0px;font-family: Menlo, Monaco, 'Source Code Pro', 'Courier New', monospace;background: rgb(241, 243, 245);border: none;border-radius: 3px;display: block;line-height: 20px;height: 20px;font-size: 13px\"><br style=\";padding: 0px\"/></code></pre><p>复制代码</p><p data-type=\"paragraph\" style=\"margin-top: 0px;margin-bottom: 0px;padding: 0px;line-height: 1.875;font-size: 16px;min-height: 30px;white-space: pre-wrap;color: rgb(48, 48, 48);font-family: 'Helvetica Neue', 'PingFang SC', Verdana, 'Microsoft Yahei', 'Hiragino Sans GB', 'Microsoft Sans Serif', 'WenQuanYi Micro Hei', sans-serif;background-color: rgb(255, 255, 255)\"><br style=\";padding: 0px\"/></p><p data-type=\"paragraph\" style=\"margin-top: 0px;margin-bottom: 0px;padding: 0px;line-height: 1.875;font-size: 16px;min-height: 30px;white-space: pre-wrap;color: rgb(48, 48, 48);font-family: 'Helvetica Neue', 'PingFang SC', Verdana, 'Microsoft Yahei', 'Hiragino Sans GB', 'Microsoft Sans Serif', 'WenQuanYi Micro Hei', sans-serif;background-color: rgb(255, 255, 255)\">由此判断出 istio 没有代理转发出 7000 的流量,这突然就触及到了我的知识盲区,一大堆人看着,办公室 26 度的空调,一直在冒汗。没办法了,在与业务商量后,只能先关闭 istio 注入,优先恢复了业务。回去后恶补 istio 的相关资料。终于将问题解决。记录下相关信息,以供日后参考。</p><h1 data-id=\"heading1\" data-type=\"heading\" top=\"1310\" style=\";padding: 26px 0px 4px;font-size: 32px;line-height: 48px;color: rgb(53, 53, 53);white-space: pre-wrap;font-family: 'Helvetica Neue', 'PingFang SC', Verdana, 'Microsoft Yahei', 'Hiragino Sans GB', 'Microsoft Sans Serif', 'WenQuanYi Micro Hei', sans-serif;background-color: rgb(255, 255, 255)\">背景知识补充</h1><h2 data-id=\"heading2\" data-type=\"heading\" top=\"1388\" style=\";padding: 26px 0px 4px;font-size: 28px;line-height: 44px;color: rgb(53, 53, 53);white-space: pre-wrap;font-family: 'Helvetica Neue', 'PingFang SC', Verdana, 'Microsoft Yahei', 'Hiragino Sans GB', 'Microsoft Sans Serif', 'WenQuanYi Micro Hei', sans-serif;background-color: rgb(255, 255, 255)\">istio 的 Sidecar 有两种模式:</h2><ul data-type=\"bulletedlist\" style=\"list-style-type: none;\" class=\" list-paddingleft-2\"><li><p data-type=\"paragraph\" style=\"margin-top: 0px;margin-bottom: 0px;padding: 0px 0px 0px 24px;line-height: 1.875;font-size: 16px;min-height: 30px;white-space: pre-wrap;position: relative\">ALLOW_ANY:istio 代理允许调用未知的服务,黑名单模式。</p></li><li><p data-type=\"paragraph\" style=\"margin-top: 0px;margin-bottom: 0px;padding: 0px 0px 0px 24px;line-height: 1.875;font-size: 16px;min-height: 30px;white-space: pre-wrap;position: relative\">REGISTRY_ONLY:istio 代理会阻止任何没有在网格中定义的 HTTP 服务或 service entry 的主机,白名单模式。</p></li></ul><h2 data-id=\"heading3\" data-type=\"heading\" top=\"1552\" style=\";padding: 26px 0px 4px;font-size: 28px;line-height: 44px;color: rgb(53, 53, 53);white-space: pre-wrap;font-family: 'Helvetica Neue', 'PingFang SC', Verdana, 'Microsoft Yahei', 'Hiragino Sans GB', 'Microsoft Sans Serif', 'WenQuanYi Micro Hei', sans-serif;background-color: rgb(255, 255, 255)\">istio-proxy(Envoy)的配置结构</h2><p data-type=\"paragraph\" style=\"margin-top: 0px;margin-bottom: 0px;padding: 0px;line-height: 1.875;font-size: 16px;min-height: 30px;white-space: pre-wrap;color: rgb(48, 48, 48);font-family: 'Helvetica Neue', 'PingFang SC', Verdana, 'Microsoft Yahei', 'Hiragino Sans GB', 'Microsoft Sans Serif', 'WenQuanYi Micro Hei', sans-serif;background-color: rgb(255, 255, 255)\">istio-proxy(Envoy)的代理信息大体由以下几个部分组成:</p><p data-type=\"paragraph\" style=\"margin-top: 0px;margin-bottom: 0px;padding: 0px;line-height: 1.875;font-size: 16px;min-height: 30px;white-space: pre-wrap;color: rgb(48, 48, 48);font-family: 'Helvetica Neue', 'PingFang SC', Verdana, 'Microsoft Yahei', 'Hiragino Sans GB', 'Microsoft Sans Serif', 'WenQuanYi Micro Hei', sans-serif;background-color: rgb(255, 255, 255)\"><br style=\";padding: 0px\"/></p><ul data-type=\"bulletedlist\" style=\"list-style-type: none;\" class=\" list-paddingleft-2\"><li><p data-type=\"paragraph\" style=\"margin-top: 0px;margin-bottom: 0px;padding: 0px 0px 0px 24px;line-height: 1.875;font-size: 16px;min-height: 30px;white-space: pre-wrap;position: relative\">Cluster:在 Envoy 中,Cluster 是一个服务集群,Cluster 中包含一个到多个 endpoint,每个 endpoint 都可以提供服务,Envoy 根据负载均衡算法将请求发送到这些 endpoint 中。Cluster 分为 inbound 和 outbound 两种,前者对应 Envoy 所在节点上的服务;后者占了绝大多数,对应 Envoy 所在节点的外部服务。可以使用如下方式分别查看 inbound 和 outbound 的 Cluster。</p></li><li><p data-type=\"paragraph\" style=\"margin-top: 0px;margin-bottom: 0px;padding: 0px 0px 0px 24px;line-height: 1.875;font-size: 16px;min-height: 30px;white-space: pre-wrap;position: relative\">Listeners:Envoy 采用 listener 来接收并处理 downstream 发过来的请求,可以直接与 Cluster 关联,也可以通过 rds 配置路由规则(Routes),然后在路由规则中再根据不同的请求目的地对请求进行精细化的处理。</p></li><li><p data-type=\"paragraph\" style=\"margin-top: 0px;margin-bottom: 0px;padding: 0px 0px 0px 24px;line-height: 1.875;font-size: 16px;min-height: 30px;white-space: pre-wrap;position: relative\">Routes:配置 Envoy 的路由规则。istio 下发的缺省路由规则中对每个端口(服务)设置了一个路由规则,根据 host 来对请求进行路由分发,routes 的目的为其他服务的 Cluster。</p></li><li><p data-type=\"paragraph\" style=\"margin-top: 0px;margin-bottom: 0px;padding: 0px 0px 0px 24px;line-height: 1.875;font-size: 16px;min-height: 30px;white-space: pre-wrap;position: relative\">Endpoint:Cludter 对应的后端服务,可以通过 istio pc endpoint 查看 inbound 和 outbound 对应的 endpoint 信息。</p></li></ul><h2 data-id=\"heading4\" data-type=\"heading\" top=\"1986\" style=\";padding: 26px 0px 4px;font-size: 28px;line-height: 44px;color: rgb(53, 53, 53);white-space: pre-wrap;font-family: 'Helvetica Neue', 'PingFang SC', Verdana, 'Microsoft Yahei', 'Hiragino Sans GB', 'Microsoft Sans Serif', 'WenQuanYi Micro Hei', sans-serif;background-color: rgb(255, 255, 255)\">服务发现类型</h2><p data-type=\"paragraph\" style=\"margin-top: 0px;margin-bottom: 0px;padding: 0px;line-height: 1.875;font-size: 16px;min-height: 30px;white-space: pre-wrap;color: rgb(48, 48, 48);font-family: 'Helvetica Neue', 'PingFang SC', Verdana, 'Microsoft Yahei', 'Hiragino Sans GB', 'Microsoft Sans Serif', 'WenQuanYi Micro Hei', sans-serif;background-color: rgb(255, 255, 255)\">Cluster 的服务发现类型主要有:</p><p data-type=\"paragraph\" style=\"margin-top: 0px;margin-bottom: 0px;padding: 0px;line-height: 1.875;font-size: 16px;min-height: 30px;white-space: pre-wrap;color: rgb(48, 48, 48);font-family: 'Helvetica Neue', 'PingFang SC', Verdana, 'Microsoft Yahei', 'Hiragino Sans GB', 'Microsoft Sans Serif', 'WenQuanYi Micro Hei', sans-serif;background-color: rgb(255, 255, 255)\"><br style=\";padding: 0px\"/></p><ul data-type=\"bulletedlist\" style=\"list-style-type: none;\" class=\" list-paddingleft-2\"><li><p data-type=\"paragraph\" style=\"margin-top: 0px;margin-bottom: 0px;padding: 0px 0px 0px 24px;line-height: 1.875;font-size: 16px;min-height: 30px;white-space: pre-wrap;position: relative\">ORIGINAL_DST:ORIGINAL_DST 类型的 Cluster,Envoy 在转发请求时会直接采用 downstream 请求中的原始目的地 IP 地址。</p></li><li><p data-type=\"paragraph\" style=\"margin-top: 0px;margin-bottom: 0px;padding: 0px 0px 0px 24px;line-height: 1.875;font-size: 16px;min-height: 30px;white-space: pre-wrap;position: relative\">EDS:EDS 获取到该 Cluster 中所有可用的 Endpoint,并根据负载均衡算法(缺省为 Round Robin)将 Downstream 发来的请求发送到不同的 Endpoint。istio 会自动为集群中的 service 创建代理信息,listener 的信息从 service 获取,对应的 Cluster 被标记为 EDS 类型。</p></li><li><p data-type=\"paragraph\" style=\"margin-top: 0px;margin-bottom: 0px;padding: 0px 0px 0px 24px;line-height: 1.875;font-size: 16px;min-height: 30px;white-space: pre-wrap;position: relative\">STATIC:缺省值,在集群中列出所有可代理的主机 Endpoints。当没有内容为空时,不进行转发。</p></li><li><p data-type=\"paragraph\" style=\"margin-top: 0px;margin-bottom: 0px;padding: 0px 0px 0px 24px;line-height: 1.875;font-size: 16px;min-height: 30px;white-space: pre-wrap;position: relative\">LOGICAL_DNS:Envoy 使用 DNS 添加主机,但如果 DNS 不再返回时,也不会丢弃。</p></li><li><p data-type=\"paragraph\" style=\"margin-top: 0px;margin-bottom: 0px;padding: 0px 0px 0px 24px;line-height: 1.875;font-size: 16px;min-height: 30px;white-space: pre-wrap;position: relative\">STRICT_DNS:Envoy 将监控 DNS,而每个匹配的 A 记录都将被认为是有效的。</p></li></ul><h2 data-id=\"heading5\" data-type=\"heading\" top=\"2360\" style=\";padding: 26px 0px 4px;font-size: 28px;line-height: 44px;color: rgb(53, 53, 53);white-space: pre-wrap;font-family: 'Helvetica Neue', 'PingFang SC', Verdana, 'Microsoft Yahei', 'Hiragino Sans GB', 'Microsoft Sans Serif', 'WenQuanYi Micro Hei', sans-serif;background-color: rgb(255, 255, 255)\">两个特殊集群</h2><p data-type=\"paragraph\" style=\"margin-top: 0px;margin-bottom: 0px;padding: 0px;line-height: 1.875;font-size: 16px;min-height: 30px;white-space: pre-wrap;color: rgb(48, 48, 48);font-family: 'Helvetica Neue', 'PingFang SC', Verdana, 'Microsoft Yahei', 'Hiragino Sans GB', 'Microsoft Sans Serif', 'WenQuanYi Micro Hei', sans-serif;background-color: rgb(255, 255, 255)\">BlackHoleCluster:黑洞集群,匹配此集群的流量将被不会被转发。</p><p data-type=\"paragraph\" style=\"margin-top: 0px;margin-bottom: 0px;padding: 0px;line-height: 1.875;font-size: 16px;min-height: 30px;white-space: pre-wrap;color: rgb(48, 48, 48);font-family: 'Helvetica Neue', 'PingFang SC', Verdana, 'Microsoft Yahei', 'Hiragino Sans GB', 'Microsoft Sans Serif', 'WenQuanYi Micro Hei', sans-serif;background-color: rgb(255, 255, 255)\"><br style=\";padding: 0px\"/></p><pre data-origin=\"pm_code_preview\" style=\"margin-top: 0px;margin-bottom: 0px;padding: 0px;font-family: Courier, 'Courier New', monospace\"><code data-type=\"codeline\" style=\";padding: 0px;font-family: Menlo, Monaco, 'Source Code Pro', 'Courier New', monospace;background: rgb(241, 243, 245);border: none;border-radius: 3px;display: block;line-height: 20px;height: 20px;font-size: 13px\"> {</code><code data-type=\"codeline\" style=\";padding: 0px;font-family: Menlo, Monaco, 'Source Code Pro', 'Courier New', monospace;background: rgb(241, 243, 245);border: none;border-radius: 3px;display: block;line-height: 20px;height: 20px;font-size: 13px\"> "name": "BlackHoleCluster",</code><code data-type=\"codeline\" style=\";padding: 0px;font-family: Menlo, Monaco, 'Source Code Pro', 'Courier New', monospace;background: rgb(241, 243, 245);border: none;border-radius: 3px;display: block;line-height: 20px;height: 20px;font-size: 13px\"> "type": "STATIC",</code><code data-type=\"codeline\" style=\";padding: 0px;font-family: Menlo, Monaco, 'Source Code Pro', 'Courier New', monospace;background: rgb(241, 243, 245);border: none;border-radius: 3px;display: block;line-height: 20px;height: 20px;font-size: 13px\"> "connectTimeout": "10s"</code><code data-type=\"codeline\" style=\";padding: 0px;font-family: Menlo, Monaco, 'Source Code Pro', 'Courier New', monospace;background: rgb(241, 243, 245);border: none;border-radius: 3px;display: block;line-height: 20px;height: 20px;font-size: 13px\"> }</code><code data-type=\"codeline\" style=\";padding: 0px;font-family: Menlo, Monaco, 'Source Code Pro', 'Courier New', monospace;background: rgb(241, 243, 245);border: none;border-radius: 3px;display: block;line-height: 20px;height: 20px;font-size: 13px\"><br style=\";padding: 0px\"/></code></pre><p>复制代码</p><p data-type=\"paragraph\" style=\"margin-top: 0px;margin-bottom: 0px;padding: 0px;line-height: 1.875;font-size: 16px;min-height: 30px;white-space: pre-wrap;color: rgb(48, 48, 48);font-family: 'Helvetica Neue', 'PingFang SC', Verdana, 'Microsoft Yahei', 'Hiragino Sans GB', 'Microsoft Sans Serif', 'WenQuanYi Micro Hei', sans-serif;background-color: rgb(255, 255, 255)\"><br style=\";padding: 0px\"/></p><p data-type=\"paragraph\" style=\"margin-top: 0px;margin-bottom: 0px;padding: 0px;line-height: 1.875;font-size: 16px;min-height: 30px;white-space: pre-wrap;color: rgb(48, 48, 48);font-family: 'Helvetica Neue', 'PingFang SC', Verdana, 'Microsoft Yahei', 'Hiragino Sans GB', 'Microsoft Sans Serif', 'WenQuanYi Micro Hei', sans-serif;background-color: rgb(255, 255, 255)\">类型为 static,但是没有指定可代理的 Endpoint,所以流量不会被转发。</p><p data-type=\"paragraph\" style=\"margin-top: 0px;margin-bottom: 0px;padding: 0px;line-height: 1.875;font-size: 16px;min-height: 30px;white-space: pre-wrap;color: rgb(48, 48, 48);font-family: 'Helvetica Neue', 'PingFang SC', Verdana, 'Microsoft Yahei', 'Hiragino Sans GB', 'Microsoft Sans Serif', 'WenQuanYi Micro Hei', sans-serif;background-color: rgb(255, 255, 255)\"><br style=\";padding: 0px\"/></p><p data-type=\"paragraph\" style=\"margin-top: 0px;margin-bottom: 0px;padding: 0px;line-height: 1.875;font-size: 16px;min-height: 30px;white-space: pre-wrap;color: rgb(48, 48, 48);font-family: 'Helvetica Neue', 'PingFang SC', Verdana, 'Microsoft Yahei', 'Hiragino Sans GB', 'Microsoft Sans Serif', 'WenQuanYi Micro Hei', sans-serif;background-color: rgb(255, 255, 255)\">PassthroughCluster:透传集群,匹配此集群的流量数据包的目的 IP 不会改变。</p><p data-type=\"paragraph\" style=\"margin-top: 0px;margin-bottom: 0px;padding: 0px;line-height: 1.875;font-size: 16px;min-height: 30px;white-space: pre-wrap;color: rgb(48, 48, 48);font-family: 'Helvetica Neue', 'PingFang SC', Verdana, 'Microsoft Yahei', 'Hiragino Sans GB', 'Microsoft Sans Serif', 'WenQuanYi Micro Hei', sans-serif;background-color: rgb(255, 255, 255)\"><br style=\";padding: 0px\"/></p><pre data-origin=\"pm_code_preview\" style=\"margin-top: 0px;margin-bottom: 0px;padding: 0px;font-family: Courier, 'Courier New', monospace\"><code data-type=\"codeline\" style=\";padding: 0px;font-family: Menlo, Monaco, 'Source Code Pro', 'Courier New', monospace;background: rgb(241, 243, 245);border: none;border-radius: 3px;display: block;line-height: 20px;height: 20px;font-size: 13px\"> {</code><code data-type=\"codeline\" style=\";padding: 0px;font-family: Menlo, Monaco, 'Source Code Pro', 'Courier New', monospace;background: rgb(241, 243, 245);border: none;border-radius: 3px;display: block;line-height: 20px;height: 20px;font-size: 13px\"> "name": "PassthroughCluster",</code><code data-type=\"codeline\" style=\";padding: 0px;font-family: Menlo, Monaco, 'Source Code Pro', 'Courier New', monospace;background: rgb(241, 243, 245);border: none;border-radius: 3px;display: block;line-height: 20px;height: 20px;font-size: 13px\"> "type": "ORIGINAL_DST",</code><code data-type=\"codeline\" style=\";padding: 0px;font-family: Menlo, Monaco, 'Source Code Pro', 'Courier New', monospace;background: rgb(241, 243, 245);border: none;border-radius: 3px;display: block;line-height: 20px;height: 20px;font-size: 13px\"> "connectTimeout": "10s",</code><code data-type=\"codeline\" style=\";padding: 0px;font-family: Menlo, Monaco, 'Source Code Pro', 'Courier New', monospace;background: rgb(241, 243, 245);border: none;border-radius: 3px;display: block;line-height: 20px;height: 20px;font-size: 13px\"> "lbPolicy": "CLUSTER_PROVIDED",</code><code data-type=\"codeline\" style=\";padding: 0px;font-family: Menlo, Monaco, 'Source Code Pro', 'Courier New', monospace;background: rgb(241, 243, 245);border: none;border-radius: 3px;display: block;line-height: 20px;height: 20px;font-size: 13px\"> "circuitBreakers": {</code><code data-type=\"codeline\" style=\";padding: 0px;font-family: Menlo, Monaco, 'Source Code Pro', 'Courier New', monospace;background: rgb(241, 243, 245);border: none;border-radius: 3px;display: block;line-height: 20px;height: 20px;font-size: 13px\"> "thresholds": [</code><code data-type=\"codeline\" style=\";padding: 0px;font-family: Menlo, Monaco, 'Source Code Pro', 'Courier New', monospace;background: rgb(241, 243, 245);border: none;border-radius: 3px;display: block;line-height: 20px;height: 20px;font-size: 13px\"> {</code><code data-type=\"codeline\" style=\";padding: 0px;font-family: Menlo, Monaco, 'Source Code Pro', 'Courier New', monospace;background: rgb(241, 243, 245);border: none;border-radius: 3px;display: block;line-height: 20px;height: 20px;font-size: 13px\"> "maxConnections": 4294967295,</code><code data-type=\"codeline\" style=\";padding: 0px;font-family: Menlo, Monaco, 'Source Code Pro', 'Courier New', monospace;background: rgb(241, 243, 245);border: none;border-radius: 3px;display: block;line-height: 20px;height: 20px;font-size: 13px\"> "maxPendingRequests": 4294967295,</code><code data-type=\"codeline\" style=\";padding: 0px;font-family: Menlo, Monaco, 'Source Code Pro', 'Courier New', monospace;background: rgb(241, 243, 245);border: none;border-radius: 3px;display: block;line-height: 20px;height: 20px;font-size: 13px\"> "maxRequests": 4294967295,</code><code data-type=\"codeline\" style=\";padding: 0px;font-family: Menlo, Monaco, 'Source Code Pro', 'Courier New', monospace;background: rgb(241, 243, 245);border: none;border-radius: 3px;display: block;line-height: 20px;height: 20px;font-size: 13px\"> "maxRetries": 4294967295</code><code data-type=\"codeline\" style=\";padding: 0px;font-family: Menlo, Monaco, 'Source Code Pro', 'Courier New', monospace;background: rgb(241, 243, 245);border: none;border-radius: 3px;display: block;line-height: 20px;height: 20px;font-size: 13px\"> }</code><code data-type=\"codeline\" style=\";padding: 0px;font-family: Menlo, Monaco, 'Source Code Pro', 'Courier New', monospace;background: rgb(241, 243, 245);border: none;border-radius: 3px;display: block;line-height: 20px;height: 20px;font-size: 13px\"> ]</code><code data-type=\"codeline\" style=\";padding: 0px;font-family: Menlo, Monaco, 'Source Code Pro', 'Courier New', monospace;background: rgb(241, 243, 245);border: none;border-radius: 3px;display: block;line-height: 20px;height: 20px;font-size: 13px\"> }</code><code data-type=\"codeline\" style=\";padding: 0px;font-family: Menlo, Monaco, 'Source Code Pro', 'Courier New', monospace;background: rgb(241, 243, 245);border: none;border-radius: 3px;display: block;line-height: 20px;height: 20px;font-size: 13px\"><br style=\";padding: 0px\"/></code></pre><p>复制代码</p><p data-type=\"paragraph\" style=\"margin-top: 0px;margin-bottom: 0px;padding: 0px;line-height: 1.875;font-size: 16px;min-height: 30px;white-space: pre-wrap;color: rgb(48, 48, 48);font-family: 'Helvetica Neue', 'PingFang SC', Verdana, 'Microsoft Yahei', 'Hiragino Sans GB', 'Microsoft Sans Serif', 'WenQuanYi Micro Hei', sans-serif;background-color: rgb(255, 255, 255)\"><br style=\";padding: 0px\"/></p><p data-type=\"paragraph\" style=\"margin-top: 0px;margin-bottom: 0px;padding: 0px;line-height: 1.875;font-size: 16px;min-height: 30px;white-space: pre-wrap;color: rgb(48, 48, 48);font-family: 'Helvetica Neue', 'PingFang SC', Verdana, 'Microsoft Yahei', 'Hiragino Sans GB', 'Microsoft Sans Serif', 'WenQuanYi Micro Hei', sans-serif;background-color: rgb(255, 255, 255)\">类型为 original_dst,流量将原样转发。</p><h2 data-id=\"heading6\" data-type=\"heading\" top=\"3288\" style=\";padding: 26px 0px 4px;font-size: 28px;line-height: 44px;color: rgb(53, 53, 53);white-space: pre-wrap;font-family: 'Helvetica Neue', 'PingFang SC', Verdana, 'Microsoft Yahei', 'Hiragino Sans GB', 'Microsoft Sans Serif', 'WenQuanYi Micro Hei', sans-serif;background-color: rgb(255, 255, 255)\">一个特殊的 Listener</h2><p data-type=\"paragraph\" style=\"margin-top: 0px;margin-bottom: 0px;padding: 0px;line-height: 1.875;font-size: 16px;min-height: 30px;white-space: pre-wrap;color: rgb(48, 48, 48);font-family: 'Helvetica Neue', 'PingFang SC', Verdana, 'Microsoft Yahei', 'Hiragino Sans GB', 'Microsoft Sans Serif', 'WenQuanYi Micro Hei', sans-serif;background-color: rgb(255, 255, 255)\">istio 中有一个特殊的 Listener 叫 virtualOutbound,定义如下:</p><p data-type=\"paragraph\" style=\"margin-top: 0px;margin-bottom: 0px;padding: 0px;line-height: 1.875;font-size: 16px;min-height: 30px;white-space: pre-wrap;color: rgb(48, 48, 48);font-family: 'Helvetica Neue', 'PingFang SC', Verdana, 'Microsoft Yahei', 'Hiragino Sans GB', 'Microsoft Sans Serif', 'WenQuanYi Micro Hei', sans-serif;background-color: rgb(255, 255, 255)\"><br style=\";padding: 0px\"/></p><p data-type=\"paragraph\" style=\"margin-top: 0px;margin-bottom: 0px;padding: 0px;line-height: 1.875;font-size: 16px;min-height: 30px;white-space: pre-wrap;color: rgb(48, 48, 48);font-family: 'Helvetica Neue', 'PingFang SC', Verdana, 'Microsoft Yahei', 'Hiragino Sans GB', 'Microsoft Sans Serif', 'WenQuanYi Micro Hei', sans-serif;background-color: rgb(255, 255, 255)\">virtualOutbound:每个 Sidecar 都有一个绑定到 0.0.0.0:15001 的 listener,该 listener 下关联了许多 virtual listener。iptables 会先将所有出站流量导入该 listener,该 listener 有一个字段 useOriginalDst 设置为 true,表示会使用最佳匹配原始目的地的方式将请求分发到 virtual listener,如果没有找到任何 virtual listener,将会直接发送到数据包原目的地的 PassthroughCluster。</p><p data-type=\"paragraph\" style=\"margin-top: 0px;margin-bottom: 0px;padding: 0px;line-height: 1.875;font-size: 16px;min-height: 30px;white-space: pre-wrap;color: rgb(48, 48, 48);font-family: 'Helvetica Neue', 'PingFang SC', Verdana, 'Microsoft Yahei', 'Hiragino Sans GB', 'Microsoft Sans Serif', 'WenQuanYi Micro Hei', sans-serif;background-color: rgb(255, 255, 255)\"><br style=\";padding: 0px\"/></p><p data-type=\"paragraph\" style=\"margin-top: 0px;margin-bottom: 0px;padding: 0px;line-height: 1.875;font-size: 16px;min-height: 30px;white-space: pre-wrap;color: rgb(48, 48, 48);font-family: 'Helvetica Neue', 'PingFang SC', Verdana, 'Microsoft Yahei', 'Hiragino Sans GB', 'Microsoft Sans Serif', 'WenQuanYi Micro Hei', sans-serif;background-color: rgb(255, 255, 255)\">useOriginalDst 字段的具体意义是,如果使用 iptables 重定向连接,则代理接收流量的目标地址可能与原始目标地址不同。当此标志设置为 true 时,侦听器会将重定向流量转交给与原始目标地址关联的侦听器。如果没有与原始目标地址关联的侦听器,则流量由接收它的侦听器处理。默认为 false。</p><p data-type=\"paragraph\" style=\"margin-top: 0px;margin-bottom: 0px;padding: 0px;line-height: 1.875;font-size: 16px;min-height: 30px;white-space: pre-wrap;color: rgb(48, 48, 48);font-family: 'Helvetica Neue', 'PingFang SC', Verdana, 'Microsoft Yahei', 'Hiragino Sans GB', 'Microsoft Sans Serif', 'WenQuanYi Micro Hei', sans-serif;background-color: rgb(255, 255, 255)\"><br style=\";padding: 0px\"/></p><p data-type=\"paragraph\" style=\"margin-top: 0px;margin-bottom: 0px;padding: 0px;line-height: 1.875;font-size: 16px;min-height: 30px;white-space: pre-wrap;color: rgb(48, 48, 48);font-family: 'Helvetica Neue', 'PingFang SC', Verdana, 'Microsoft Yahei', 'Hiragino Sans GB', 'Microsoft Sans Serif', 'WenQuanYi Micro Hei', sans-serif;background-color: rgb(255, 255, 255)\">virtualOutbound 的流量处理流程如图所示:</p><p data-type=\"paragraph\" style=\"margin-top: 0px;margin-bottom: 0px;padding: 0px;line-height: 1.875;font-size: 16px;min-height: 30px;white-space: pre-wrap;color: rgb(48, 48, 48);font-family: 'Helvetica Neue', 'PingFang SC', Verdana, 'Microsoft Yahei', 'Hiragino Sans GB', 'Microsoft Sans Serif', 'WenQuanYi Micro Hei', sans-serif;background-color: rgb(255, 255, 255)\"><br style=\";padding: 0px\"/></p><p><img src=\"https://static001.geekbang.org/infoq/7b/7b5c47be87a74349b9d09f016d185f81.png\" style=\";padding: 0px;border: 0px;vertical-align: top;max-width: 100%;height: auto\"/></p><p data-type=\"paragraph\" style=\"margin-top: 0px;margin-bottom: 0px;padding: 0px;line-height: 1.875;font-size: 16px;min-height: 30px;white-space: pre-wrap;color: rgb(48, 48, 48);font-family: 'Helvetica Neue', 'PingFang SC', Verdana, 'Microsoft Yahei', 'Hiragino Sans GB', 'Microsoft Sans Serif', 'WenQuanYi Micro Hei', sans-serif;background-color: rgb(255, 255, 255)\"><br style=\";padding: 0px\"/></p><p data-type=\"paragraph\" style=\"margin-top: 0px;margin-bottom: 0px;padding: 0px;line-height: 1.875;font-size: 16px;min-height: 30px;white-space: pre-wrap;color: rgb(48, 48, 48);font-family: 'Helvetica Neue', 'PingFang SC', Verdana, 'Microsoft Yahei', 'Hiragino Sans GB', 'Microsoft Sans Serif', 'WenQuanYi Micro Hei', sans-serif;background-color: rgb(255, 255, 255)\">这是 virtualOutbound 的部分配置:</p><p data-type=\"paragraph\" style=\"margin-top: 0px;margin-bottom: 0px;padding: 0px;line-height: 1.875;font-size: 16px;min-height: 30px;white-space: pre-wrap;color: rgb(48, 48, 48);font-family: 'Helvetica Neue', 'PingFang SC', Verdana, 'Microsoft Yahei', 'Hiragino Sans GB', 'Microsoft Sans Serif', 'WenQuanYi Micro Hei', sans-serif;background-color: rgb(255, 255, 255)\"><br style=\";padding: 0px\"/></p><pre data-origin=\"pm_code_preview\" style=\"margin-top: 0px;margin-bottom: 0px;padding: 0px;font-family: Courier, 'Courier New', monospace\"><code data-type=\"codeline\" style=\";padding: 0px;font-family: Menlo, Monaco, 'Source Code Pro', 'Courier New', monospace;background: rgb(241, 243, 245);border: none;border-radius: 3px;display: block;line-height: 20px;height: 20px;font-size: 13px\"> {</code><code data-type=\"codeline\" style=\";padding: 0px;font-family: Menlo, Monaco, 'Source Code Pro', 'Courier New', monospace;background: rgb(241, 243, 245);border: none;border-radius: 3px;display: block;line-height: 20px;height: 20px;font-size: 13px\"> "name": "envoy.tcp_proxy",</code><code data-type=\"codeline\" style=\";padding: 0px;font-family: Menlo, Monaco, 'Source Code Pro', 'Courier New', monospace;background: rgb(241, 243, 245);border: none;border-radius: 3px;display: block;line-height: 20px;height: 20px;font-size: 13px\"> "typedConfig": {</code><code data-type=\"codeline\" style=\";padding: 0px;font-family: Menlo, Monaco, 'Source Code Pro', 'Courier New', monospace;background: rgb(241, 243, 245);border: none;border-radius: 3px;display: block;line-height: 20px;height: 20px;font-size: 13px\"> "@type": "type.googleapis.com/envoy.config.filter.network.tcp_proxy.v2.TcpProxy",</code><code data-type=\"codeline\" style=\";padding: 0px;font-family: Menlo, Monaco, 'Source Code Pro', 'Courier New', monospace;background: rgb(241, 243, 245);border: none;border-radius: 3px;display: block;line-height: 20px;height: 20px;font-size: 13px\"> "statPrefix": "PassthroughCluster",</code><code data-type=\"codeline\" style=\";padding: 0px;font-family: Menlo, Monaco, 'Source Code Pro', 'Courier New', monospace;background: rgb(241, 243, 245);border: none;border-radius: 3px;display: block;line-height: 20px;height: 20px;font-size: 13px\"> "cluster": "PassthroughCluster"</code><code data-type=\"codeline\" style=\";padding: 0px;font-family: Menlo, Monaco, 'Source Code Pro', 'Courier New', monospace;background: rgb(241, 243, 245);border: none;border-radius: 3px;display: block;line-height: 20px;height: 20px;font-size: 13px\"> }</code><code data-type=\"codeline\" style=\";padding: 0px;font-family: Menlo, Monaco, 'Source Code Pro', 'Courier New', monospace;background: rgb(241, 243, 245);border: none;border-radius: 3px;display: block;line-height: 20px;height: 20px;font-size: 13px\"> }</code><code data-type=\"codeline\" style=\";padding: 0px;font-family: Menlo, Monaco, 'Source Code Pro', 'Courier New', monospace;background: rgb(241, 243, 245);border: none;border-radius: 3px;display: block;line-height: 20px;height: 20px;font-size: 13px\"> ……………</code><code data-type=\"codeline\" style=\";padding: 0px;font-family: Menlo, Monaco, 'Source Code Pro', 'Courier New', monospace;background: rgb(241, 243, 245);border: none;border-radius: 3px;display: block;line-height: 20px;height: 20px;font-size: 13px\"> "useOriginalDst": true</code><code data-type=\"codeline\" style=\";padding: 0px;font-family: Menlo, Monaco, 'Source Code Pro', 'Courier New', monospace;background: rgb(241, 243, 245);border: none;border-radius: 3px;display: block;line-height: 20px;height: 20px;font-size: 13px\"><br style=\";padding: 0px\"/></code></pre><p>复制代码</p><h2 data-id=\"heading7\" data-type=\"heading\" top=\"4153\" style=\";padding: 26px 0px 4px;font-size: 28px;line-height: 44px;color: rgb(53, 53, 53);white-space: pre-wrap;font-family: 'Helvetica Neue', 'PingFang SC', Verdana, 'Microsoft Yahei', 'Hiragino Sans GB', 'Microsoft Sans Serif', 'WenQuanYi Micro Hei', sans-serif;background-color: rgb(255, 255, 255)\">istio 的 outbond 流量处理</h2><p data-type=\"paragraph\" style=\"margin-top: 0px;margin-bottom: 0px;padding: 0px;line-height: 1.875;font-size: 16px;min-height: 30px;white-space: pre-wrap;color: rgb(48, 48, 48);font-family: 'Helvetica Neue', 'PingFang SC', Verdana, 'Microsoft Yahei', 'Hiragino Sans GB', 'Microsoft Sans Serif', 'WenQuanYi Micro Hei', sans-serif;background-color: rgb(255, 255, 255)\">开启流量治理后,pod 访问外部资源的流量转发路径如图所示:</p><p data-type=\"paragraph\" style=\"margin-top: 0px;margin-bottom: 0px;padding: 0px;line-height: 1.875;font-size: 16px;min-height: 30px;white-space: pre-wrap;color: rgb(48, 48, 48);font-family: 'Helvetica Neue', 'PingFang SC', Verdana, 'Microsoft Yahei', 'Hiragino Sans GB', 'Microsoft Sans Serif', 'WenQuanYi Micro Hei', sans-serif;background-color: rgb(255, 255, 255)\"><br style=\";padding: 0px\"/></p><p><img src=\"https://static001.geekbang.org/infoq/fd/fd458585ac8051a2e5a24502d80da984.png\" style=\";padding: 0px;border: 0px;vertical-align: top;max-width: 100%;height: auto\"/></p><p data-type=\"paragraph\" style=\"margin-top: 0px;margin-bottom: 0px;padding: 0px;line-height: 1.875;font-size: 16px;min-height: 30px;white-space: pre-wrap;color: rgb(48, 48, 48);font-family: 'Helvetica Neue', 'PingFang SC', Verdana, 'Microsoft Yahei', 'Hiragino Sans GB', 'Microsoft Sans Serif', 'WenQuanYi Micro Hei', sans-serif;background-color: rgb(255, 255, 255)\"><br style=\";padding: 0px\"/></p><p data-type=\"paragraph\" style=\"margin-top: 0px;margin-bottom: 0px;padding: 0px;line-height: 1.875;font-size: 16px;min-height: 30px;white-space: pre-wrap;color: rgb(48, 48, 48);font-family: 'Helvetica Neue', 'PingFang SC', Verdana, 'Microsoft Yahei', 'Hiragino Sans GB', 'Microsoft Sans Serif', 'WenQuanYi Micro Hei', sans-serif;background-color: rgb(255, 255, 255)\">istio 注入后 istio-proxy 有一个监听在 15001 的端口,所有非 istio-proxy 用户进程产生的 outbond 流量,通过 iptables 规则被重定向到 15001。</p><p data-type=\"paragraph\" style=\"margin-top: 0px;margin-bottom: 0px;padding: 0px;line-height: 1.875;font-size: 16px;min-height: 30px;white-space: pre-wrap;color: rgb(48, 48, 48);font-family: 'Helvetica Neue', 'PingFang SC', Verdana, 'Microsoft Yahei', 'Hiragino Sans GB', 'Microsoft Sans Serif', 'WenQuanYi Micro Hei', sans-serif;background-color: rgb(255, 255, 255)\"><br style=\";padding: 0px\"/></p><pre data-origin=\"pm_code_preview\" style=\"margin-top: 0px;margin-bottom: 0px;padding: 0px;font-family: Courier, 'Courier New', monospace\"><code data-type=\"codeline\" style=\";padding: 0px;font-family: Menlo, Monaco, 'Source Code Pro', 'Courier New', monospace;background: rgb(241, 243, 245);border: none;border-radius: 3px;display: block;line-height: 20px;height: 20px;font-size: 13px\"> # Sidecar 注入的 pod 监听的端口</code><code data-type=\"codeline\" style=\";padding: 0px;font-family: Menlo, Monaco, 'Source Code Pro', 'Courier New', monospace;background: rgb(241, 243, 245);border: none;border-radius: 3px;display: block;line-height: 20px;height: 20px;font-size: 13px\"> $ ss -tulnp</code><code data-type=\"codeline\" style=\";padding: 0px;font-family: Menlo, Monaco, 'Source Code Pro', 'Courier New', monospace;background: rgb(241, 243, 245);border: none;border-radius: 3px;display: block;line-height: 20px;height: 20px;font-size: 13px\"> State Recv-Q Send-Q Local Address:Port Peer Address:Port</code><code data-type=\"codeline\" style=\";padding: 0px;font-family: Menlo, Monaco, 'Source Code Pro', 'Courier New', monospace;background: rgb(241, 243, 245);border: none;border-radius: 3px;display: block;line-height: 20px;height: 20px;font-size: 13px\"> LISTEN 0 128 *:80 *:*</code><code data-type=\"codeline\" style=\";padding: 0px;font-family: Menlo, Monaco, 'Source Code Pro', 'Courier New', monospace;background: rgb(241, 243, 245);border: none;border-radius: 3px;display: block;line-height: 20px;height: 20px;font-size: 13px\"> LISTEN 0 128 *:15090 *:*</code><code data-type=\"codeline\" style=\";padding: 0px;font-family: Menlo, Monaco, 'Source Code Pro', 'Courier New', monospace;background: rgb(241, 243, 245);border: none;border-radius: 3px;display: block;line-height: 20px;height: 20px;font-size: 13px\"> LISTEN 0 128 127.0.0.1:15000 *:*</code><code data-type=\"codeline\" style=\";padding: 0px;font-family: Menlo, Monaco, 'Source Code Pro', 'Courier New', monospace;background: rgb(241, 243, 245);border: none;border-radius: 3px;display: block;line-height: 20px;height: 20px;font-size: 13px\"> LISTEN 0 128 *:15001 *:*</code><code data-type=\"codeline\" style=\";padding: 0px;font-family: Menlo, Monaco, 'Source Code Pro', 'Courier New', monospace;background: rgb(241, 243, 245);border: none;border-radius: 3px;display: block;line-height: 20px;height: 20px;font-size: 13px\"> LISTEN 0 128 *:15006 *:*</code><code data-type=\"codeline\" style=\";padding: 0px;font-family: Menlo, Monaco, 'Source Code Pro', 'Courier New', monospace;background: rgb(241, 243, 245);border: none;border-radius: 3px;display: block;line-height: 20px;height: 20px;font-size: 13px\"> LISTEN 0 128 [::]:15020 [::]:*</code><code data-type=\"codeline\" style=\";padding: 0px;font-family: Menlo, Monaco, 'Source Code Pro', 'Courier New', monospace;background: rgb(241, 243, 245);border: none;border-radius: 3px;display: block;line-height: 20px;height: 20px;font-size: 13px\"><br style=\";padding: 0px\"/></code><code data-type=\"codeline\" style=\";padding: 0px;font-family: Menlo, Monaco, 'Source Code Pro', 'Courier New', monospace;background: rgb(241, 243, 245);border: none;border-radius: 3px;display: block;line-height: 20px;height: 20px;font-size: 13px\"> # Pod 内部的 iptables 表项</code><code data-type=\"codeline\" style=\";padding: 0px;font-family: Menlo, Monaco, 'Source Code Pro', 'Courier New', monospace;background: rgb(241, 243, 245);border: none;border-radius: 3px;display: block;line-height: 20px;height: 20px;font-size: 13px\"> $ iptables-save</code><code data-type=\"codeline\" style=\";padding: 0px;font-family: Menlo, Monaco, 'Source Code Pro', 'Courier New', monospace;background: rgb(241, 243, 245);border: none;border-radius: 3px;display: block;line-height: 20px;height: 20px;font-size: 13px\"> # Generated by iptables-save v1.4.21 on Fri Sep 17 13:47:09 2021</code><code data-type=\"codeline\" style=\";padding: 0px;font-family: Menlo, Monaco, 'Source Code Pro', 'Courier New', monospace;background: rgb(241, 243, 245);border: none;border-radius: 3px;display: block;line-height: 20px;height: 20px;font-size: 13px\"> *nat</code><code data-type=\"codeline\" style=\";padding: 0px;font-family: Menlo, Monaco, 'Source Code Pro', 'Courier New', monospace;background: rgb(241, 243, 245);border: none;border-radius: 3px;display: block;line-height: 20px;height: 20px;font-size: 13px\"> :PREROUTING ACCEPT [129886:7793160]</code><code data-type=\"codeline\" style=\";padding: 0px;font-family: Menlo, Monaco, 'Source Code Pro', 'Courier New', monospace;background: rgb(241, 243, 245);border: none;border-radius: 3px;display: block;line-height: 20px;height: 20px;font-size: 13px\"> :INPUT ACCEPT [181806:10908360]</code><code data-type=\"codeline\" style=\";padding: 0px;font-family: Menlo, Monaco, 'Source Code Pro', 'Courier New', monospace;background: rgb(241, 243, 245);border: none;border-radius: 3px;display: block;line-height: 20px;height: 20px;font-size: 13px\"> :OUTPUT ACCEPT [53409:3257359]</code><code data-type=\"codeline\" style=\";padding: 0px;font-family: Menlo, Monaco, 'Source Code Pro', 'Courier New', monospace;background: rgb(241, 243, 245);border: none;border-radius: 3px;display: block;line-height: 20px;height: 20px;font-size: 13px\"> :POSTROUTING ACCEPT [53472:3261139]</code><code data-type=\"codeline\" style=\";padding: 0px;font-family: Menlo, Monaco, 'Source Code Pro', 'Courier New', monospace;background: rgb(241, 243, 245);border: none;border-radius: 3px;display: block;line-height: 20px;height: 20px;font-size: 13px\"> :istio_INBOUND - [0:0]</code><code data-type=\"codeline\" style=\";padding: 0px;font-family: Menlo, Monaco, 'Source Code Pro', 'Courier New', monospace;background: rgb(241, 243, 245);border: none;border-radius: 3px;display: block;line-height: 20px;height: 20px;font-size: 13px\"> :istio_IN_REDIRECT - [0:0]</code><code data-type=\"codeline\" style=\";padding: 0px;font-family: Menlo, Monaco, 'Source Code Pro', 'Courier New', monospace;background: rgb(241, 243, 245);border: none;border-radius: 3px;display: block;line-height: 20px;height: 20px;font-size: 13px\"> :istio_OUTPUT - [0:0]</code><code data-type=\"codeline\" style=\";padding: 0px;font-family: Menlo, Monaco, 'Source Code Pro', 'Courier New', monospace;background: rgb(241, 243, 245);border: none;border-radius: 3px;display: block;line-height: 20px;height: 20px;font-size: 13px\"> :istio_REDIRECT - [0:0]</code><code data-type=\"codeline\" style=\";padding: 0px;font-family: Menlo, Monaco, 'Source Code Pro', 'Courier New', monospace;background: rgb(241, 243, 245);border: none;border-radius: 3px;display: block;line-height: 20px;height: 20px;font-size: 13px\"> -A PREROUTING -p tcp -j istio_INBOUND</code><code data-type=\"codeline\" style=\";padding: 0px;font-family: Menlo, Monaco, 'Source Code Pro', 'Courier New', monospace;background: rgb(241, 243, 245);border: none;border-radius: 3px;display: block;line-height: 20px;height: 20px;font-size: 13px\"> -A OUTPUT -p tcp -j istio_OUTPUT</code><code data-type=\"codeline\" style=\";padding: 0px;font-family: Menlo, Monaco, 'Source Code Pro', 'Courier New', monospace;background: rgb(241, 243, 245);border: none;border-radius: 3px;display: block;line-height: 20px;height: 20px;font-size: 13px\"> -A istio_INBOUND -p tcp -m tcp --dport 22 -j RETURN</code><code data-type=\"codeline\" style=\";padding: 0px;font-family: Menlo, Monaco, 'Source Code Pro', 'Courier New', monospace;background: rgb(241, 243, 245);border: none;border-radius: 3px;display: block;line-height: 20px;height: 20px;font-size: 13px\"> -A istio_INBOUND -p tcp -m tcp --dport 15020 -j RETURN</code><code data-type=\"codeline\" style=\";padding: 0px;font-family: Menlo, Monaco, 'Source Code Pro', 'Courier New', monospace;background: rgb(241, 243, 245);border: none;border-radius: 3px;display: block;line-height: 20px;height: 20px;font-size: 13px\"> -A istio_INBOUND -p tcp -j istio_IN_REDIRECT</code><code data-type=\"codeline\" style=\";padding: 0px;font-family: Menlo, Monaco, 'Source Code Pro', 'Courier New', monospace;background: rgb(241, 243, 245);border: none;border-radius: 3px;display: block;line-height: 20px;height: 20px;font-size: 13px\"> -A istio_IN_REDIRECT -p tcp -j REDIRECT --to-ports 15006</code><code data-type=\"codeline\" style=\";padding: 0px;font-family: Menlo, Monaco, 'Source Code Pro', 'Courier New', monospace;background: rgb(241, 243, 245);border: none;border-radius: 3px;display: block;line-height: 20px;height: 20px;font-size: 13px\"> -A istio_OUTPUT -s 127.0.0.6/32 -o lo -j RETURN</code><code data-type=\"codeline\" style=\";padding: 0px;font-family: Menlo, Monaco, 'Source Code Pro', 'Courier New', monospace;background: rgb(241, 243, 245);border: none;border-radius: 3px;display: block;line-height: 20px;height: 20px;font-size: 13px\"> -A istio_OUTPUT ! -d 127.0.0.1/32 -o lo -j istio_IN_REDIRECT</code><code data-type=\"codeline\" style=\";padding: 0px;font-family: Menlo, Monaco, 'Source Code Pro', 'Courier New', monospace;background: rgb(241, 243, 245);border: none;border-radius: 3px;display: block;line-height: 20px;height: 20px;font-size: 13px\"> -A istio_OUTPUT -m owner --uid-owner 1337 -j RETURN</code><code data-type=\"codeline\" style=\";padding: 0px;font-family: Menlo, Monaco, 'Source Code Pro', 'Courier New', monospace;background: rgb(241, 243, 245);border: none;border-radius: 3px;display: block;line-height: 20px;height: 20px;font-size: 13px\"> -A istio_OUTPUT -m owner --gid-owner 1337 -j RETURN</code><code data-type=\"codeline\" style=\";padding: 0px;font-family: Menlo, Monaco, 'Source Code Pro', 'Courier New', monospace;background: rgb(241, 243, 245);border: none;border-radius: 3px;display: block;line-height: 20px;height: 20px;font-size: 13px\"> -A istio_OUTPUT -d 127.0.0.1/32 -j RETURN</code><code data-type=\"codeline\" style=\";padding: 0px;font-family: Menlo, Monaco, 'Source Code Pro', 'Courier New', monospace;background: rgb(241, 243, 245);border: none;border-radius: 3px;display: block;line-height: 20px;height: 20px;font-size: 13px\"> -A istio_OUTPUT -j istio_REDIRECT</code><code data-type=\"codeline\" style=\";padding: 0px;font-family: Menlo, Monaco, 'Source Code Pro', 'Courier New', monospace;background: rgb(241, 243, 245);border: none;border-radius: 3px;display: block;line-height: 20px;height: 20px;font-size: 13px\"> -A istio_REDIRECT -p tcp -j REDIRECT --to-ports 15001</code><code data-type=\"codeline\" style=\";padding: 0px;font-family: Menlo, Monaco, 'Source Code Pro', 'Courier New', monospace;background: rgb(241, 243, 245);border: none;border-radius: 3px;display: block;line-height: 20px;height: 20px;font-size: 13px\"> COMMIT</code><code data-type=\"codeline\" style=\";padding: 0px;font-family: Menlo, Monaco, 'Source Code Pro', 'Courier New', monospace;background: rgb(241, 243, 245);border: none;border-radius: 3px;display: block;line-height: 20px;height: 20px;font-size: 13px\"> # Completed on Fri Sep 17 13:47:09 2021</code><code data-type=\"codeline\" style=\";padding: 0px;font-family: Menlo, Monaco, 'Source Code Pro', 'Courier New', monospace;background: rgb(241, 243, 245);border: none;border-radius: 3px;display: block;line-height: 20px;height: 20px;font-size: 13px\"><br style=\";padding: 0px\"/></code></pre><p>复制代码</p><p data-type=\"paragraph\" style=\"margin-top: 0px;margin-bottom: 0px;padding: 0px;line-height: 1.875;font-size: 16px;min-height: 30px;white-space: pre-wrap;color: rgb(48, 48, 48);font-family: 'Helvetica Neue', 'PingFang SC', Verdana, 'Microsoft Yahei', 'Hiragino Sans GB', 'Microsoft Sans Serif', 'WenQuanYi Micro Hei', sans-serif;background-color: rgb(255, 255, 255)\"><br style=\";padding: 0px\"/></p><p data-type=\"paragraph\" style=\"margin-top: 0px;margin-bottom: 0px;padding: 0px;line-height: 1.875;font-size: 16px;min-height: 30px;white-space: pre-wrap;color: rgb(48, 48, 48);font-family: 'Helvetica Neue', 'PingFang SC', Verdana, 'Microsoft Yahei', 'Hiragino Sans GB', 'Microsoft Sans Serif', 'WenQuanYi Micro Hei', sans-serif;background-color: rgb(255, 255, 255)\">istio-proxy 收到流量后,大致的处理步骤如下:</p><p data-type=\"paragraph\" style=\"margin-top: 0px;margin-bottom: 0px;padding: 0px;line-height: 1.875;font-size: 16px;min-height: 30px;white-space: pre-wrap;color: rgb(48, 48, 48);font-family: 'Helvetica Neue', 'PingFang SC', Verdana, 'Microsoft Yahei', 'Hiragino Sans GB', 'Microsoft Sans Serif', 'WenQuanYi Micro Hei', sans-serif;background-color: rgb(255, 255, 255)\"><br style=\";padding: 0px\"/></p><p><img src=\"https://static001.geekbang.org/infoq/3b/3b9f74824eaa1beb587e9ff428d80b3e.png\" style=\";padding: 0px;border: 0px;vertical-align: top;max-width: 100%;height: auto\"/></p><p data-type=\"paragraph\" style=\"margin-top: 0px;margin-bottom: 0px;padding: 0px;line-height: 1.875;font-size: 16px;min-height: 30px;white-space: pre-wrap;color: rgb(48, 48, 48);font-family: 'Helvetica Neue', 'PingFang SC', Verdana, 'Microsoft Yahei', 'Hiragino Sans GB', 'Microsoft Sans Serif', 'WenQuanYi Micro Hei', sans-serif;background-color: rgb(255, 255, 255)\"><br style=\";padding: 0px\"/></p><ul data-type=\"bulletedlist\" style=\"list-style-type: none;\" class=\" list-paddingleft-2\"><li><p data-type=\"paragraph\" style=\"margin-top: 0px;margin-bottom: 0px;padding: 0px 0px 0px 24px;line-height: 1.875;font-size: 16px;min-height: 30px;white-space: pre-wrap;position: relative\">Proxy 在 ALLOW_ANY 模式下没有匹配上 listener 将被直接转发。</p></li><li><p data-type=\"paragraph\" style=\"margin-top: 0px;margin-bottom: 0px;padding: 0px 0px 0px 24px;line-height: 1.875;font-size: 16px;min-height: 30px;white-space: pre-wrap;position: relative\">listener 关联了 type 为 ORIGINAL_DST 的 Cluster 将使用原始请求种的 IP 地址。</p></li><li><p data-type=\"paragraph\" style=\"margin-top: 0px;margin-bottom: 0px;padding: 0px 0px 0px 24px;line-height: 1.875;font-size: 16px;min-height: 30px;white-space: pre-wrap;position: relative\">匹配上了 BlackHoleCluster,将不会被转发。</p></li></ul><p data-type=\"paragraph\" style=\"margin-top: 0px;margin-bottom: 0px;padding: 0px;line-height: 1.875;font-size: 16px;min-height: 30px;white-space: pre-wrap;color: rgb(48, 48, 48);font-family: 'Helvetica Neue', 'PingFang SC', Verdana, 'Microsoft Yahei', 'Hiragino Sans GB', 'Microsoft Sans Serif', 'WenQuanYi Micro Hei', sans-serif;background-color: rgb(255, 255, 255)\"><br style=\";padding: 0px\"/></p><p data-type=\"paragraph\" style=\"margin-top: 0px;margin-bottom: 0px;padding: 0px;line-height: 1.875;font-size: 16px;min-height: 30px;white-space: pre-wrap;color: rgb(48, 48, 48);font-family: 'Helvetica Neue', 'PingFang SC', Verdana, 'Microsoft Yahei', 'Hiragino Sans GB', 'Microsoft Sans Serif', 'WenQuanYi Micro Hei', sans-serif;background-color: rgb(255, 255, 255)\">被代理流量的匹配步骤大致如下:</p><p data-type=\"paragraph\" style=\"margin-top: 0px;margin-bottom: 0px;padding: 0px;line-height: 1.875;font-size: 16px;min-height: 30px;white-space: pre-wrap;color: rgb(48, 48, 48);font-family: 'Helvetica Neue', 'PingFang SC', Verdana, 'Microsoft Yahei', 'Hiragino Sans GB', 'Microsoft Sans Serif', 'WenQuanYi Micro Hei', sans-serif;background-color: rgb(255, 255, 255)\"><br style=\";padding: 0px\"/></p><p><img src=\"https://static001.geekbang.org/infoq/73/73adb9516df06d04dec1862884d492ca.png\" style=\";padding: 0px;border: 0px;vertical-align: top;max-width: 100%;height: auto\"/></p><p data-type=\"paragraph\" style=\"margin-top: 0px;margin-bottom: 0px;padding: 0px;line-height: 1.875;font-size: 16px;min-height: 30px;white-space: pre-wrap;color: rgb(48, 48, 48);font-family: 'Helvetica Neue', 'PingFang SC', Verdana, 'Microsoft Yahei', 'Hiragino Sans GB', 'Microsoft Sans Serif', 'WenQuanYi Micro Hei', sans-serif;background-color: rgb(255, 255, 255)\"><br style=\";padding: 0px\"/></p><p data-type=\"paragraph\" style=\"margin-top: 0px;margin-bottom: 0px;padding: 0px;line-height: 1.875;font-size: 16px;min-height: 30px;white-space: pre-wrap;color: rgb(48, 48, 48);font-family: 'Helvetica Neue', 'PingFang SC', Verdana, 'Microsoft Yahei', 'Hiragino Sans GB', 'Microsoft Sans Serif', 'WenQuanYi Micro Hei', sans-serif;background-color: rgb(255, 255, 255)\">疑问:isito 为 svc 创建的 listener 地址是全零的,集群内部的端口是会存在复用的,那 istio 到底是怎么区分流量的呢?</p><p data-type=\"paragraph\" style=\"margin-top: 0px;margin-bottom: 0px;padding: 0px;line-height: 1.875;font-size: 16px;min-height: 30px;white-space: pre-wrap;color: rgb(48, 48, 48);font-family: 'Helvetica Neue', 'PingFang SC', Verdana, 'Microsoft Yahei', 'Hiragino Sans GB', 'Microsoft Sans Serif', 'WenQuanYi Micro Hei', sans-serif;background-color: rgb(255, 255, 255)\"><br style=\";padding: 0px\"/></p><p data-type=\"paragraph\" style=\"margin-top: 0px;margin-bottom: 0px;padding: 0px;line-height: 1.875;font-size: 16px;min-height: 30px;white-space: pre-wrap;color: rgb(48, 48, 48);font-family: 'Helvetica Neue', 'PingFang SC', Verdana, 'Microsoft Yahei', 'Hiragino Sans GB', 'Microsoft Sans Serif', 'WenQuanYi Micro Hei', sans-serif;background-color: rgb(255, 255, 255)\">关键就在于 route,route 由 virtual_host 条目组成,这些 virtual_host 条目就是根据 svc 的信息生成的,访问集群内部的 svc 时,在 route 里可以根据域名或者 svc 对应的 virtual_ip 进行精确匹配,所以完全不需要担心啦。</p><p data-type=\"paragraph\" style=\"margin-top: 0px;margin-bottom: 0px;padding: 0px;line-height: 1.875;font-size: 16px;min-height: 30px;white-space: pre-wrap;color: rgb(48, 48, 48);font-family: 'Helvetica Neue', 'PingFang SC', Verdana, 'Microsoft Yahei', 'Hiragino Sans GB', 'Microsoft Sans Serif', 'WenQuanYi Micro Hei', sans-serif;background-color: rgb(255, 255, 255)\"><br style=\";padding: 0px\"/></p><pre data-origin=\"pm_code_preview\" style=\"margin-top: 0px;margin-bottom: 0px;padding: 0px;font-family: Courier, 'Courier New', monospace\"><code data-type=\"codeline\" style=\";padding: 0px;font-family: Menlo, Monaco, 'Source Code Pro', 'Courier New', monospace;background: rgb(241, 243, 245);border: none;border-radius: 3px;display: block;line-height: 20px;height: 20px;font-size: 13px\"> $ kubectl get svc -A | grep 8001</code><code data-type=\"codeline\" style=\";padding: 0px;font-family: Menlo, Monaco, 'Source Code Pro', 'Courier New', monospace;background: rgb(241, 243, 245);border: none;border-radius: 3px;display: block;line-height: 20px;height: 20px;font-size: 13px\"> NodePort 10.233.34.158 <none> 8001:30333/TCP 8d</code><code data-type=\"codeline\" style=\";padding: 0px;font-family: Menlo, Monaco, 'Source Code Pro', 'Courier New', monospace;background: rgb(241, 243, 245);border: none;border-radius: 3px;display: block;line-height: 20px;height: 20px;font-size: 13px\"> NodePort 10.233.9.105 <none> 8001:31717/TCP 8d</code><code data-type=\"codeline\" style=\";padding: 0px;font-family: Menlo, Monaco, 'Source Code Pro', 'Courier New', monospace;background: rgb(241, 243, 245);border: none;border-radius: 3px;display: block;line-height: 20px;height: 20px;font-size: 13px\"> NodePort 10.233.60.59 <none> 8001:31135/TCP 2d16h</code><code data-type=\"codeline\" style=\";padding: 0px;font-family: Menlo, Monaco, 'Source Code Pro', 'Courier New', monospace;background: rgb(241, 243, 245);border: none;border-radius: 3px;display: block;line-height: 20px;height: 20px;font-size: 13px\"> NodePort 10.233.18.212 <none> 8001:32407/TCP 8d</code><code data-type=\"codeline\" style=\";padding: 0px;font-family: Menlo, Monaco, 'Source Code Pro', 'Courier New', monospace;background: rgb(241, 243, 245);border: none;border-radius: 3px;display: block;line-height: 20px;height: 20px;font-size: 13px\"> NodePort 10.233.15.5 <none> 8001:30079/TCP 8d</code><code data-type=\"codeline\" style=\";padding: 0px;font-family: Menlo, Monaco, 'Source Code Pro', 'Courier New', monospace;background: rgb(241, 243, 245);border: none;border-radius: 3px;display: block;line-height: 20px;height: 20px;font-size: 13px\"> NodePort 10.233.59.21 <none> 8001:31103/TCP 8d</code><code data-type=\"codeline\" style=\";padding: 0px;font-family: Menlo, Monaco, 'Source Code Pro', 'Courier New', monospace;background: rgb(241, 243, 245);border: none;border-radius: 3px;display: block;line-height: 20px;height: 20px;font-size: 13px\"> NodePort 10.233.17.123 <none> 8001:31786/TCP 8d</code><code data-type=\"codeline\" style=\";padding: 0px;font-family: Menlo, Monaco, 'Source Code Pro', 'Courier New', monospace;background: rgb(241, 243, 245);border: none;border-radius: 3px;display: block;line-height: 20px;height: 20px;font-size: 13px\"> NodePort 10.233.9.196 <none> 8001:32662/TCP 8d</code><code data-type=\"codeline\" style=\";padding: 0px;font-family: Menlo, Monaco, 'Source Code Pro', 'Courier New', monospace;background: rgb(241, 243, 245);border: none;border-radius: 3px;display: block;line-height: 20px;height: 20px;font-size: 13px\"> NodePort 10.233.62.85 <none> 8001:32104/TCP 8d</code><code data-type=\"codeline\" style=\";padding: 0px;font-family: Menlo, Monaco, 'Source Code Pro', 'Courier New', monospace;background: rgb(241, 243, 245);border: none;border-radius: 3px;display: block;line-height: 20px;height: 20px;font-size: 13px\"> ClusterIP 10.233.49.245 <none> 8000/TCP,8001/TCP,8443/TCP,8444/TCP</code><code data-type=\"codeline\" style=\";padding: 0px;font-family: Menlo, Monaco, 'Source Code Pro', 'Courier New', monospace;background: rgb(241, 243, 245);border: none;border-radius: 3px;display: block;line-height: 20px;height: 20px;font-size: 13px\"><br style=\";padding: 0px\"/></code></pre><p>复制代码</p><p data-type=\"paragraph\" style=\"margin-top: 0px;margin-bottom: 0px;padding: 0px;line-height: 1.875;font-size: 16px;min-height: 30px;white-space: pre-wrap;color: rgb(48, 48, 48);font-family: 'Helvetica Neue', 'PingFang SC', Verdana, 'Microsoft Yahei', 'Hiragino Sans GB', 'Microsoft Sans Serif', 'WenQuanYi Micro Hei', sans-serif;background-color: rgb(255, 255, 255)\"><br style=\";padding: 0px\"/></p><p data-type=\"paragraph\" style=\"margin-top: 0px;margin-bottom: 0px;padding: 0px;line-height: 1.875;font-size: 16px;min-height: 30px;white-space: pre-wrap;color: rgb(48, 48, 48);font-family: 'Helvetica Neue', 'PingFang SC', Verdana, 'Microsoft Yahei', 'Hiragino Sans GB', 'Microsoft Sans Serif', 'WenQuanYi Micro Hei', sans-serif;background-color: rgb(255, 255, 255)\">这是 route 下的 virtual_host 条目:</p><p data-type=\"paragraph\" style=\"margin-top: 0px;margin-bottom: 0px;padding: 0px;line-height: 1.875;font-size: 16px;min-height: 30px;white-space: pre-wrap;color: rgb(48, 48, 48);font-family: 'Helvetica Neue', 'PingFang SC', Verdana, 'Microsoft Yahei', 'Hiragino Sans GB', 'Microsoft Sans Serif', 'WenQuanYi Micro Hei', sans-serif;background-color: rgb(255, 255, 255)\"><br style=\";padding: 0px\"/></p><pre data-origin=\"pm_code_preview\" style=\"margin-top: 0px;margin-bottom: 0px;padding: 0px;font-family: Courier, 'Courier New', monospace\"><code data-type=\"codeline\" style=\";padding: 0px;font-family: Menlo, Monaco, 'Source Code Pro', 'Courier New', monospace;background: rgb(241, 243, 245);border: none;border-radius: 3px;display: block;line-height: 20px;height: 20px;font-size: 13px\"> {</code><code data-type=\"codeline\" style=\";padding: 0px;font-family: Menlo, Monaco, 'Source Code Pro', 'Courier New', monospace;background: rgb(241, 243, 245);border: none;border-radius: 3px;display: block;line-height: 20px;height: 20px;font-size: 13px\"> "name": "8001",</code><code data-type=\"codeline\" style=\";padding: 0px;font-family: Menlo, Monaco, 'Source Code Pro', 'Courier New', monospace;background: rgb(241, 243, 245);border: none;border-radius: 3px;display: block;line-height: 20px;height: 20px;font-size: 13px\"> "virtualHosts": [</code><code data-type=\"codeline\" style=\";padding: 0px;font-family: Menlo, Monaco, 'Source Code Pro', 'Courier New', monospace;background: rgb(241, 243, 245);border: none;border-radius: 3px;display: block;line-height: 20px;height: 20px;font-size: 13px\"> {</code><code data-type=\"codeline\" style=\";padding: 0px;font-family: Menlo, Monaco, 'Source Code Pro', 'Courier New', monospace;background: rgb(241, 243, 245);border: none;border-radius: 3px;display: block;line-height: 20px;height: 20px;font-size: 13px\"> "name": "merchant-center.open.svc.cluster.local:8001",</code><code data-type=\"codeline\" style=\";padding: 0px;font-family: Menlo, Monaco, 'Source Code Pro', 'Courier New', monospace;background: rgb(241, 243, 245);border: none;border-radius: 3px;display: block;line-height: 20px;height: 20px;font-size: 13px\"> "domains": [</code><code data-type=\"codeline\" style=\";padding: 0px;font-family: Menlo, Monaco, 'Source Code Pro', 'Courier New', monospace;background: rgb(241, 243, 245);border: none;border-radius: 3px;display: block;line-height: 20px;height: 20px;font-size: 13px\"> "merchant-center.open.svc.cluster.local",</code><code data-type=\"codeline\" style=\";padding: 0px;font-family: Menlo, Monaco, 'Source Code Pro', 'Courier New', monospace;background: rgb(241, 243, 245);border: none;border-radius: 3px;display: block;line-height: 20px;height: 20px;font-size: 13px\"> "merchant-center.open.svc.cluster.local:8001",</code><code data-type=\"codeline\" style=\";padding: 0px;font-family: Menlo, Monaco, 'Source Code Pro', 'Courier New', monospace;background: rgb(241, 243, 245);border: none;border-radius: 3px;display: block;line-height: 20px;height: 20px;font-size: 13px\"> "merchant-center.open",</code><code data-type=\"codeline\" style=\";padding: 0px;font-family: Menlo, Monaco, 'Source Code Pro', 'Courier New', monospace;background: rgb(241, 243, 245);border: none;border-radius: 3px;display: block;line-height: 20px;height: 20px;font-size: 13px\"> "merchant-center.open:8001",</code><code data-type=\"codeline\" style=\";padding: 0px;font-family: Menlo, Monaco, 'Source Code Pro', 'Courier New', monospace;background: rgb(241, 243, 245);border: none;border-radius: 3px;display: block;line-height: 20px;height: 20px;font-size: 13px\"> "merchant-center.open.svc.cluster",</code><code data-type=\"codeline\" style=\";padding: 0px;font-family: Menlo, Monaco, 'Source Code Pro', 'Courier New', monospace;background: rgb(241, 243, 245);border: none;border-radius: 3px;display: block;line-height: 20px;height: 20px;font-size: 13px\"> "merchant-center.open.svc.cluster:8001",</code><code data-type=\"codeline\" style=\";padding: 0px;font-family: Menlo, Monaco, 'Source Code Pro', 'Courier New', monospace;background: rgb(241, 243, 245);border: none;border-radius: 3px;display: block;line-height: 20px;height: 20px;font-size: 13px\"> "merchant-center.open.svc",</code><code data-type=\"codeline\" style=\";padding: 0px;font-family: Menlo, Monaco, 'Source Code Pro', 'Courier New', monospace;background: rgb(241, 243, 245);border: none;border-radius: 3px;display: block;line-height: 20px;height: 20px;font-size: 13px\"> "merchant-center.open.svc:8001",</code><code data-type=\"codeline\" style=\";padding: 0px;font-family: Menlo, Monaco, 'Source Code Pro', 'Courier New', monospace;background: rgb(241, 243, 245);border: none;border-radius: 3px;display: block;line-height: 20px;height: 20px;font-size: 13px\"> "10.233.60.59",</code><code data-type=\"codeline\" style=\";padding: 0px;font-family: Menlo, Monaco, 'Source Code Pro', 'Courier New', monospace;background: rgb(241, 243, 245);border: none;border-radius: 3px;display: block;line-height: 20px;height: 20px;font-size: 13px\"> "10.233.60.59:8001"</code><code data-type=\"codeline\" style=\";padding: 0px;font-family: Menlo, Monaco, 'Source Code Pro', 'Courier New', monospace;background: rgb(241, 243, 245);border: none;border-radius: 3px;display: block;line-height: 20px;height: 20px;font-size: 13px\"> ],</code><code data-type=\"codeline\" style=\";padding: 0px;font-family: Menlo, Monaco, 'Source Code Pro', 'Courier New', monospace;background: rgb(241, 243, 245);border: none;border-radius: 3px;display: block;line-height: 20px;height: 20px;font-size: 13px\"> "routes": [</code><code data-type=\"codeline\" style=\";padding: 0px;font-family: Menlo, Monaco, 'Source Code Pro', 'Courier New', monospace;background: rgb(241, 243, 245);border: none;border-radius: 3px;display: block;line-height: 20px;height: 20px;font-size: 13px\"> {</code><code data-type=\"codeline\" style=\";padding: 0px;font-family: Menlo, Monaco, 'Source Code Pro', 'Courier New', monospace;background: rgb(241, 243, 245);border: none;border-radius: 3px;display: block;line-height: 20px;height: 20px;font-size: 13px\"> "name": "default",</code><code data-type=\"codeline\" style=\";padding: 0px;font-family: Menlo, Monaco, 'Source Code Pro', 'Courier New', monospace;background: rgb(241, 243, 245);border: none;border-radius: 3px;display: block;line-height: 20px;height: 20px;font-size: 13px\"> "match": {</code><code data-type=\"codeline\" style=\";padding: 0px;font-family: Menlo, Monaco, 'Source Code Pro', 'Courier New', monospace;background: rgb(241, 243, 245);border: none;border-radius: 3px;display: block;line-height: 20px;height: 20px;font-size: 13px\"> "prefix": "/"</code><code data-type=\"codeline\" style=\";padding: 0px;font-family: Menlo, Monaco, 'Source Code Pro', 'Courier New', monospace;background: rgb(241, 243, 245);border: none;border-radius: 3px;display: block;line-height: 20px;height: 20px;font-size: 13px\"> },</code><code data-type=\"codeline\" style=\";padding: 0px;font-family: Menlo, Monaco, 'Source Code Pro', 'Courier New', monospace;background: rgb(241, 243, 245);border: none;border-radius: 3px;display: block;line-height: 20px;height: 20px;font-size: 13px\"> "route": {</code><code data-type=\"codeline\" style=\";padding: 0px;font-family: Menlo, Monaco, 'Source Code Pro', 'Courier New', monospace;background: rgb(241, 243, 245);border: none;border-radius: 3px;display: block;line-height: 20px;height: 20px;font-size: 13px\"> "cluster": "outbound|8001||merchant-center.open.svc.cluster.local",</code><code data-type=\"codeline\" style=\";padding: 0px;font-family: Menlo, Monaco, 'Source Code Pro', 'Courier New', monospace;background: rgb(241, 243, 245);border: none;border-radius: 3px;display: block;line-height: 20px;height: 20px;font-size: 13px\"> "timeout": "0s",</code><code data-type=\"codeline\" style=\";padding: 0px;font-family: Menlo, Monaco, 'Source Code Pro', 'Courier New', monospace;background: rgb(241, 243, 245);border: none;border-radius: 3px;display: block;line-height: 20px;height: 20px;font-size: 13px\"> "retryPolicy": {</code><code data-type=\"codeline\" style=\";padding: 0px;font-family: Menlo, Monaco, 'Source Code Pro', 'Courier New', monospace;background: rgb(241, 243, 245);border: none;border-radius: 3px;display: block;line-height: 20px;height: 20px;font-size: 13px\"> "retryOn": "connect-failure,refused-stream,unavailable,cancelled,resource-exhausted,retriable-status-codes",</code><code data-type=\"codeline\" style=\";padding: 0px;font-family: Menlo, Monaco, 'Source Code Pro', 'Courier New', monospace;background: rgb(241, 243, 245);border: none;border-radius: 3px;display: block;line-height: 20px;height: 20px;font-size: 13px\"> "numRetries": 2,</code><code data-type=\"codeline\" style=\";padding: 0px;font-family: Menlo, Monaco, 'Source Code Pro', 'Courier New', monospace;background: rgb(241, 243, 245);border: none;border-radius: 3px;display: block;line-height: 20px;height: 20px;font-size: 13px\"> "retryHostPredicate": [</code><code data-type=\"codeline\" style=\";padding: 0px;font-family: Menlo, Monaco, 'Source Code Pro', 'Courier New', monospace;background: rgb(241, 243, 245);border: none;border-radius: 3px;display: block;line-height: 20px;height: 20px;font-size: 13px\"> {</code><code data-type=\"codeline\" style=\";padding: 0px;font-family: Menlo, Monaco, 'Source Code Pro', 'Courier New', monospace;background: rgb(241, 243, 245);border: none;border-radius: 3px;display: block;line-height: 20px;height: 20px;font-size: 13px\"> "name": "envoy.retry_host_predicates.previous_hosts"</code><code data-type=\"codeline\" style=\";padding: 0px;font-family: Menlo, Monaco, 'Source Code Pro', 'Courier New', monospace;background: rgb(241, 243, 245);border: none;border-radius: 3px;display: block;line-height: 20px;height: 20px;font-size: 13px\"> }</code><code data-type=\"codeline\" style=\";padding: 0px;font-family: Menlo, Monaco, 'Source Code Pro', 'Courier New', monospace;background: rgb(241, 243, 245);border: none;border-radius: 3px;display: block;line-height: 20px;height: 20px;font-size: 13px\"> ],</code><code data-type=\"codeline\" style=\";padding: 0px;font-family: Menlo, Monaco, 'Source Code Pro', 'Courier New', monospace;background: rgb(241, 243, 245);border: none;border-radius: 3px;display: block;line-height: 20px;height: 20px;font-size: 13px\"> "hostSelectionRetryMaxAttempts": "5",</code><code data-type=\"codeline\" style=\";padding: 0px;font-family: Menlo, Monaco, 'Source Code Pro', 'Courier New', monospace;background: rgb(241, 243, 245);border: none;border-radius: 3px;display: block;line-height: 20px;height: 20px;font-size: 13px\"> "retriableStatusCodes": [</code><code data-type=\"codeline\" style=\";padding: 0px;font-family: Menlo, Monaco, 'Source Code Pro', 'Courier New', monospace;background: rgb(241, 243, 245);border: none;border-radius: 3px;display: block;line-height: 20px;height: 20px;font-size: 13px\"> 503</code><code data-type=\"codeline\" style=\";padding: 0px;font-family: Menlo, Monaco, 'Source Code Pro', 'Courier New', monospace;background: rgb(241, 243, 245);border: none;border-radius: 3px;display: block;line-height: 20px;height: 20px;font-size: 13px\"> ]</code><code data-type=\"codeline\" style=\";padding: 0px;font-family: Menlo, Monaco, 'Source Code Pro', 'Courier New', monospace;background: rgb(241, 243, 245);border: none;border-radius: 3px;display: block;line-height: 20px;height: 20px;font-size: 13px\"> },</code><code data-type=\"codeline\" style=\";padding: 0px;font-family: Menlo, Monaco, 'Source Code Pro', 'Courier New', monospace;background: rgb(241, 243, 245);border: none;border-radius: 3px;display: block;line-height: 20px;height: 20px;font-size: 13px\"> "maxGrpcTimeout": "0s"</code><code data-type=\"codeline\" style=\";padding: 0px;font-family: Menlo, Monaco, 'Source Code Pro', 'Courier New', monospace;background: rgb(241, 243, 245);border: none;border-radius: 3px;display: block;line-height: 20px;height: 20px;font-size: 13px\"> },</code><code data-type=\"codeline\" style=\";padding: 0px;font-family: Menlo, Monaco, 'Source Code Pro', 'Courier New', monospace;background: rgb(241, 243, 245);border: none;border-radius: 3px;display: block;line-height: 20px;height: 20px;font-size: 13px\"> …………………</code><code data-type=\"codeline\" style=\";padding: 0px;font-family: Menlo, Monaco, 'Source Code Pro', 'Courier New', monospace;background: rgb(241, 243, 245);border: none;border-radius: 3px;display: block;line-height: 20px;height: 20px;font-size: 13px\"> {</code><code data-type=\"codeline\" style=\";padding: 0px;font-family: Menlo, Monaco, 'Source Code Pro', 'Courier New', monospace;background: rgb(241, 243, 245);border: none;border-radius: 3px;display: block;line-height: 20px;height: 20px;font-size: 13px\"> "name": "cashier-busi-svc.pay.svc.cluster.local:8001",</code><code data-type=\"codeline\" style=\";padding: 0px;font-family: Menlo, Monaco, 'Source Code Pro', 'Courier New', monospace;background: rgb(241, 243, 245);border: none;border-radius: 3px;display: block;line-height: 20px;height: 20px;font-size: 13px\"> "domains": [</code><code data-type=\"codeline\" style=\";padding: 0px;font-family: Menlo, Monaco, 'Source Code Pro', 'Courier New', monospace;background: rgb(241, 243, 245);border: none;border-radius: 3px;display: block;line-height: 20px;height: 20px;font-size: 13px\"> "cashier-busi-svc.pay.svc.cluster.local",</code><code data-type=\"codeline\" style=\";padding: 0px;font-family: Menlo, Monaco, 'Source Code Pro', 'Courier New', monospace;background: rgb(241, 243, 245);border: none;border-radius: 3px;display: block;line-height: 20px;height: 20px;font-size: 13px\"> "cashier-busi-svc.pay.svc.cluster.local:8001",</code><code data-type=\"codeline\" style=\";padding: 0px;font-family: Menlo, Monaco, 'Source Code Pro', 'Courier New', monospace;background: rgb(241, 243, 245);border: none;border-radius: 3px;display: block;line-height: 20px;height: 20px;font-size: 13px\"> "cashier-busi-svc.pay",</code><code data-type=\"codeline\" style=\";padding: 0px;font-family: Menlo, Monaco, 'Source Code Pro', 'Courier New', monospace;background: rgb(241, 243, 245);border: none;border-radius: 3px;display: block;line-height: 20px;height: 20px;font-size: 13px\"> "cashier-busi-svc.pay:8001",</code><code data-type=\"codeline\" style=\";padding: 0px;font-family: Menlo, Monaco, 'Source Code Pro', 'Courier New', monospace;background: rgb(241, 243, 245);border: none;border-radius: 3px;display: block;line-height: 20px;height: 20px;font-size: 13px\"> "cashier-busi-svc.pay.svc.cluster",</code><code data-type=\"codeline\" style=\";padding: 0px;font-family: Menlo, Monaco, 'Source Code Pro', 'Courier New', monospace;background: rgb(241, 243, 245);border: none;border-radius: 3px;display: block;line-height: 20px;height: 20px;font-size: 13px\"> "cashier-busi-svc.pay.svc.cluster:8001",</code><code data-type=\"codeline\" style=\";padding: 0px;font-family: Menlo, Monaco, 'Source Code Pro', 'Courier New', monospace;background: rgb(241, 243, 245);border: none;border-radius: 3px;display: block;line-height: 20px;height: 20px;font-size: 13px\"> "cashier-busi-svc.pay.svc",</code><code data-type=\"codeline\" style=\";padding: 0px;font-family: Menlo, Monaco, 'Source Code Pro', 'Courier New', monospace;background: rgb(241, 243, 245);border: none;border-radius: 3px;display: block;line-height: 20px;height: 20px;font-size: 13px\"> "cashier-busi-svc.pay.svc:8001",</code><code data-type=\"codeline\" style=\";padding: 0px;font-family: Menlo, Monaco, 'Source Code Pro', 'Courier New', monospace;background: rgb(241, 243, 245);border: none;border-radius: 3px;display: block;line-height: 20px;height: 20px;font-size: 13px\"> "10.233.17.123",</code><code data-type=\"codeline\" style=\";padding: 0px;font-family: Menlo, Monaco, 'Source Code Pro', 'Courier New', monospace;background: rgb(241, 243, 245);border: none;border-radius: 3px;display: block;line-height: 20px;height: 20px;font-size: 13px\"> "10.233.17.123:8001"</code><code data-type=\"codeline\" style=\";padding: 0px;font-family: Menlo, Monaco, 'Source Code Pro', 'Courier New', monospace;background: rgb(241, 243, 245);border: none;border-radius: 3px;display: block;line-height: 20px;height: 20px;font-size: 13px\"> ],</code><code data-type=\"codeline\" style=\";padding: 0px;font-family: Menlo, Monaco, 'Source Code Pro', 'Courier New', monospace;background: rgb(241, 243, 245);border: none;border-radius: 3px;display: block;line-height: 20px;height: 20px;font-size: 13px\"> …………………</code><code data-type=\"codeline\" style=\";padding: 0px;font-family: Menlo, Monaco, 'Source Code Pro', 'Courier New', monospace;background: rgb(241, 243, 245);border: none;border-radius: 3px;display: block;line-height: 20px;height: 20px;font-size: 13px\"> {</code><code data-type=\"codeline\" style=\";padding: 0px;font-family: Menlo, Monaco, 'Source Code Pro', 'Courier New', monospace;background: rgb(241, 243, 245);border: none;border-radius: 3px;display: block;line-height: 20px;height: 20px;font-size: 13px\"> "name": "center-job.manager.svc.cluster.local:8001",</code><code data-type=\"codeline\" style=\";padding: 0px;font-family: Menlo, Monaco, 'Source Code Pro', 'Courier New', monospace;background: rgb(241, 243, 245);border: none;border-radius: 3px;display: block;line-height: 20px;height: 20px;font-size: 13px\"> "domains": [</code><code data-type=\"codeline\" style=\";padding: 0px;font-family: Menlo, Monaco, 'Source Code Pro', 'Courier New', monospace;background: rgb(241, 243, 245);border: none;border-radius: 3px;display: block;line-height: 20px;height: 20px;font-size: 13px\"> "center-job.manager.svc.cluster.local",</code><code data-type=\"codeline\" style=\";padding: 0px;font-family: Menlo, Monaco, 'Source Code Pro', 'Courier New', monospace;background: rgb(241, 243, 245);border: none;border-radius: 3px;display: block;line-height: 20px;height: 20px;font-size: 13px\"> "center-job.manager.svc.cluster.local:8001",</code><code data-type=\"codeline\" style=\";padding: 0px;font-family: Menlo, Monaco, 'Source Code Pro', 'Courier New', monospace;background: rgb(241, 243, 245);border: none;border-radius: 3px;display: block;line-height: 20px;height: 20px;font-size: 13px\"> "center-job.manager",</code><code data-type=\"codeline\" style=\";padding: 0px;font-family: Menlo, Monaco, 'Source Code Pro', 'Courier New', monospace;background: rgb(241, 243, 245);border: none;border-radius: 3px;display: block;line-height: 20px;height: 20px;font-size: 13px\"> "center-job.manager:8001",</code><code data-type=\"codeline\" style=\";padding: 0px;font-family: Menlo, Monaco, 'Source Code Pro', 'Courier New', monospace;background: rgb(241, 243, 245);border: none;border-radius: 3px;display: block;line-height: 20px;height: 20px;font-size: 13px\"> "center-job.manager.svc.cluster",</code><code data-type=\"codeline\" style=\";padding: 0px;font-family: Menlo, Monaco, 'Source Code Pro', 'Courier New', monospace;background: rgb(241, 243, 245);border: none;border-radius: 3px;display: block;line-height: 20px;height: 20px;font-size: 13px\"> "center-job.manager.svc.cluster:8001",</code><code data-type=\"codeline\" style=\";padding: 0px;font-family: Menlo, Monaco, 'Source Code Pro', 'Courier New', monospace;background: rgb(241, 243, 245);border: none;border-radius: 3px;display: block;line-height: 20px;height: 20px;font-size: 13px\"> "center-job.manager.svc",</code><code data-type=\"codeline\" style=\";padding: 0px;font-family: Menlo, Monaco, 'Source Code Pro', 'Courier New', monospace;background: rgb(241, 243, 245);border: none;border-radius: 3px;display: block;line-height: 20px;height: 20px;font-size: 13px\"> "center-job.manager.svc:8001",</code><code data-type=\"codeline\" style=\";padding: 0px;font-family: Menlo, Monaco, 'Source Code Pro', 'Courier New', monospace;background: rgb(241, 243, 245);border: none;border-radius: 3px;display: block;line-height: 20px;height: 20px;font-size: 13px\"> "10.233.34.158",</code><code data-type=\"codeline\" style=\";padding: 0px;font-family: Menlo, Monaco, 'Source Code Pro', 'Courier New', monospace;background: rgb(241, 243, 245);border: none;border-radius: 3px;display: block;line-height: 20px;height: 20px;font-size: 13px\"> "10.233.34.158:8001"</code><code data-type=\"codeline\" style=\";padding: 0px;font-family: Menlo, Monaco, 'Source Code Pro', 'Courier New', monospace;background: rgb(241, 243, 245);border: none;border-radius: 3px;display: block;line-height: 20px;height: 20px;font-size: 13px\"> ],</code><code data-type=\"codeline\" style=\";padding: 0px;font-family: Menlo, Monaco, 'Source Code Pro', 'Courier New', monospace;background: rgb(241, 243, 245);border: none;border-radius: 3px;display: block;line-height: 20px;height: 20px;font-size: 13px\"> ……………</code><code data-type=\"codeline\" style=\";padding: 0px;font-family: Menlo, Monaco, 'Source Code Pro', 'Courier New', monospace;background: rgb(241, 243, 245);border: none;border-radius: 3px;display: block;line-height: 20px;height: 20px;font-size: 13px\"><br style=\";padding: 0px\"/></code></pre><p>复制代码</p><h1 data-id=\"heading8\" data-type=\"heading\" top=\"7740\" style=\";padding: 26px 0px 4px;font-size: 32px;line-height: 48px;color: rgb(53, 53, 53);white-space: pre-wrap;font-family: 'Helvetica Neue', 'PingFang SC', Verdana, 'Microsoft Yahei', 'Hiragino Sans GB', 'Microsoft Sans Serif', 'WenQuanYi Micro Hei', sans-serif;background-color: rgb(255, 255, 255)\">问题分析</h1><p data-type=\"paragraph\" style=\"margin-top: 0px;margin-bottom: 0px;padding: 0px;line-height: 1.875;font-size: 16px;min-height: 30px;white-space: pre-wrap;color: rgb(48, 48, 48);font-family: 'Helvetica Neue', 'PingFang SC', Verdana, 'Microsoft Yahei', 'Hiragino Sans GB', 'Microsoft Sans Serif', 'WenQuanYi Micro Hei', sans-serif;background-color: rgb(255, 255, 255)\">基于以上信息,对集群内的 svc 进行端口过滤,终于发现了集群中存在使用了 7000 端口的 service:</p><p data-type=\"paragraph\" style=\"margin-top: 0px;margin-bottom: 0px;padding: 0px;line-height: 1.875;font-size: 16px;min-height: 30px;white-space: pre-wrap;color: rgb(48, 48, 48);font-family: 'Helvetica Neue', 'PingFang SC', Verdana, 'Microsoft Yahei', 'Hiragino Sans GB', 'Microsoft Sans Serif', 'WenQuanYi Micro Hei', sans-serif;background-color: rgb(255, 255, 255)\"><br style=\";padding: 0px\"/></p><p><img src=\"https://static001.geekbang.org/infoq/e1/e1c9bb1a895898a67d71c316fd7cd620.png\" style=\";padding: 0px;border: 0px;vertical-align: top;max-width: 100%;height: auto\"/></p><p data-type=\"paragraph\" style=\"margin-top: 0px;margin-bottom: 0px;padding: 0px;line-height: 1.875;font-size: 16px;min-height: 30px;white-space: pre-wrap;color: rgb(48, 48, 48);font-family: 'Helvetica Neue', 'PingFang SC', Verdana, 'Microsoft Yahei', 'Hiragino Sans GB', 'Microsoft Sans Serif', 'WenQuanYi Micro Hei', sans-serif;background-color: rgb(255, 255, 255)\"><br style=\";padding: 0px\"/></p><p data-type=\"paragraph\" style=\"margin-top: 0px;margin-bottom: 0px;padding: 0px;line-height: 1.875;font-size: 16px;min-height: 30px;white-space: pre-wrap;color: rgb(48, 48, 48);font-family: 'Helvetica Neue', 'PingFang SC', Verdana, 'Microsoft Yahei', 'Hiragino Sans GB', 'Microsoft Sans Serif', 'WenQuanYi Micro Hei', sans-serif;background-color: rgb(255, 255, 255)\">使用 7000 端口的 svc</p><p data-type=\"paragraph\" style=\"margin-top: 0px;margin-bottom: 0px;padding: 0px;line-height: 1.875;font-size: 16px;min-height: 30px;white-space: pre-wrap;color: rgb(48, 48, 48);font-family: 'Helvetica Neue', 'PingFang SC', Verdana, 'Microsoft Yahei', 'Hiragino Sans GB', 'Microsoft Sans Serif', 'WenQuanYi Micro Hei', sans-serif;background-color: rgb(255, 255, 255)\"><br style=\";padding: 0px\"/></p><p data-type=\"paragraph\" style=\"margin-top: 0px;margin-bottom: 0px;padding: 0px;line-height: 1.875;font-size: 16px;min-height: 30px;white-space: pre-wrap;color: rgb(48, 48, 48);font-family: 'Helvetica Neue', 'PingFang SC', Verdana, 'Microsoft Yahei', 'Hiragino Sans GB', 'Microsoft Sans Serif', 'WenQuanYi Micro Hei', sans-serif;background-color: rgb(255, 255, 255)\">istio 会为 10.233.0.115:7000 自动生成一个 0.0.0.0:7000 的 listener:</p><p data-type=\"paragraph\" style=\"margin-top: 0px;margin-bottom: 0px;padding: 0px;line-height: 1.875;font-size: 16px;min-height: 30px;white-space: pre-wrap;color: rgb(48, 48, 48);font-family: 'Helvetica Neue', 'PingFang SC', Verdana, 'Microsoft Yahei', 'Hiragino Sans GB', 'Microsoft Sans Serif', 'WenQuanYi Micro Hei', sans-serif;background-color: rgb(255, 255, 255)\"><br style=\";padding: 0px\"/></p><pre data-origin=\"pm_code_preview\" style=\"margin-top: 0px;margin-bottom: 0px;padding: 0px;font-family: Courier, 'Courier New', monospace\"><code data-type=\"codeline\" style=\";padding: 0px;font-family: Menlo, Monaco, 'Source Code Pro', 'Courier New', monospace;background: rgb(241, 243, 245);border: none;border-radius: 3px;display: block;line-height: 20px;height: 20px;font-size: 13px\"> ADDRESS PORT TYPE</code><code data-type=\"codeline\" style=\";padding: 0px;font-family: Menlo, Monaco, 'Source Code Pro', 'Courier New', monospace;background: rgb(241, 243, 245);border: none;border-radius: 3px;display: block;line-height: 20px;height: 20px;font-size: 13px\"> 0.0.0.0 7000 TCP</code><code data-type=\"codeline\" style=\";padding: 0px;font-family: Menlo, Monaco, 'Source Code Pro', 'Courier New', monospace;background: rgb(241, 243, 245);border: none;border-radius: 3px;display: block;line-height: 20px;height: 20px;font-size: 13px\"><br style=\";padding: 0px\"/></code></pre><p>复制代码</p><p data-type=\"paragraph\" style=\"margin-top: 0px;margin-bottom: 0px;padding: 0px;line-height: 1.875;font-size: 16px;min-height: 30px;white-space: pre-wrap;color: rgb(48, 48, 48);font-family: 'Helvetica Neue', 'PingFang SC', Verdana, 'Microsoft Yahei', 'Hiragino Sans GB', 'Microsoft Sans Serif', 'WenQuanYi Micro Hei', sans-serif;background-color: rgb(255, 255, 255)\"><br style=\";padding: 0px\"/></p><p data-type=\"paragraph\" style=\"margin-top: 0px;margin-bottom: 0px;padding: 0px;line-height: 1.875;font-size: 16px;min-height: 30px;white-space: pre-wrap;color: rgb(48, 48, 48);font-family: 'Helvetica Neue', 'PingFang SC', Verdana, 'Microsoft Yahei', 'Hiragino Sans GB', 'Microsoft Sans Serif', 'WenQuanYi Micro Hei', sans-serif;background-color: rgb(255, 255, 255)\">查看详细配置信息,在该 listener 中对于 tcp 流量是不转发(BlackHoleCluster),所以目标地址为 10.0.x.x:7000 的流量被 listener_0.0.0.0:7000 匹配到时,因为是 tcp 的流量(nc 命令默认 tcp 协议),所以代理没有对该流量进行转发。这与开头提到的 pod 没有流量发出来现象一致。</p><p data-type=\"paragraph\" style=\"margin-top: 0px;margin-bottom: 0px;padding: 0px;line-height: 1.875;font-size: 16px;min-height: 30px;white-space: pre-wrap;color: rgb(48, 48, 48);font-family: 'Helvetica Neue', 'PingFang SC', Verdana, 'Microsoft Yahei', 'Hiragino Sans GB', 'Microsoft Sans Serif', 'WenQuanYi Micro Hei', sans-serif;background-color: rgb(255, 255, 255)\"><br style=\";padding: 0px\"/></p><pre data-origin=\"pm_code_preview\" style=\"margin-top: 0px;margin-bottom: 0px;padding: 0px;font-family: Courier, 'Courier New', monospace\"><code data-type=\"codeline\" style=\";padding: 0px;font-family: Menlo, Monaco, 'Source Code Pro', 'Courier New', monospace;background: rgb(241, 243, 245);border: none;border-radius: 3px;display: block;line-height: 20px;height: 20px;font-size: 13px\"> {</code><code data-type=\"codeline\" style=\";padding: 0px;font-family: Menlo, Monaco, 'Source Code Pro', 'Courier New', monospace;background: rgb(241, 243, 245);border: none;border-radius: 3px;display: block;line-height: 20px;height: 20px;font-size: 13px\"> "name": "0.0.0.0_7000",</code><code data-type=\"codeline\" style=\";padding: 0px;font-family: Menlo, Monaco, 'Source Code Pro', 'Courier New', monospace;background: rgb(241, 243, 245);border: none;border-radius: 3px;display: block;line-height: 20px;height: 20px;font-size: 13px\"> "address": {</code><code data-type=\"codeline\" style=\";padding: 0px;font-family: Menlo, Monaco, 'Source Code Pro', 'Courier New', monospace;background: rgb(241, 243, 245);border: none;border-radius: 3px;display: block;line-height: 20px;height: 20px;font-size: 13px\"> "socketAddress": {</code><code data-type=\"codeline\" style=\";padding: 0px;font-family: Menlo, Monaco, 'Source Code Pro', 'Courier New', monospace;background: rgb(241, 243, 245);border: none;border-radius: 3px;display: block;line-height: 20px;height: 20px;font-size: 13px\"> "address": "0.0.0.0",</code><code data-type=\"codeline\" style=\";padding: 0px;font-family: Menlo, Monaco, 'Source Code Pro', 'Courier New', monospace;background: rgb(241, 243, 245);border: none;border-radius: 3px;display: block;line-height: 20px;height: 20px;font-size: 13px\"> "portValue": 7000</code><code data-type=\"codeline\" style=\";padding: 0px;font-family: Menlo, Monaco, 'Source Code Pro', 'Courier New', monospace;background: rgb(241, 243, 245);border: none;border-radius: 3px;display: block;line-height: 20px;height: 20px;font-size: 13px\"> }</code><code data-type=\"codeline\" style=\";padding: 0px;font-family: Menlo, Monaco, 'Source Code Pro', 'Courier New', monospace;background: rgb(241, 243, 245);border: none;border-radius: 3px;display: block;line-height: 20px;height: 20px;font-size: 13px\"> },</code><code data-type=\"codeline\" style=\";padding: 0px;font-family: Menlo, Monaco, 'Source Code Pro', 'Courier New', monospace;background: rgb(241, 243, 245);border: none;border-radius: 3px;display: block;line-height: 20px;height: 20px;font-size: 13px\"> "filterChains": [</code><code data-type=\"codeline\" style=\";padding: 0px;font-family: Menlo, Monaco, 'Source Code Pro', 'Courier New', monospace;background: rgb(241, 243, 245);border: none;border-radius: 3px;display: block;line-height: 20px;height: 20px;font-size: 13px\"> {</code><code data-type=\"codeline\" style=\";padding: 0px;font-family: Menlo, Monaco, 'Source Code Pro', 'Courier New', monospace;background: rgb(241, 243, 245);border: none;border-radius: 3px;display: block;line-height: 20px;height: 20px;font-size: 13px\"> "filterChainMatch": {</code><code data-type=\"codeline\" style=\";padding: 0px;font-family: Menlo, Monaco, 'Source Code Pro', 'Courier New', monospace;background: rgb(241, 243, 245);border: none;border-radius: 3px;display: block;line-height: 20px;height: 20px;font-size: 13px\"> "prefixRanges": [</code><code data-type=\"codeline\" style=\";padding: 0px;font-family: Menlo, Monaco, 'Source Code Pro', 'Courier New', monospace;background: rgb(241, 243, 245);border: none;border-radius: 3px;display: block;line-height: 20px;height: 20px;font-size: 13px\"> {</code><code data-type=\"codeline\" style=\";padding: 0px;font-family: Menlo, Monaco, 'Source Code Pro', 'Courier New', monospace;background: rgb(241, 243, 245);border: none;border-radius: 3px;display: block;line-height: 20px;height: 20px;font-size: 13px\"> "addressPrefix": "10.64.x.x",</code><code data-type=\"codeline\" style=\";padding: 0px;font-family: Menlo, Monaco, 'Source Code Pro', 'Courier New', monospace;background: rgb(241, 243, 245);border: none;border-radius: 3px;display: block;line-height: 20px;height: 20px;font-size: 13px\"> "prefixLen": 32</code><code data-type=\"codeline\" style=\";padding: 0px;font-family: Menlo, Monaco, 'Source Code Pro', 'Courier New', monospace;background: rgb(241, 243, 245);border: none;border-radius: 3px;display: block;line-height: 20px;height: 20px;font-size: 13px\"> }</code><code data-type=\"codeline\" style=\";padding: 0px;font-family: Menlo, Monaco, 'Source Code Pro', 'Courier New', monospace;background: rgb(241, 243, 245);border: none;border-radius: 3px;display: block;line-height: 20px;height: 20px;font-size: 13px\"> ]</code><code data-type=\"codeline\" style=\";padding: 0px;font-family: Menlo, Monaco, 'Source Code Pro', 'Courier New', monospace;background: rgb(241, 243, 245);border: none;border-radius: 3px;display: block;line-height: 20px;height: 20px;font-size: 13px\"> },</code><code data-type=\"codeline\" style=\";padding: 0px;font-family: Menlo, Monaco, 'Source Code Pro', 'Courier New', monospace;background: rgb(241, 243, 245);border: none;border-radius: 3px;display: block;line-height: 20px;height: 20px;font-size: 13px\"> "filters": [</code><code data-type=\"codeline\" style=\";padding: 0px;font-family: Menlo, Monaco, 'Source Code Pro', 'Courier New', monospace;background: rgb(241, 243, 245);border: none;border-radius: 3px;display: block;line-height: 20px;height: 20px;font-size: 13px\"> {</code><code data-type=\"codeline\" style=\";padding: 0px;font-family: Menlo, Monaco, 'Source Code Pro', 'Courier New', monospace;background: rgb(241, 243, 245);border: none;border-radius: 3px;display: block;line-height: 20px;height: 20px;font-size: 13px\"> "name": "envoy.tcp_proxy",</code><code data-type=\"codeline\" style=\";padding: 0px;font-family: Menlo, Monaco, 'Source Code Pro', 'Courier New', monospace;background: rgb(241, 243, 245);border: none;border-radius: 3px;display: block;line-height: 20px;height: 20px;font-size: 13px\"> "typedConfig": {</code><code data-type=\"codeline\" style=\";padding: 0px;font-family: Menlo, Monaco, 'Source Code Pro', 'Courier New', monospace;background: rgb(241, 243, 245);border: none;border-radius: 3px;display: block;line-height: 20px;height: 20px;font-size: 13px\"> "@type": "type.googleapis.com/envoy.config.filter.network.tcp_proxy.v2.TcpProxy",</code><code data-type=\"codeline\" style=\";padding: 0px;font-family: Menlo, Monaco, 'Source Code Pro', 'Courier New', monospace;background: rgb(241, 243, 245);border: none;border-radius: 3px;display: block;line-height: 20px;height: 20px;font-size: 13px\"> "statPrefix": "BlackHoleCluster",</code><code data-type=\"codeline\" style=\";padding: 0px;font-family: Menlo, Monaco, 'Source Code Pro', 'Courier New', monospace;background: rgb(241, 243, 245);border: none;border-radius: 3px;display: block;line-height: 20px;height: 20px;font-size: 13px\"> "cluster": "BlackHoleCluster"</code><code data-type=\"codeline\" style=\";padding: 0px;font-family: Menlo, Monaco, 'Source Code Pro', 'Courier New', monospace;background: rgb(241, 243, 245);border: none;border-radius: 3px;display: block;line-height: 20px;height: 20px;font-size: 13px\"> }</code><code data-type=\"codeline\" style=\";padding: 0px;font-family: Menlo, Monaco, 'Source Code Pro', 'Courier New', monospace;background: rgb(241, 243, 245);border: none;border-radius: 3px;display: block;line-height: 20px;height: 20px;font-size: 13px\"> }</code><code data-type=\"codeline\" style=\";padding: 0px;font-family: Menlo, Monaco, 'Source Code Pro', 'Courier New', monospace;background: rgb(241, 243, 245);border: none;border-radius: 3px;display: block;line-height: 20px;height: 20px;font-size: 13px\"> ]</code><code data-type=\"codeline\" style=\";padding: 0px;font-family: Menlo, Monaco, 'Source Code Pro', 'Courier New', monospace;background: rgb(241, 243, 245);border: none;border-radius: 3px;display: block;line-height: 20px;height: 20px;font-size: 13px\"> }</code><code data-type=\"codeline\" style=\";padding: 0px;font-family: Menlo, Monaco, 'Source Code Pro', 'Courier New', monospace;background: rgb(241, 243, 245);border: none;border-radius: 3px;display: block;line-height: 20px;height: 20px;font-size: 13px\"><br style=\";padding: 0px\"/></code></pre><p>复制代码</p><p data-type=\"paragraph\" style=\"margin-top: 0px;margin-bottom: 0px;padding: 0px;line-height: 1.875;font-size: 16px;min-height: 30px;white-space: pre-wrap;color: rgb(48, 48, 48);font-family: 'Helvetica Neue', 'PingFang SC', Verdana, 'Microsoft Yahei', 'Hiragino Sans GB', 'Microsoft Sans Serif', 'WenQuanYi Micro Hei', sans-serif;background-color: rgb(255, 255, 255)\"><br style=\";padding: 0px\"/></p><p data-type=\"paragraph\" style=\"margin-top: 0px;margin-bottom: 0px;padding: 0px;line-height: 1.875;font-size: 16px;min-height: 30px;white-space: pre-wrap;color: rgb(48, 48, 48);font-family: 'Helvetica Neue', 'PingFang SC', Verdana, 'Microsoft Yahei', 'Hiragino Sans GB', 'Microsoft Sans Serif', 'WenQuanYi Micro Hei', sans-serif;background-color: rgb(255, 255, 255)\">至于 7001-7003 为什么能通,是因为 istio-proxy 默认使用的是 ALLOW_ANY 模式,对于没有匹配上 listener 的流量是直接放行。可以通过 istio_configmap 配置信息来验证一下:</p><p data-type=\"paragraph\" style=\"margin-top: 0px;margin-bottom: 0px;padding: 0px;line-height: 1.875;font-size: 16px;min-height: 30px;white-space: pre-wrap;color: rgb(48, 48, 48);font-family: 'Helvetica Neue', 'PingFang SC', Verdana, 'Microsoft Yahei', 'Hiragino Sans GB', 'Microsoft Sans Serif', 'WenQuanYi Micro Hei', sans-serif;background-color: rgb(255, 255, 255)\"><br style=\";padding: 0px\"/></p><pre data-origin=\"pm_code_preview\" style=\"margin-top: 0px;margin-bottom: 0px;padding: 0px;font-family: Courier, 'Courier New', monospace\"><code data-type=\"codeline\" style=\";padding: 0px;font-family: Menlo, Monaco, 'Source Code Pro', 'Courier New', monospace;background: rgb(241, 243, 245);border: none;border-radius: 3px;display: block;line-height: 20px;height: 20px;font-size: 13px\"> $ kubectl get cm istio -n istio-system -o yaml | grep -i -w -a3 "mode"</code><code data-type=\"codeline\" style=\";padding: 0px;font-family: Menlo, Monaco, 'Source Code Pro', 'Courier New', monospace;background: rgb(241, 243, 245);border: none;border-radius: 3px;display: block;line-height: 20px;height: 20px;font-size: 13px\"> # REGISTRY_ONLY - restrict outbound traffic to services defined in the service registry as well</code><code data-type=\"codeline\" style=\";padding: 0px;font-family: Menlo, Monaco, 'Source Code Pro', 'Courier New', monospace;background: rgb(241, 243, 245);border: none;border-radius: 3px;display: block;line-height: 20px;height: 20px;font-size: 13px\"> # as those defined through ServiceEntries</code><code data-type=\"codeline\" style=\";padding: 0px;font-family: Menlo, Monaco, 'Source Code Pro', 'Courier New', monospace;background: rgb(241, 243, 245);border: none;border-radius: 3px;display: block;line-height: 20px;height: 20px;font-size: 13px\"> outboundTrafficPolicy:</code><code data-type=\"codeline\" style=\";padding: 0px;font-family: Menlo, Monaco, 'Source Code Pro', 'Courier New', monospace;background: rgb(241, 243, 245);border: none;border-radius: 3px;display: block;line-height: 20px;height: 20px;font-size: 13px\"> mode: ALLOW_ANY</code><code data-type=\"codeline\" style=\";padding: 0px;font-family: Menlo, Monaco, 'Source Code Pro', 'Courier New', monospace;background: rgb(241, 243, 245);border: none;border-radius: 3px;display: block;line-height: 20px;height: 20px;font-size: 13px\"> localityLbSetting:</code><code data-type=\"codeline\" style=\";padding: 0px;font-family: Menlo, Monaco, 'Source Code Pro', 'Courier New', monospace;background: rgb(241, 243, 245);border: none;border-radius: 3px;display: block;line-height: 20px;height: 20px;font-size: 13px\"> enabled: true</code><code data-type=\"codeline\" style=\";padding: 0px;font-family: Menlo, Monaco, 'Source Code Pro', 'Courier New', monospace;background: rgb(241, 243, 245);border: none;border-radius: 3px;display: block;line-height: 20px;height: 20px;font-size: 13px\"> # The namespace to treat as the administrative root namespace for istio</code><code data-type=\"codeline\" style=\";padding: 0px;font-family: Menlo, Monaco, 'Source Code Pro', 'Courier New', monospace;background: rgb(241, 243, 245);border: none;border-radius: 3px;display: block;line-height: 20px;height: 20px;font-size: 13px\"> --</code><code data-type=\"codeline\" style=\";padding: 0px;font-family: Menlo, Monaco, 'Source Code Pro', 'Courier New', monospace;background: rgb(241, 243, 245);border: none;border-radius: 3px;display: block;line-height: 20px;height: 20px;font-size: 13px\"> drainDuration: 45s</code><code data-type=\"codeline\" style=\";padding: 0px;font-family: Menlo, Monaco, 'Source Code Pro', 'Courier New', monospace;background: rgb(241, 243, 245);border: none;border-radius: 3px;display: block;line-height: 20px;height: 20px;font-size: 13px\"> parentShutdownDuration: 1m0s</code><code data-type=\"codeline\" style=\";padding: 0px;font-family: Menlo, Monaco, 'Source Code Pro', 'Courier New', monospace;background: rgb(241, 243, 245);border: none;border-radius: 3px;display: block;line-height: 20px;height: 20px;font-size: 13px\"> #</code><code data-type=\"codeline\" style=\";padding: 0px;font-family: Menlo, Monaco, 'Source Code Pro', 'Courier New', monospace;background: rgb(241, 243, 245);border: none;border-radius: 3px;display: block;line-height: 20px;height: 20px;font-size: 13px\"> # The mode used to redirect inbound connections to Envoy. This setting</code><code data-type=\"codeline\" style=\";padding: 0px;font-family: Menlo, Monaco, 'Source Code Pro', 'Courier New', monospace;background: rgb(241, 243, 245);border: none;border-radius: 3px;display: block;line-height: 20px;height: 20px;font-size: 13px\"> # has no effect on outbound traffic: iptables REDIRECT is always used for</code><code data-type=\"codeline\" style=\";padding: 0px;font-family: Menlo, Monaco, 'Source Code Pro', 'Courier New', monospace;background: rgb(241, 243, 245);border: none;border-radius: 3px;display: block;line-height: 20px;height: 20px;font-size: 13px\"> # outbound connections.</code><code data-type=\"codeline\" style=\";padding: 0px;font-family: Menlo, Monaco, 'Source Code Pro', 'Courier New', monospace;background: rgb(241, 243, 245);border: none;border-radius: 3px;display: block;line-height: 20px;height: 20px;font-size: 13px\"> # If "REDIRECT", use iptables REDIRECT to NAT and redirect to Envoy.</code><code data-type=\"codeline\" style=\";padding: 0px;font-family: Menlo, Monaco, 'Source Code Pro', 'Courier New', monospace;background: rgb(241, 243, 245);border: none;border-radius: 3px;display: block;line-height: 20px;height: 20px;font-size: 13px\"> # The "REDIRECT" mode loses source addresses during redirection.</code><code data-type=\"codeline\" style=\";padding: 0px;font-family: Menlo, Monaco, 'Source Code Pro', 'Courier New', monospace;background: rgb(241, 243, 245);border: none;border-radius: 3px;display: block;line-height: 20px;height: 20px;font-size: 13px\"> # If "TPROXY", use iptables TPROXY to redirect to Envoy.</code><code data-type=\"codeline\" style=\";padding: 0px;font-family: Menlo, Monaco, 'Source Code Pro', 'Courier New', monospace;background: rgb(241, 243, 245);border: none;border-radius: 3px;display: block;line-height: 20px;height: 20px;font-size: 13px\"> # The "TPROXY" mode preserves both the source and destination IP</code><code data-type=\"codeline\" style=\";padding: 0px;font-family: Menlo, Monaco, 'Source Code Pro', 'Courier New', monospace;background: rgb(241, 243, 245);border: none;border-radius: 3px;display: block;line-height: 20px;height: 20px;font-size: 13px\"> # addresses and ports, so that they can be used for advanced filtering</code><code data-type=\"codeline\" style=\";padding: 0px;font-family: Menlo, Monaco, 'Source Code Pro', 'Courier New', monospace;background: rgb(241, 243, 245);border: none;border-radius: 3px;display: block;line-height: 20px;height: 20px;font-size: 13px\"> # and manipulation.</code><code data-type=\"codeline\" style=\";padding: 0px;font-family: Menlo, Monaco, 'Source Code Pro', 'Courier New', monospace;background: rgb(241, 243, 245);border: none;border-radius: 3px;display: block;line-height: 20px;height: 20px;font-size: 13px\"> # The "TPROXY" mode also configures the Sidecar to run with the</code><code data-type=\"codeline\" style=\";padding: 0px;font-family: Menlo, Monaco, 'Source Code Pro', 'Courier New', monospace;background: rgb(241, 243, 245);border: none;border-radius: 3px;display: block;line-height: 20px;height: 20px;font-size: 13px\"> # CAP_NET_ADMIN capability, which is required to use TPROXY.</code><code data-type=\"codeline\" style=\";padding: 0px;font-family: Menlo, Monaco, 'Source Code Pro', 'Courier New', monospace;background: rgb(241, 243, 245);border: none;border-radius: 3px;display: block;line-height: 20px;height: 20px;font-size: 13px\"> #interceptionMode: REDIRECT</code><code data-type=\"codeline\" style=\";padding: 0px;font-family: Menlo, Monaco, 'Source Code Pro', 'Courier New', monospace;background: rgb(241, 243, 245);border: none;border-radius: 3px;display: block;line-height: 20px;height: 20px;font-size: 13px\"> #</code><code data-type=\"codeline\" style=\";padding: 0px;font-family: Menlo, Monaco, 'Source Code Pro', 'Courier New', monospace;background: rgb(241, 243, 245);border: none;border-radius: 3px;display: block;line-height: 20px;height: 20px;font-size: 13px\"><br style=\";padding: 0px\"/></code></pre><p>复制代码</p><h1 data-id=\"heading9\" data-type=\"heading\" top=\"9713\" style=\";padding: 26px 0px 4px;font-size: 32px;line-height: 48px;color: rgb(53, 53, 53);white-space: pre-wrap;font-family: 'Helvetica Neue', 'PingFang SC', Verdana, 'Microsoft Yahei', 'Hiragino Sans GB', 'Microsoft Sans Serif', 'WenQuanYi Micro Hei', sans-serif;background-color: rgb(255, 255, 255)\">解决方案</h1><p data-type=\"paragraph\" style=\"margin-top: 0px;margin-bottom: 0px;padding: 0px;line-height: 1.875;font-size: 16px;min-height: 30px;white-space: pre-wrap;color: rgb(48, 48, 48);font-family: 'Helvetica Neue', 'PingFang SC', Verdana, 'Microsoft Yahei', 'Hiragino Sans GB', 'Microsoft Sans Serif', 'WenQuanYi Micro Hei', sans-serif;background-color: rgb(255, 255, 255)\">最后我们来解决开头提到的问题,总共有三种解决方案。</p><h2 data-id=\"heading10\" data-type=\"heading\" top=\"9821\" style=\";padding: 26px 0px 4px;font-size: 28px;line-height: 44px;color: rgb(53, 53, 53);white-space: pre-wrap;font-family: 'Helvetica Neue', 'PingFang SC', Verdana, 'Microsoft Yahei', 'Hiragino Sans GB', 'Microsoft Sans Serif', 'WenQuanYi Micro Hei', sans-serif;background-color: rgb(255, 255, 255)\">方法 1:Service Entry</h2><p data-type=\"paragraph\" style=\"margin-top: 0px;margin-bottom: 0px;padding: 0px;line-height: 1.875;font-size: 16px;min-height: 30px;white-space: pre-wrap;color: rgb(48, 48, 48);font-family: 'Helvetica Neue', 'PingFang SC', Verdana, 'Microsoft Yahei', 'Hiragino Sans GB', 'Microsoft Sans Serif', 'WenQuanYi Micro Hei', sans-serif;background-color: rgb(255, 255, 255)\">服务条目(Service Entry)是 istio 重要的资源对象之一,作用是将外部的资源注册到 istio 内部的网格服务中来,以提供网格内对外部资源的更加精细化的控制。我们可以简单理解为白名单,istios 根据 Service Entry 的内容生成 listeners。</p><p data-type=\"paragraph\" style=\"margin-top: 0px;margin-bottom: 0px;padding: 0px;line-height: 1.875;font-size: 16px;min-height: 30px;white-space: pre-wrap;color: rgb(48, 48, 48);font-family: 'Helvetica Neue', 'PingFang SC', Verdana, 'Microsoft Yahei', 'Hiragino Sans GB', 'Microsoft Sans Serif', 'WenQuanYi Micro Hei', sans-serif;background-color: rgb(255, 255, 255)\"><br style=\";padding: 0px\"/></p><p data-type=\"paragraph\" style=\"margin-top: 0px;margin-bottom: 0px;padding: 0px;line-height: 1.875;font-size: 16px;min-height: 30px;white-space: pre-wrap;color: rgb(48, 48, 48);font-family: 'Helvetica Neue', 'PingFang SC', Verdana, 'Microsoft Yahei', 'Hiragino Sans GB', 'Microsoft Sans Serif', 'WenQuanYi Micro Hei', sans-serif;background-color: rgb(255, 255, 255)\">我们在命名空间 dev-self-pc-ct 中添加如下配置:</p><p data-type=\"paragraph\" style=\"margin-top: 0px;margin-bottom: 0px;padding: 0px;line-height: 1.875;font-size: 16px;min-height: 30px;white-space: pre-wrap;color: rgb(48, 48, 48);font-family: 'Helvetica Neue', 'PingFang SC', Verdana, 'Microsoft Yahei', 'Hiragino Sans GB', 'Microsoft Sans Serif', 'WenQuanYi Micro Hei', sans-serif;background-color: rgb(255, 255, 255)\"><br style=\";padding: 0px\"/></p><pre data-origin=\"pm_code_preview\" style=\"margin-top: 0px;margin-bottom: 0px;padding: 0px;font-family: Courier, 'Courier New', monospace\"><code data-type=\"codeline\" style=\";padding: 0px;font-family: Menlo, Monaco, 'Source Code Pro', 'Courier New', monospace;background: rgb(241, 243, 245);border: none;border-radius: 3px;display: block;line-height: 20px;height: 20px;font-size: 13px\"> $ kubectl apply -f - <<EOF</code><code data-type=\"codeline\" style=\";padding: 0px;font-family: Menlo, Monaco, 'Source Code Pro', 'Courier New', monospace;background: rgb(241, 243, 245);border: none;border-radius: 3px;display: block;line-height: 20px;height: 20px;font-size: 13px\"> apiVersion: networking.istio.io/v1alpha3</code><code data-type=\"codeline\" style=\";padding: 0px;font-family: Menlo, Monaco, 'Source Code Pro', 'Courier New', monospace;background: rgb(241, 243, 245);border: none;border-radius: 3px;display: block;line-height: 20px;height: 20px;font-size: 13px\"> kind: ServiceEntry</code><code data-type=\"codeline\" style=\";padding: 0px;font-family: Menlo, Monaco, 'Source Code Pro', 'Courier New', monospace;background: rgb(241, 243, 245);border: none;border-radius: 3px;display: block;line-height: 20px;height: 20px;font-size: 13px\"> metadata:</code><code data-type=\"codeline\" style=\";padding: 0px;font-family: Menlo, Monaco, 'Source Code Pro', 'Courier New', monospace;background: rgb(241, 243, 245);border: none;border-radius: 3px;display: block;line-height: 20px;height: 20px;font-size: 13px\"> name: rediscluster</code><code data-type=\"codeline\" style=\";padding: 0px;font-family: Menlo, Monaco, 'Source Code Pro', 'Courier New', monospace;background: rgb(241, 243, 245);border: none;border-radius: 3px;display: block;line-height: 20px;height: 20px;font-size: 13px\"> namespace: dev-self</code><code data-type=\"codeline\" style=\";padding: 0px;font-family: Menlo, Monaco, 'Source Code Pro', 'Courier New', monospace;background: rgb(241, 243, 245);border: none;border-radius: 3px;display: block;line-height: 20px;height: 20px;font-size: 13px\"> spec:</code><code data-type=\"codeline\" style=\";padding: 0px;font-family: Menlo, Monaco, 'Source Code Pro', 'Courier New', monospace;background: rgb(241, 243, 245);border: none;border-radius: 3px;display: block;line-height: 20px;height: 20px;font-size: 13px\"> hosts:</code><code data-type=\"codeline\" style=\";padding: 0px;font-family: Menlo, Monaco, 'Source Code Pro', 'Courier New', monospace;background: rgb(241, 243, 245);border: none;border-radius: 3px;display: block;line-height: 20px;height: 20px;font-size: 13px\"> - redis</code><code data-type=\"codeline\" style=\";padding: 0px;font-family: Menlo, Monaco, 'Source Code Pro', 'Courier New', monospace;background: rgb(241, 243, 245);border: none;border-radius: 3px;display: block;line-height: 20px;height: 20px;font-size: 13px\"> addresses:</code><code data-type=\"codeline\" style=\";padding: 0px;font-family: Menlo, Monaco, 'Source Code Pro', 'Courier New', monospace;background: rgb(241, 243, 245);border: none;border-radius: 3px;display: block;line-height: 20px;height: 20px;font-size: 13px\"> - 10.0.x.x/32</code><code data-type=\"codeline\" style=\";padding: 0px;font-family: Menlo, Monaco, 'Source Code Pro', 'Courier New', monospace;background: rgb(241, 243, 245);border: none;border-radius: 3px;display: block;line-height: 20px;height: 20px;font-size: 13px\"> ports:</code><code data-type=\"codeline\" style=\";padding: 0px;font-family: Menlo, Monaco, 'Source Code Pro', 'Courier New', monospace;background: rgb(241, 243, 245);border: none;border-radius: 3px;display: block;line-height: 20px;height: 20px;font-size: 13px\"> - number: 7000</code><code data-type=\"codeline\" style=\";padding: 0px;font-family: Menlo, Monaco, 'Source Code Pro', 'Courier New', monospace;background: rgb(241, 243, 245);border: none;border-radius: 3px;display: block;line-height: 20px;height: 20px;font-size: 13px\"> name: redis-7000</code><code data-type=\"codeline\" style=\";padding: 0px;font-family: Menlo, Monaco, 'Source Code Pro', 'Courier New', monospace;background: rgb(241, 243, 245);border: none;border-radius: 3px;display: block;line-height: 20px;height: 20px;font-size: 13px\"> protocol: tcp</code><code data-type=\"codeline\" style=\";padding: 0px;font-family: Menlo, Monaco, 'Source Code Pro', 'Courier New', monospace;background: rgb(241, 243, 245);border: none;border-radius: 3px;display: block;line-height: 20px;height: 20px;font-size: 13px\"> - number: 7001</code><code data-type=\"codeline\" style=\";padding: 0px;font-family: Menlo, Monaco, 'Source Code Pro', 'Courier New', monospace;background: rgb(241, 243, 245);border: none;border-radius: 3px;display: block;line-height: 20px;height: 20px;font-size: 13px\"> name: redis-7001</code><code data-type=\"codeline\" style=\";padding: 0px;font-family: Menlo, Monaco, 'Source Code Pro', 'Courier New', monospace;background: rgb(241, 243, 245);border: none;border-radius: 3px;display: block;line-height: 20px;height: 20px;font-size: 13px\"> protocol: tcp</code><code data-type=\"codeline\" style=\";padding: 0px;font-family: Menlo, Monaco, 'Source Code Pro', 'Courier New', monospace;background: rgb(241, 243, 245);border: none;border-radius: 3px;display: block;line-height: 20px;height: 20px;font-size: 13px\"> - number: 7002</code><code data-type=\"codeline\" style=\";padding: 0px;font-family: Menlo, Monaco, 'Source Code Pro', 'Courier New', monospace;background: rgb(241, 243, 245);border: none;border-radius: 3px;display: block;line-height: 20px;height: 20px;font-size: 13px\"> name: redis-7002</code><code data-type=\"codeline\" style=\";padding: 0px;font-family: Menlo, Monaco, 'Source Code Pro', 'Courier New', monospace;background: rgb(241, 243, 245);border: none;border-radius: 3px;display: block;line-height: 20px;height: 20px;font-size: 13px\"> protocol: tcp</code><code data-type=\"codeline\" style=\";padding: 0px;font-family: Menlo, Monaco, 'Source Code Pro', 'Courier New', monospace;background: rgb(241, 243, 245);border: none;border-radius: 3px;display: block;line-height: 20px;height: 20px;font-size: 13px\"> - number: 7003</code><code data-type=\"codeline\" style=\";padding: 0px;font-family: Menlo, Monaco, 'Source Code Pro', 'Courier New', monospace;background: rgb(241, 243, 245);border: none;border-radius: 3px;display: block;line-height: 20px;height: 20px;font-size: 13px\"> name: redis-7003</code><code data-type=\"codeline\" style=\";padding: 0px;font-family: Menlo, Monaco, 'Source Code Pro', 'Courier New', monospace;background: rgb(241, 243, 245);border: none;border-radius: 3px;display: block;line-height: 20px;height: 20px;font-size: 13px\"> protocol: tcp</code><code data-type=\"codeline\" style=\";padding: 0px;font-family: Menlo, Monaco, 'Source Code Pro', 'Courier New', monospace;background: rgb(241, 243, 245);border: none;border-radius: 3px;display: block;line-height: 20px;height: 20px;font-size: 13px\"> resolution: NONE</code><code data-type=\"codeline\" style=\";padding: 0px;font-family: Menlo, Monaco, 'Source Code Pro', 'Courier New', monospace;background: rgb(241, 243, 245);border: none;border-radius: 3px;display: block;line-height: 20px;height: 20px;font-size: 13px\"> location: MESH_EXTERNAL</code><code data-type=\"codeline\" style=\";padding: 0px;font-family: Menlo, Monaco, 'Source Code Pro', 'Courier New', monospace;background: rgb(241, 243, 245);border: none;border-radius: 3px;display: block;line-height: 20px;height: 20px;font-size: 13px\"> EOF</code><code data-type=\"codeline\" style=\";padding: 0px;font-family: Menlo, Monaco, 'Source Code Pro', 'Courier New', monospace;background: rgb(241, 243, 245);border: none;border-radius: 3px;display: block;line-height: 20px;height: 20px;font-size: 13px\"><br style=\";padding: 0px\"/></code></pre><p>复制代码</p><p data-type=\"paragraph\" style=\"margin-top: 0px;margin-bottom: 0px;padding: 0px;line-height: 1.875;font-size: 16px;min-height: 30px;white-space: pre-wrap;color: rgb(48, 48, 48);font-family: 'Helvetica Neue', 'PingFang SC', Verdana, 'Microsoft Yahei', 'Hiragino Sans GB', 'Microsoft Sans Serif', 'WenQuanYi Micro Hei', sans-serif;background-color: rgb(255, 255, 255)\"><br style=\";padding: 0px\"/></p><p data-type=\"paragraph\" style=\"margin-top: 0px;margin-bottom: 0px;padding: 0px;line-height: 1.875;font-size: 16px;min-height: 30px;white-space: pre-wrap;color: rgb(48, 48, 48);font-family: 'Helvetica Neue', 'PingFang SC', Verdana, 'Microsoft Yahei', 'Hiragino Sans GB', 'Microsoft Sans Serif', 'WenQuanYi Micro Hei', sans-serif;background-color: rgb(255, 255, 255)\">查看 listener:</p><p data-type=\"paragraph\" style=\"margin-top: 0px;margin-bottom: 0px;padding: 0px;line-height: 1.875;font-size: 16px;min-height: 30px;white-space: pre-wrap;color: rgb(48, 48, 48);font-family: 'Helvetica Neue', 'PingFang SC', Verdana, 'Microsoft Yahei', 'Hiragino Sans GB', 'Microsoft Sans Serif', 'WenQuanYi Micro Hei', sans-serif;background-color: rgb(255, 255, 255)\"><br style=\";padding: 0px\"/></p><pre data-origin=\"pm_code_preview\" style=\"margin-top: 0px;margin-bottom: 0px;padding: 0px;font-family: Courier, 'Courier New', monospace\"><code data-type=\"codeline\" style=\";padding: 0px;font-family: Menlo, Monaco, 'Source Code Pro', 'Courier New', monospace;background: rgb(241, 243, 245);border: none;border-radius: 3px;display: block;line-height: 20px;height: 20px;font-size: 13px\"> $ ./istioctl proxy-config listeners test-8c4c9dcb9-kpm8n.dev-self --address 10.0.x.x -o json</code><code data-type=\"codeline\" style=\";padding: 0px;font-family: Menlo, Monaco, 'Source Code Pro', 'Courier New', monospace;background: rgb(241, 243, 245);border: none;border-radius: 3px;display: block;line-height: 20px;height: 20px;font-size: 13px\"><br style=\";padding: 0px\"/></code><code data-type=\"codeline\" style=\";padding: 0px;font-family: Menlo, Monaco, 'Source Code Pro', 'Courier New', monospace;background: rgb(241, 243, 245);border: none;border-radius: 3px;display: block;line-height: 20px;height: 20px;font-size: 13px\"> [</code><code data-type=\"codeline\" style=\";padding: 0px;font-family: Menlo, Monaco, 'Source Code Pro', 'Courier New', monospace;background: rgb(241, 243, 245);border: none;border-radius: 3px;display: block;line-height: 20px;height: 20px;font-size: 13px\"> {</code><code data-type=\"codeline\" style=\";padding: 0px;font-family: Menlo, Monaco, 'Source Code Pro', 'Courier New', monospace;background: rgb(241, 243, 245);border: none;border-radius: 3px;display: block;line-height: 20px;height: 20px;font-size: 13px\"> "name": "10.0.x.x_7000",</code><code data-type=\"codeline\" style=\";padding: 0px;font-family: Menlo, Monaco, 'Source Code Pro', 'Courier New', monospace;background: rgb(241, 243, 245);border: none;border-radius: 3px;display: block;line-height: 20px;height: 20px;font-size: 13px\"> "address": {</code><code data-type=\"codeline\" style=\";padding: 0px;font-family: Menlo, Monaco, 'Source Code Pro', 'Courier New', monospace;background: rgb(241, 243, 245);border: none;border-radius: 3px;display: block;line-height: 20px;height: 20px;font-size: 13px\"> "socketAddress": {</code><code data-type=\"codeline\" style=\";padding: 0px;font-family: Menlo, Monaco, 'Source Code Pro', 'Courier New', monospace;background: rgb(241, 243, 245);border: none;border-radius: 3px;display: block;line-height: 20px;height: 20px;font-size: 13px\"> "address": "10.0.x.x",</code><code data-type=\"codeline\" style=\";padding: 0px;font-family: Menlo, Monaco, 'Source Code Pro', 'Courier New', monospace;background: rgb(241, 243, 245);border: none;border-radius: 3px;display: block;line-height: 20px;height: 20px;font-size: 13px\"> "portValue": 7000</code><code data-type=\"codeline\" style=\";padding: 0px;font-family: Menlo, Monaco, 'Source Code Pro', 'Courier New', monospace;background: rgb(241, 243, 245);border: none;border-radius: 3px;display: block;line-height: 20px;height: 20px;font-size: 13px\"> }</code><code data-type=\"codeline\" style=\";padding: 0px;font-family: Menlo, Monaco, 'Source Code Pro', 'Courier New', monospace;background: rgb(241, 243, 245);border: none;border-radius: 3px;display: block;line-height: 20px;height: 20px;font-size: 13px\"> },</code><code data-type=\"codeline\" style=\";padding: 0px;font-family: Menlo, Monaco, 'Source Code Pro', 'Courier New', monospace;background: rgb(241, 243, 245);border: none;border-radius: 3px;display: block;line-height: 20px;height: 20px;font-size: 13px\"> "filterChains": [</code><code data-type=\"codeline\" style=\";padding: 0px;font-family: Menlo, Monaco, 'Source Code Pro', 'Courier New', monospace;background: rgb(241, 243, 245);border: none;border-radius: 3px;display: block;line-height: 20px;height: 20px;font-size: 13px\"> {</code><code data-type=\"codeline\" style=\";padding: 0px;font-family: Menlo, Monaco, 'Source Code Pro', 'Courier New', monospace;background: rgb(241, 243, 245);border: none;border-radius: 3px;display: block;line-height: 20px;height: 20px;font-size: 13px\"> "filters": [</code><code data-type=\"codeline\" style=\";padding: 0px;font-family: Menlo, Monaco, 'Source Code Pro', 'Courier New', monospace;background: rgb(241, 243, 245);border: none;border-radius: 3px;display: block;line-height: 20px;height: 20px;font-size: 13px\"> {</code><code data-type=\"codeline\" style=\";padding: 0px;font-family: Menlo, Monaco, 'Source Code Pro', 'Courier New', monospace;background: rgb(241, 243, 245);border: none;border-radius: 3px;display: block;line-height: 20px;height: 20px;font-size: 13px\"> "name": "mixer",</code><code data-type=\"codeline\" style=\";padding: 0px;font-family: Menlo, Monaco, 'Source Code Pro', 'Courier New', monospace;background: rgb(241, 243, 245);border: none;border-radius: 3px;display: block;line-height: 20px;height: 20px;font-size: 13px\"> "typedConfig": {</code><code data-type=\"codeline\" style=\";padding: 0px;font-family: Menlo, Monaco, 'Source Code Pro', 'Courier New', monospace;background: rgb(241, 243, 245);border: none;border-radius: 3px;display: block;line-height: 20px;height: 20px;font-size: 13px\"> "@type": "type.googleapis.com/istio.mixer.v1.config.client.TcpClientConfig",</code><code data-type=\"codeline\" style=\";padding: 0px;font-family: Menlo, Monaco, 'Source Code Pro', 'Courier New', monospace;background: rgb(241, 243, 245);border: none;border-radius: 3px;display: block;line-height: 20px;height: 20px;font-size: 13px\"> "transport": {</code><code data-type=\"codeline\" style=\";padding: 0px;font-family: Menlo, Monaco, 'Source Code Pro', 'Courier New', monospace;background: rgb(241, 243, 245);border: none;border-radius: 3px;display: block;line-height: 20px;height: 20px;font-size: 13px\"> "networkFailPolicy": {</code><code data-type=\"codeline\" style=\";padding: 0px;font-family: Menlo, Monaco, 'Source Code Pro', 'Courier New', monospace;background: rgb(241, 243, 245);border: none;border-radius: 3px;display: block;line-height: 20px;height: 20px;font-size: 13px\"> "policy": "FAIL_CLOSE",</code><code data-type=\"codeline\" style=\";padding: 0px;font-family: Menlo, Monaco, 'Source Code Pro', 'Courier New', monospace;background: rgb(241, 243, 245);border: none;border-radius: 3px;display: block;line-height: 20px;height: 20px;font-size: 13px\"> "baseRetryWait": "0.080s",</code><code data-type=\"codeline\" style=\";padding: 0px;font-family: Menlo, Monaco, 'Source Code Pro', 'Courier New', monospace;background: rgb(241, 243, 245);border: none;border-radius: 3px;display: block;line-height: 20px;height: 20px;font-size: 13px\"> "maxRetryWait": "1s"</code><code data-type=\"codeline\" style=\";padding: 0px;font-family: Menlo, Monaco, 'Source Code Pro', 'Courier New', monospace;background: rgb(241, 243, 245);border: none;border-radius: 3px;display: block;line-height: 20px;height: 20px;font-size: 13px\"> },</code><code data-type=\"codeline\" style=\";padding: 0px;font-family: Menlo, Monaco, 'Source Code Pro', 'Courier New', monospace;background: rgb(241, 243, 245);border: none;border-radius: 3px;display: block;line-height: 20px;height: 20px;font-size: 13px\"> "checkCluster": "outbound|9091||istio-policy.istio-system.svc.cluster.local",</code><code data-type=\"codeline\" style=\";padding: 0px;font-family: Menlo, Monaco, 'Source Code Pro', 'Courier New', monospace;background: rgb(241, 243, 245);border: none;border-radius: 3px;display: block;line-height: 20px;height: 20px;font-size: 13px\"> "reportCluster": "outbound|9091||istio-telemetry.istio-system.svc. cluster.local",</code><code data-type=\"codeline\" style=\";padding: 0px;font-family: Menlo, Monaco, 'Source Code Pro', 'Courier New', monospace;background: rgb(241, 243, 245);border: none;border-radius: 3px;display: block;line-height: 20px;height: 20px;font-size: 13px\"> "reportBatchMaxEntries": 100,</code><code data-type=\"codeline\" style=\";padding: 0px;font-family: Menlo, Monaco, 'Source Code Pro', 'Courier New', monospace;background: rgb(241, 243, 245);border: none;border-radius: 3px;display: block;line-height: 20px;height: 20px;font-size: 13px\"> "reportBatchMaxTime": "1s"</code><code data-type=\"codeline\" style=\";padding: 0px;font-family: Menlo, Monaco, 'Source Code Pro', 'Courier New', monospace;background: rgb(241, 243, 245);border: none;border-radius: 3px;display: block;line-height: 20px;height: 20px;font-size: 13px\"> },</code><code data-type=\"codeline\" style=\";padding: 0px;font-family: Menlo, Monaco, 'Source Code Pro', 'Courier New', monospace;background: rgb(241, 243, 245);border: none;border-radius: 3px;display: block;line-height: 20px;height: 20px;font-size: 13px\"> "mixerAttributes": {</code><code data-type=\"codeline\" style=\";padding: 0px;font-family: Menlo, Monaco, 'Source Code Pro', 'Courier New', monospace;background: rgb(241, 243, 245);border: none;border-radius: 3px;display: block;line-height: 20px;height: 20px;font-size: 13px\"> "attributes": {</code><code data-type=\"codeline\" style=\";padding: 0px;font-family: Menlo, Monaco, 'Source Code Pro', 'Courier New', monospace;background: rgb(241, 243, 245);border: none;border-radius: 3px;display: block;line-height: 20px;height: 20px;font-size: 13px\"> "context.proxy_version": {</code><code data-type=\"codeline\" style=\";padding: 0px;font-family: Menlo, Monaco, 'Source Code Pro', 'Courier New', monospace;background: rgb(241, 243, 245);border: none;border-radius: 3px;display: block;line-height: 20px;height: 20px;font-size: 13px\"> "stringValue": "1.4.8"</code><code data-type=\"codeline\" style=\";padding: 0px;font-family: Menlo, Monaco, 'Source Code Pro', 'Courier New', monospace;background: rgb(241, 243, 245);border: none;border-radius: 3px;display: block;line-height: 20px;height: 20px;font-size: 13px\"> },</code><code data-type=\"codeline\" style=\";padding: 0px;font-family: Menlo, Monaco, 'Source Code Pro', 'Courier New', monospace;background: rgb(241, 243, 245);border: none;border-radius: 3px;display: block;line-height: 20px;height: 20px;font-size: 13px\"> "context.reporter.kind": {</code><code data-type=\"codeline\" style=\";padding: 0px;font-family: Menlo, Monaco, 'Source Code Pro', 'Courier New', monospace;background: rgb(241, 243, 245);border: none;border-radius: 3px;display: block;line-height: 20px;height: 20px;font-size: 13px\"> "stringValue": "outbound"</code><code data-type=\"codeline\" style=\";padding: 0px;font-family: Menlo, Monaco, 'Source Code Pro', 'Courier New', monospace;background: rgb(241, 243, 245);border: none;border-radius: 3px;display: block;line-height: 20px;height: 20px;font-size: 13px\"> },</code><code data-type=\"codeline\" style=\";padding: 0px;font-family: Menlo, Monaco, 'Source Code Pro', 'Courier New', monospace;background: rgb(241, 243, 245);border: none;border-radius: 3px;display: block;line-height: 20px;height: 20px;font-size: 13px\"> "context.reporter.uid": {</code><code data-type=\"codeline\" style=\";padding: 0px;font-family: Menlo, Monaco, 'Source Code Pro', 'Courier New', monospace;background: rgb(241, 243, 245);border: none;border-radius: 3px;display: block;line-height: 20px;height: 20px;font-size: 13px\"> "stringValue": "kubernetes://test-8c4c9dcb9-kpm8n.dev-self"</code><code data-type=\"codeline\" style=\";padding: 0px;font-family: Menlo, Monaco, 'Source Code Pro', 'Courier New', monospace;background: rgb(241, 243, 245);border: none;border-radius: 3px;display: block;line-height: 20px;height: 20px;font-size: 13px\"> },</code><code data-type=\"codeline\" style=\";padding: 0px;font-family: Menlo, Monaco, 'Source Code Pro', 'Courier New', monospace;background: rgb(241, 243, 245);border: none;border-radius: 3px;display: block;line-height: 20px;height: 20px;font-size: 13px\"> "destination.service.host": {</code><code data-type=\"codeline\" style=\";padding: 0px;font-family: Menlo, Monaco, 'Source Code Pro', 'Courier New', monospace;background: rgb(241, 243, 245);border: none;border-radius: 3px;display: block;line-height: 20px;height: 20px;font-size: 13px\"> "stringValue": "redis"</code><code data-type=\"codeline\" style=\";padding: 0px;font-family: Menlo, Monaco, 'Source Code Pro', 'Courier New', monospace;background: rgb(241, 243, 245);border: none;border-radius: 3px;display: block;line-height: 20px;height: 20px;font-size: 13px\"> },</code><code data-type=\"codeline\" style=\";padding: 0px;font-family: Menlo, Monaco, 'Source Code Pro', 'Courier New', monospace;background: rgb(241, 243, 245);border: none;border-radius: 3px;display: block;line-height: 20px;height: 20px;font-size: 13px\"> "destination.service.name": {</code><code data-type=\"codeline\" style=\";padding: 0px;font-family: Menlo, Monaco, 'Source Code Pro', 'Courier New', monospace;background: rgb(241, 243, 245);border: none;border-radius: 3px;display: block;line-height: 20px;height: 20px;font-size: 13px\"> "stringValue": "redis"</code><code data-type=\"codeline\" style=\";padding: 0px;font-family: Menlo, Monaco, 'Source Code Pro', 'Courier New', monospace;background: rgb(241, 243, 245);border: none;border-radius: 3px;display: block;line-height: 20px;height: 20px;font-size: 13px\"> },</code><code data-type=\"codeline\" style=\";padding: 0px;font-family: Menlo, Monaco, 'Source Code Pro', 'Courier New', monospace;background: rgb(241, 243, 245);border: none;border-radius: 3px;display: block;line-height: 20px;height: 20px;font-size: 13px\"> "destination.service.namespace": {</code><code data-type=\"codeline\" style=\";padding: 0px;font-family: Menlo, Monaco, 'Source Code Pro', 'Courier New', monospace;background: rgb(241, 243, 245);border: none;border-radius: 3px;display: block;line-height: 20px;height: 20px;font-size: 13px\"> "stringValue": "dev-self "</code><code data-type=\"codeline\" style=\";padding: 0px;font-family: Menlo, Monaco, 'Source Code Pro', 'Courier New', monospace;background: rgb(241, 243, 245);border: none;border-radius: 3px;display: block;line-height: 20px;height: 20px;font-size: 13px\"> },</code><code data-type=\"codeline\" style=\";padding: 0px;font-family: Menlo, Monaco, 'Source Code Pro', 'Courier New', monospace;background: rgb(241, 243, 245);border: none;border-radius: 3px;display: block;line-height: 20px;height: 20px;font-size: 13px\"> "source.namespace": {</code><code data-type=\"codeline\" style=\";padding: 0px;font-family: Menlo, Monaco, 'Source Code Pro', 'Courier New', monospace;background: rgb(241, 243, 245);border: none;border-radius: 3px;display: block;line-height: 20px;height: 20px;font-size: 13px\"> "stringValue": "dev-self "</code><code data-type=\"codeline\" style=\";padding: 0px;font-family: Menlo, Monaco, 'Source Code Pro', 'Courier New', monospace;background: rgb(241, 243, 245);border: none;border-radius: 3px;display: block;line-height: 20px;height: 20px;font-size: 13px\"> },</code><code data-type=\"codeline\" style=\";padding: 0px;font-family: Menlo, Monaco, 'Source Code Pro', 'Courier New', monospace;background: rgb(241, 243, 245);border: none;border-radius: 3px;display: block;line-height: 20px;height: 20px;font-size: 13px\"> "source.uid": {</code><code data-type=\"codeline\" style=\";padding: 0px;font-family: Menlo, Monaco, 'Source Code Pro', 'Courier New', monospace;background: rgb(241, 243, 245);border: none;border-radius: 3px;display: block;line-height: 20px;height: 20px;font-size: 13px\"> "stringValue": "kubernetes://test-8c4c9dcb9-kpm8n.dev-self"</code><code data-type=\"codeline\" style=\";padding: 0px;font-family: Menlo, Monaco, 'Source Code Pro', 'Courier New', monospace;background: rgb(241, 243, 245);border: none;border-radius: 3px;display: block;line-height: 20px;height: 20px;font-size: 13px\"> }</code><code data-type=\"codeline\" style=\";padding: 0px;font-family: Menlo, Monaco, 'Source Code Pro', 'Courier New', monospace;background: rgb(241, 243, 245);border: none;border-radius: 3px;display: block;line-height: 20px;height: 20px;font-size: 13px\"> }</code><code data-type=\"codeline\" style=\";padding: 0px;font-family: Menlo, Monaco, 'Source Code Pro', 'Courier New', monospace;background: rgb(241, 243, 245);border: none;border-radius: 3px;display: block;line-height: 20px;height: 20px;font-size: 13px\"> },</code><code data-type=\"codeline\" style=\";padding: 0px;font-family: Menlo, Monaco, 'Source Code Pro', 'Courier New', monospace;background: rgb(241, 243, 245);border: none;border-radius: 3px;display: block;line-height: 20px;height: 20px;font-size: 13px\"> "disableCheckCalls": true</code><code data-type=\"codeline\" style=\";padding: 0px;font-family: Menlo, Monaco, 'Source Code Pro', 'Courier New', monospace;background: rgb(241, 243, 245);border: none;border-radius: 3px;display: block;line-height: 20px;height: 20px;font-size: 13px\"> }</code><code data-type=\"codeline\" style=\";padding: 0px;font-family: Menlo, Monaco, 'Source Code Pro', 'Courier New', monospace;background: rgb(241, 243, 245);border: none;border-radius: 3px;display: block;line-height: 20px;height: 20px;font-size: 13px\"> },</code><code data-type=\"codeline\" style=\";padding: 0px;font-family: Menlo, Monaco, 'Source Code Pro', 'Courier New', monospace;background: rgb(241, 243, 245);border: none;border-radius: 3px;display: block;line-height: 20px;height: 20px;font-size: 13px\"> {</code><code data-type=\"codeline\" style=\";padding: 0px;font-family: Menlo, Monaco, 'Source Code Pro', 'Courier New', monospace;background: rgb(241, 243, 245);border: none;border-radius: 3px;display: block;line-height: 20px;height: 20px;font-size: 13px\"> "name": "envoy.tcp_proxy",</code><code data-type=\"codeline\" style=\";padding: 0px;font-family: Menlo, Monaco, 'Source Code Pro', 'Courier New', monospace;background: rgb(241, 243, 245);border: none;border-radius: 3px;display: block;line-height: 20px;height: 20px;font-size: 13px\"> "typedConfig": {</code><code data-type=\"codeline\" style=\";padding: 0px;font-family: Menlo, Monaco, 'Source Code Pro', 'Courier New', monospace;background: rgb(241, 243, 245);border: none;border-radius: 3px;display: block;line-height: 20px;height: 20px;font-size: 13px\"> "@type": "type.googleapis.com/envoy.config.filter.network.tcp_proxy.v2.TcpProxy",</code><code data-type=\"codeline\" style=\";padding: 0px;font-family: Menlo, Monaco, 'Source Code Pro', 'Courier New', monospace;background: rgb(241, 243, 245);border: none;border-radius: 3px;display: block;line-height: 20px;height: 20px;font-size: 13px\"> "statPrefix": "outbound|7000||redis",</code><code data-type=\"codeline\" style=\";padding: 0px;font-family: Menlo, Monaco, 'Source Code Pro', 'Courier New', monospace;background: rgb(241, 243, 245);border: none;border-radius: 3px;display: block;line-height: 20px;height: 20px;font-size: 13px\"> "cluster": "outbound|7000||redis"</code><code data-type=\"codeline\" style=\";padding: 0px;font-family: Menlo, Monaco, 'Source Code Pro', 'Courier New', monospace;background: rgb(241, 243, 245);border: none;border-radius: 3px;display: block;line-height: 20px;height: 20px;font-size: 13px\"> }</code><code data-type=\"codeline\" style=\";padding: 0px;font-family: Menlo, Monaco, 'Source Code Pro', 'Courier New', monospace;background: rgb(241, 243, 245);border: none;border-radius: 3px;display: block;line-height: 20px;height: 20px;font-size: 13px\"> }</code><code data-type=\"codeline\" style=\";padding: 0px;font-family: Menlo, Monaco, 'Source Code Pro', 'Courier New', monospace;background: rgb(241, 243, 245);border: none;border-radius: 3px;display: block;line-height: 20px;height: 20px;font-size: 13px\"> ]</code><code data-type=\"codeline\" style=\";padding: 0px;font-family: Menlo, Monaco, 'Source Code Pro', 'Courier New', monospace;background: rgb(241, 243, 245);border: none;border-radius: 3px;display: block;line-height: 20px;height: 20px;font-size: 13px\"> }</code><code data-type=\"codeline\" style=\";padding: 0px;font-family: Menlo, Monaco, 'Source Code Pro', 'Courier New', monospace;background: rgb(241, 243, 245);border: none;border-radius: 3px;display: block;line-height: 20px;height: 20px;font-size: 13px\"> ],</code><code data-type=\"codeline\" style=\";padding: 0px;font-family: Menlo, Monaco, 'Source Code Pro', 'Courier New', monospace;background: rgb(241, 243, 245);border: none;border-radius: 3px;display: block;line-height: 20px;height: 20px;font-size: 13px\"> "deprecatedV1": {</code><code data-type=\"codeline\" style=\";padding: 0px;font-family: Menlo, Monaco, 'Source Code Pro', 'Courier New', monospace;background: rgb(241, 243, 245);border: none;border-radius: 3px;display: block;line-height: 20px;height: 20px;font-size: 13px\"> "bindToPort": false</code><code data-type=\"codeline\" style=\";padding: 0px;font-family: Menlo, Monaco, 'Source Code Pro', 'Courier New', monospace;background: rgb(241, 243, 245);border: none;border-radius: 3px;display: block;line-height: 20px;height: 20px;font-size: 13px\"> },</code><code data-type=\"codeline\" style=\";padding: 0px;font-family: Menlo, Monaco, 'Source Code Pro', 'Courier New', monospace;background: rgb(241, 243, 245);border: none;border-radius: 3px;display: block;line-height: 20px;height: 20px;font-size: 13px\"> "listenerFiltersTimeout": "0.100s",</code><code data-type=\"codeline\" style=\";padding: 0px;font-family: Menlo, Monaco, 'Source Code Pro', 'Courier New', monospace;background: rgb(241, 243, 245);border: none;border-radius: 3px;display: block;line-height: 20px;height: 20px;font-size: 13px\"> "continueOnListenerFiltersTimeout": true,</code><code data-type=\"codeline\" style=\";padding: 0px;font-family: Menlo, Monaco, 'Source Code Pro', 'Courier New', monospace;background: rgb(241, 243, 245);border: none;border-radius: 3px;display: block;line-height: 20px;height: 20px;font-size: 13px\"> "trafficDirection": "OUTBOUND"</code><code data-type=\"codeline\" style=\";padding: 0px;font-family: Menlo, Monaco, 'Source Code Pro', 'Courier New', monospace;background: rgb(241, 243, 245);border: none;border-radius: 3px;display: block;line-height: 20px;height: 20px;font-size: 13px\"> },</code><code data-type=\"codeline\" style=\";padding: 0px;font-family: Menlo, Monaco, 'Source Code Pro', 'Courier New', monospace;background: rgb(241, 243, 245);border: none;border-radius: 3px;display: block;line-height: 20px;height: 20px;font-size: 13px\"> ......</code><code data-type=\"codeline\" style=\";padding: 0px;font-family: Menlo, Monaco, 'Source Code Pro', 'Courier New', monospace;background: rgb(241, 243, 245);border: none;border-radius: 3px;display: block;line-height: 20px;height: 20px;font-size: 13px\"> ]</code><code data-type=\"codeline\" style=\";padding: 0px;font-family: Menlo, Monaco, 'Source Code Pro', 'Courier New', monospace;background: rgb(241, 243, 245);border: none;border-radius: 3px;display: block;line-height: 20px;height: 20px;font-size: 13px\"><br style=\";padding: 0px\"/></code></pre><p>复制代码</p><p data-type=\"paragraph\" style=\"margin-top: 0px;margin-bottom: 0px;padding: 0px;line-height: 1.875;font-size: 16px;min-height: 30px;white-space: pre-wrap;color: rgb(48, 48, 48);font-family: 'Helvetica Neue', 'PingFang SC', Verdana, 'Microsoft Yahei', 'Hiragino Sans GB', 'Microsoft Sans Serif', 'WenQuanYi Micro Hei', sans-serif;background-color: rgb(255, 255, 255)\"><br style=\";padding: 0px\"/></p><p data-type=\"paragraph\" style=\"margin-top: 0px;margin-bottom: 0px;padding: 0px;line-height: 1.875;font-size: 16px;min-height: 30px;white-space: pre-wrap;color: rgb(48, 48, 48);font-family: 'Helvetica Neue', 'PingFang SC', Verdana, 'Microsoft Yahei', 'Hiragino Sans GB', 'Microsoft Sans Serif', 'WenQuanYi Micro Hei', sans-serif;background-color: rgb(255, 255, 255)\">我们可以看到 listener "10.0.1.6_7000" 中 tcp 流量关联了 outbound|7000||redis 集群,该集群的类型是 ORIGINAL_DST,即保持源报文的目的地址,并且没有关联任何 service。</p><p data-type=\"paragraph\" style=\"margin-top: 0px;margin-bottom: 0px;padding: 0px;line-height: 1.875;font-size: 16px;min-height: 30px;white-space: pre-wrap;color: rgb(48, 48, 48);font-family: 'Helvetica Neue', 'PingFang SC', Verdana, 'Microsoft Yahei', 'Hiragino Sans GB', 'Microsoft Sans Serif', 'WenQuanYi Micro Hei', sans-serif;background-color: rgb(255, 255, 255)\"><br style=\";padding: 0px\"/></p><p data-type=\"paragraph\" style=\"margin-top: 0px;margin-bottom: 0px;padding: 0px;line-height: 1.875;font-size: 16px;min-height: 30px;white-space: pre-wrap;color: rgb(48, 48, 48);font-family: 'Helvetica Neue', 'PingFang SC', Verdana, 'Microsoft Yahei', 'Hiragino Sans GB', 'Microsoft Sans Serif', 'WenQuanYi Micro Hei', sans-serif;background-color: rgb(255, 255, 255)\">所以此时访问 10.0.x.x:7000 的目标地址不会改变。</p><p data-type=\"paragraph\" style=\"margin-top: 0px;margin-bottom: 0px;padding: 0px;line-height: 1.875;font-size: 16px;min-height: 30px;white-space: pre-wrap;color: rgb(48, 48, 48);font-family: 'Helvetica Neue', 'PingFang SC', Verdana, 'Microsoft Yahei', 'Hiragino Sans GB', 'Microsoft Sans Serif', 'WenQuanYi Micro Hei', sans-serif;background-color: rgb(255, 255, 255)\"><br style=\";padding: 0px\"/></p><pre data-origin=\"pm_code_preview\" style=\"margin-top: 0px;margin-bottom: 0px;padding: 0px;font-family: Courier, 'Courier New', monospace\"><code data-type=\"codeline\" style=\";padding: 0px;font-family: Menlo, Monaco, 'Source Code Pro', 'Courier New', monospace;background: rgb(241, 243, 245);border: none;border-radius: 3px;display: block;line-height: 20px;height: 20px;font-size: 13px\"> {</code><code data-type=\"codeline\" style=\";padding: 0px;font-family: Menlo, Monaco, 'Source Code Pro', 'Courier New', monospace;background: rgb(241, 243, 245);border: none;border-radius: 3px;display: block;line-height: 20px;height: 20px;font-size: 13px\"> "name": "outbound|7000||redis",</code><code data-type=\"codeline\" style=\";padding: 0px;font-family: Menlo, Monaco, 'Source Code Pro', 'Courier New', monospace;background: rgb(241, 243, 245);border: none;border-radius: 3px;display: block;line-height: 20px;height: 20px;font-size: 13px\"> "type": "ORIGINAL_DST",</code><code data-type=\"codeline\" style=\";padding: 0px;font-family: Menlo, Monaco, 'Source Code Pro', 'Courier New', monospace;background: rgb(241, 243, 245);border: none;border-radius: 3px;display: block;line-height: 20px;height: 20px;font-size: 13px\"> "connectTimeout": "10s",</code><code data-type=\"codeline\" style=\";padding: 0px;font-family: Menlo, Monaco, 'Source Code Pro', 'Courier New', monospace;background: rgb(241, 243, 245);border: none;border-radius: 3px;display: block;line-height: 20px;height: 20px;font-size: 13px\"> "lbPolicy": "CLUSTER_PROVIDED",</code><code data-type=\"codeline\" style=\";padding: 0px;font-family: Menlo, Monaco, 'Source Code Pro', 'Courier New', monospace;background: rgb(241, 243, 245);border: none;border-radius: 3px;display: block;line-height: 20px;height: 20px;font-size: 13px\"> "circuitBreakers": {</code><code data-type=\"codeline\" style=\";padding: 0px;font-family: Menlo, Monaco, 'Source Code Pro', 'Courier New', monospace;background: rgb(241, 243, 245);border: none;border-radius: 3px;display: block;line-height: 20px;height: 20px;font-size: 13px\"> "thresholds": [</code><code data-type=\"codeline\" style=\";padding: 0px;font-family: Menlo, Monaco, 'Source Code Pro', 'Courier New', monospace;background: rgb(241, 243, 245);border: none;border-radius: 3px;display: block;line-height: 20px;height: 20px;font-size: 13px\"> {</code><code data-type=\"codeline\" style=\";padding: 0px;font-family: Menlo, Monaco, 'Source Code Pro', 'Courier New', monospace;background: rgb(241, 243, 245);border: none;border-radius: 3px;display: block;line-height: 20px;height: 20px;font-size: 13px\"> "maxConnections": 4294967295,</code><code data-type=\"codeline\" style=\";padding: 0px;font-family: Menlo, Monaco, 'Source Code Pro', 'Courier New', monospace;background: rgb(241, 243, 245);border: none;border-radius: 3px;display: block;line-height: 20px;height: 20px;font-size: 13px\"> "maxPendingRequests": 4294967295,</code><code data-type=\"codeline\" style=\";padding: 0px;font-family: Menlo, Monaco, 'Source Code Pro', 'Courier New', monospace;background: rgb(241, 243, 245);border: none;border-radius: 3px;display: block;line-height: 20px;height: 20px;font-size: 13px\"> "maxRequests": 4294967295,</code><code data-type=\"codeline\" style=\";padding: 0px;font-family: Menlo, Monaco, 'Source Code Pro', 'Courier New', monospace;background: rgb(241, 243, 245);border: none;border-radius: 3px;display: block;line-height: 20px;height: 20px;font-size: 13px\"> "maxRetries": 4294967295</code><code data-type=\"codeline\" style=\";padding: 0px;font-family: Menlo, Monaco, 'Source Code Pro', 'Courier New', monospace;background: rgb(241, 243, 245);border: none;border-radius: 3px;display: block;line-height: 20px;height: 20px;font-size: 13px\"> }</code><code data-type=\"codeline\" style=\";padding: 0px;font-family: Menlo, Monaco, 'Source Code Pro', 'Courier New', monospace;background: rgb(241, 243, 245);border: none;border-radius: 3px;display: block;line-height: 20px;height: 20px;font-size: 13px\"> ]</code><code data-type=\"codeline\" style=\";padding: 0px;font-family: Menlo, Monaco, 'Source Code Pro', 'Courier New', monospace;background: rgb(241, 243, 245);border: none;border-radius: 3px;display: block;line-height: 20px;height: 20px;font-size: 13px\"> }</code><code data-type=\"codeline\" style=\";padding: 0px;font-family: Menlo, Monaco, 'Source Code Pro', 'Courier New', monospace;background: rgb(241, 243, 245);border: none;border-radius: 3px;display: block;line-height: 20px;height: 20px;font-size: 13px\"> }</code><code data-type=\"codeline\" style=\";padding: 0px;font-family: Menlo, Monaco, 'Source Code Pro', 'Courier New', monospace;background: rgb(241, 243, 245);border: none;border-radius: 3px;display: block;line-height: 20px;height: 20px;font-size: 13px\"><br style=\";padding: 0px\"/></code></pre><p>复制代码</p><p data-type=\"paragraph\" style=\"margin-top: 0px;margin-bottom: 0px;padding: 0px;line-height: 1.875;font-size: 16px;min-height: 30px;white-space: pre-wrap;color: rgb(48, 48, 48);font-family: 'Helvetica Neue', 'PingFang SC', Verdana, 'Microsoft Yahei', 'Hiragino Sans GB', 'Microsoft Sans Serif', 'WenQuanYi Micro Hei', sans-serif;background-color: rgb(255, 255, 255)\"><br style=\";padding: 0px\"/></p><p data-type=\"paragraph\" style=\"margin-top: 0px;margin-bottom: 0px;padding: 0px;line-height: 1.875;font-size: 16px;min-height: 30px;white-space: pre-wrap;color: rgb(48, 48, 48);font-family: 'Helvetica Neue', 'PingFang SC', Verdana, 'Microsoft Yahei', 'Hiragino Sans GB', 'Microsoft Sans Serif', 'WenQuanYi Micro Hei', sans-serif;background-color: rgb(255, 255, 255)\">再次访问测试:</p><p data-type=\"paragraph\" style=\"margin-top: 0px;margin-bottom: 0px;padding: 0px;line-height: 1.875;font-size: 16px;min-height: 30px;white-space: pre-wrap;color: rgb(48, 48, 48);font-family: 'Helvetica Neue', 'PingFang SC', Verdana, 'Microsoft Yahei', 'Hiragino Sans GB', 'Microsoft Sans Serif', 'WenQuanYi Micro Hei', sans-serif;background-color: rgb(255, 255, 255)\"><br style=\";padding: 0px\"/></p><pre data-origin=\"pm_code_preview\" style=\"margin-top: 0px;margin-bottom: 0px;padding: 0px;font-family: Courier, 'Courier New', monospace\"><code data-type=\"codeline\" style=\";padding: 0px;font-family: Menlo, Monaco, 'Source Code Pro', 'Courier New', monospace;background: rgb(241, 243, 245);border: none;border-radius: 3px;display: block;line-height: 20px;height: 20px;font-size: 13px\"> $ nc 10.0.0.6 7000</code><code data-type=\"codeline\" style=\";padding: 0px;font-family: Menlo, Monaco, 'Source Code Pro', 'Courier New', monospace;background: rgb(241, 243, 245);border: none;border-radius: 3px;display: block;line-height: 20px;height: 20px;font-size: 13px\"> keys *</code><code data-type=\"codeline\" style=\";padding: 0px;font-family: Menlo, Monaco, 'Source Code Pro', 'Courier New', monospace;background: rgb(241, 243, 245);border: none;border-radius: 3px;display: block;line-height: 20px;height: 20px;font-size: 13px\"> -NOAUTH Authentication required.</code><code data-type=\"codeline\" style=\";padding: 0px;font-family: Menlo, Monaco, 'Source Code Pro', 'Courier New', monospace;background: rgb(241, 243, 245);border: none;border-radius: 3px;display: block;line-height: 20px;height: 20px;font-size: 13px\"><br style=\";padding: 0px\"/></code><code data-type=\"codeline\" style=\";padding: 0px;font-family: Menlo, Monaco, 'Source Code Pro', 'Courier New', monospace;background: rgb(241, 243, 245);border: none;border-radius: 3px;display: block;line-height: 20px;height: 20px;font-size: 13px\"> $ nc 10.0.0.7 7000</code><code data-type=\"codeline\" style=\";padding: 0px;font-family: Menlo, Monaco, 'Source Code Pro', 'Courier New', monospace;background: rgb(241, 243, 245);border: none;border-radius: 3px;display: block;line-height: 20px;height: 20px;font-size: 13px\"> keys *</code><code data-type=\"codeline\" style=\";padding: 0px;font-family: Menlo, Monaco, 'Source Code Pro', 'Courier New', monospace;background: rgb(241, 243, 245);border: none;border-radius: 3px;display: block;line-height: 20px;height: 20px;font-size: 13px\"> -NOAUTH Authentication required.</code><code data-type=\"codeline\" style=\";padding: 0px;font-family: Menlo, Monaco, 'Source Code Pro', 'Courier New', monospace;background: rgb(241, 243, 245);border: none;border-radius: 3px;display: block;line-height: 20px;height: 20px;font-size: 13px\"><br style=\";padding: 0px\"/></code><code data-type=\"codeline\" style=\";padding: 0px;font-family: Menlo, Monaco, 'Source Code Pro', 'Courier New', monospace;background: rgb(241, 243, 245);border: none;border-radius: 3px;display: block;line-height: 20px;height: 20px;font-size: 13px\"> $ nc 10.0.0.8 7000</code><code data-type=\"codeline\" style=\";padding: 0px;font-family: Menlo, Monaco, 'Source Code Pro', 'Courier New', monospace;background: rgb(241, 243, 245);border: none;border-radius: 3px;display: block;line-height: 20px;height: 20px;font-size: 13px\"> keys *</code><code data-type=\"codeline\" style=\";padding: 0px;font-family: Menlo, Monaco, 'Source Code Pro', 'Courier New', monospace;background: rgb(241, 243, 245);border: none;border-radius: 3px;display: block;line-height: 20px;height: 20px;font-size: 13px\"> -NOAUTH Authentication required.</code><code data-type=\"codeline\" style=\";padding: 0px;font-family: Menlo, Monaco, 'Source Code Pro', 'Courier New', monospace;background: rgb(241, 243, 245);border: none;border-radius: 3px;display: block;line-height: 20px;height: 20px;font-size: 13px\"><br style=\";padding: 0px\"/></code></pre><p>复制代码</p><p data-type=\"paragraph\" style=\"margin-top: 0px;margin-bottom: 0px;padding: 0px;line-height: 1.875;font-size: 16px;min-height: 30px;white-space: pre-wrap;color: rgb(48, 48, 48);font-family: 'Helvetica Neue', 'PingFang SC', Verdana, 'Microsoft Yahei', 'Hiragino Sans GB', 'Microsoft Sans Serif', 'WenQuanYi Micro Hei', sans-serif;background-color: rgb(255, 255, 255)\"><br style=\";padding: 0px\"/></p><p data-type=\"paragraph\" style=\"margin-top: 0px;margin-bottom: 0px;padding: 0px;line-height: 1.875;font-size: 16px;min-height: 30px;white-space: pre-wrap;color: rgb(48, 48, 48);font-family: 'Helvetica Neue', 'PingFang SC', Verdana, 'Microsoft Yahei', 'Hiragino Sans GB', 'Microsoft Sans Serif', 'WenQuanYi Micro Hei', sans-serif;background-color: rgb(255, 255, 255)\">已经可以正常转发。</p><h2 data-id=\"heading11\" data-type=\"heading\" top=\"13543\" style=\";padding: 26px 0px 4px;font-size: 28px;line-height: 44px;color: rgb(53, 53, 53);white-space: pre-wrap;font-family: 'Helvetica Neue', 'PingFang SC', Verdana, 'Microsoft Yahei', 'Hiragino Sans GB', 'Microsoft Sans Serif', 'WenQuanYi Micro Hei', sans-serif;background-color: rgb(255, 255, 255)\">方法 2:更改 global.proxy.includeIPRanges 或 global.proxy.excludeIPRanges 配置选项</h2><ul data-type=\"bulletedlist\" style=\"list-style-type: none;\" class=\" list-paddingleft-2\"><li><p data-type=\"paragraph\" style=\"margin-top: 0px;margin-bottom: 0px;padding: 0px 0px 0px 24px;line-height: 1.875;font-size: 16px;min-height: 30px;white-space: pre-wrap;position: relative\">global.proxy.includeIPRanges:需要进行代理 ip 地址范围。</p></li><li><p data-type=\"paragraph\" style=\"margin-top: 0px;margin-bottom: 0px;padding: 0px 0px 0px 24px;line-height: 1.875;font-size: 16px;min-height: 30px;white-space: pre-wrap;position: relative\">global.proxy.excludeIPRanges:不需要进行代理的 ip 地址范围。</p></li></ul><p data-type=\"paragraph\" style=\"margin-top: 0px;margin-bottom: 0px;padding: 0px;line-height: 1.875;font-size: 16px;min-height: 30px;white-space: pre-wrap;color: rgb(48, 48, 48);font-family: 'Helvetica Neue', 'PingFang SC', Verdana, 'Microsoft Yahei', 'Hiragino Sans GB', 'Microsoft Sans Serif', 'WenQuanYi Micro Hei', sans-serif;background-color: rgb(255, 255, 255)\"><br style=\";padding: 0px\"/></p><p data-type=\"paragraph\" style=\"margin-top: 0px;margin-bottom: 0px;padding: 0px;line-height: 1.875;font-size: 16px;min-height: 30px;white-space: pre-wrap;color: rgb(48, 48, 48);font-family: 'Helvetica Neue', 'PingFang SC', Verdana, 'Microsoft Yahei', 'Hiragino Sans GB', 'Microsoft Sans Serif', 'WenQuanYi Micro Hei', sans-serif;background-color: rgb(255, 255, 255)\">最终效果为在 pod 的 iptables 规则上匹配或排除对应的地址,访问这些地址流量不会被重定向到 istio-proxy,而是直接发送。</p><p data-type=\"paragraph\" style=\"margin-top: 0px;margin-bottom: 0px;padding: 0px;line-height: 1.875;font-size: 16px;min-height: 30px;white-space: pre-wrap;color: rgb(48, 48, 48);font-family: 'Helvetica Neue', 'PingFang SC', Verdana, 'Microsoft Yahei', 'Hiragino Sans GB', 'Microsoft Sans Serif', 'WenQuanYi Micro Hei', sans-serif;background-color: rgb(255, 255, 255)\"><br style=\";padding: 0px\"/></p><p data-type=\"paragraph\" style=\"margin-top: 0px;margin-bottom: 0px;padding: 0px;line-height: 1.875;font-size: 16px;min-height: 30px;white-space: pre-wrap;color: rgb(48, 48, 48);font-family: 'Helvetica Neue', 'PingFang SC', Verdana, 'Microsoft Yahei', 'Hiragino Sans GB', 'Microsoft Sans Serif', 'WenQuanYi Micro Hei', sans-serif;background-color: rgb(255, 255, 255)\">我们可以使用 kubectl apply 命令更新 istio-Sidecar-injector 配置,也可以修改 spec. template.metadata. annotations 中的 traffic.Sidecar.istio.io/includeOutboundIPRanges 来达到相同的效果。</p><p data-type=\"paragraph\" style=\"margin-top: 0px;margin-bottom: 0px;padding: 0px;line-height: 1.875;font-size: 16px;min-height: 30px;white-space: pre-wrap;color: rgb(48, 48, 48);font-family: 'Helvetica Neue', 'PingFang SC', Verdana, 'Microsoft Yahei', 'Hiragino Sans GB', 'Microsoft Sans Serif', 'WenQuanYi Micro Hei', sans-serif;background-color: rgb(255, 255, 255)\"><br style=\";padding: 0px\"/></p><pre data-origin=\"pm_code_preview\" style=\"margin-top: 0px;margin-bottom: 0px;padding: 0px;font-family: Courier, 'Courier New', monospace\"><code data-type=\"codeline\" style=\";padding: 0px;font-family: Menlo, Monaco, 'Source Code Pro', 'Courier New', monospace;background: rgb(241, 243, 245);border: none;border-radius: 3px;display: block;line-height: 20px;height: 20px;font-size: 13px\"> template:</code><code data-type=\"codeline\" style=\";padding: 0px;font-family: Menlo, Monaco, 'Source Code Pro', 'Courier New', monospace;background: rgb(241, 243, 245);border: none;border-radius: 3px;display: block;line-height: 20px;height: 20px;font-size: 13px\"> metadata:</code><code data-type=\"codeline\" style=\";padding: 0px;font-family: Menlo, Monaco, 'Source Code Pro', 'Courier New', monospace;background: rgb(241, 243, 245);border: none;border-radius: 3px;display: block;line-height: 20px;height: 20px;font-size: 13px\"> annotations:</code><code data-type=\"codeline\" style=\";padding: 0px;font-family: Menlo, Monaco, 'Source Code Pro', 'Courier New', monospace;background: rgb(241, 243, 245);border: none;border-radius: 3px;display: block;line-height: 20px;height: 20px;font-size: 13px\"> kubectl.kubernetes.io/restartedAt: '2021-06-09T21:59:10+08:00'</code><code data-type=\"codeline\" style=\";padding: 0px;font-family: Menlo, Monaco, 'Source Code Pro', 'Courier New', monospace;background: rgb(241, 243, 245);border: none;border-radius: 3px;display: block;line-height: 20px;height: 20px;font-size: 13px\"> kubesphere.io/restartedAt: '2021-09-13T17:07:03.082Z'</code><code data-type=\"codeline\" style=\";padding: 0px;font-family: Menlo, Monaco, 'Source Code Pro', 'Courier New', monospace;background: rgb(241, 243, 245);border: none;border-radius: 3px;display: block;line-height: 20px;height: 20px;font-size: 13px\"> logging.kubesphere.io/logSidecar-config: '{}'</code><code data-type=\"codeline\" style=\";padding: 0px;font-family: Menlo, Monaco, 'Source Code Pro', 'Courier New', monospace;background: rgb(241, 243, 245);border: none;border-radius: 3px;display: block;line-height: 20px;height: 20px;font-size: 13px\"> Sidecar.istio.io/componentLogLevel: 'ext_authz:trace,filter:debug'</code><code data-type=\"codeline\" style=\";padding: 0px;font-family: Menlo, Monaco, 'Source Code Pro', 'Courier New', monospace;background: rgb(241, 243, 245);border: none;border-radius: 3px;display: block;line-height: 20px;height: 20px;font-size: 13px\"> Sidecar.istio.io/inject: 'true'</code><code data-type=\"codeline\" style=\";padding: 0px;font-family: Menlo, Monaco, 'Source Code Pro', 'Courier New', monospace;background: rgb(241, 243, 245);border: none;border-radius: 3px;display: block;line-height: 20px;height: 20px;font-size: 13px\"> traffic.Sidecar.istio.io/excludeOutboundIPRanges: 10.0.1.0/24</code><code data-type=\"codeline\" style=\";padding: 0px;font-family: Menlo, Monaco, 'Source Code Pro', 'Courier New', monospace;background: rgb(241, 243, 245);border: none;border-radius: 3px;display: block;line-height: 20px;height: 20px;font-size: 13px\"><br style=\";padding: 0px\"/></code></pre><p>复制代码</p><p data-type=\"paragraph\" style=\"margin-top: 0px;margin-bottom: 0px;padding: 0px;line-height: 1.875;font-size: 16px;min-height: 30px;white-space: pre-wrap;color: rgb(48, 48, 48);font-family: 'Helvetica Neue', 'PingFang SC', Verdana, 'Microsoft Yahei', 'Hiragino Sans GB', 'Microsoft Sans Serif', 'WenQuanYi Micro Hei', sans-serif;background-color: rgb(255, 255, 255)\"><br style=\";padding: 0px\"/></p><p data-type=\"paragraph\" style=\"margin-top: 0px;margin-bottom: 0px;padding: 0px;line-height: 1.875;font-size: 16px;min-height: 30px;white-space: pre-wrap;color: rgb(48, 48, 48);font-family: 'Helvetica Neue', 'PingFang SC', Verdana, 'Microsoft Yahei', 'Hiragino Sans GB', 'Microsoft Sans Serif', 'WenQuanYi Micro Hei', sans-serif;background-color: rgb(255, 255, 255)\">Pod 里的 iptables 规则会将目标地址为 10.0.x.x/24 的流量正常转发:</p><p data-type=\"paragraph\" style=\"margin-top: 0px;margin-bottom: 0px;padding: 0px;line-height: 1.875;font-size: 16px;min-height: 30px;white-space: pre-wrap;color: rgb(48, 48, 48);font-family: 'Helvetica Neue', 'PingFang SC', Verdana, 'Microsoft Yahei', 'Hiragino Sans GB', 'Microsoft Sans Serif', 'WenQuanYi Micro Hei', sans-serif;background-color: rgb(255, 255, 255)\"><br style=\";padding: 0px\"/></p><pre data-origin=\"pm_code_preview\" style=\"margin-top: 0px;margin-bottom: 0px;padding: 0px;font-family: Courier, 'Courier New', monospace\"><code data-type=\"codeline\" style=\";padding: 0px;font-family: Menlo, Monaco, 'Source Code Pro', 'Courier New', monospace;background: rgb(241, 243, 245);border: none;border-radius: 3px;display: block;line-height: 20px;height: 20px;font-size: 13px\"> # Generated by iptables-save v1.4.21 on Fri Sep 17 14:26:10 2021</code><code data-type=\"codeline\" style=\";padding: 0px;font-family: Menlo, Monaco, 'Source Code Pro', 'Courier New', monospace;background: rgb(241, 243, 245);border: none;border-radius: 3px;display: block;line-height: 20px;height: 20px;font-size: 13px\"> *nat</code><code data-type=\"codeline\" style=\";padding: 0px;font-family: Menlo, Monaco, 'Source Code Pro', 'Courier New', monospace;background: rgb(241, 243, 245);border: none;border-radius: 3px;display: block;line-height: 20px;height: 20px;font-size: 13px\"> :PREROUTING ACCEPT [131058:7863480]</code><code data-type=\"codeline\" style=\";padding: 0px;font-family: Menlo, Monaco, 'Source Code Pro', 'Courier New', monospace;background: rgb(241, 243, 245);border: none;border-radius: 3px;display: block;line-height: 20px;height: 20px;font-size: 13px\"> :INPUT ACCEPT [183446:11006760]</code><code data-type=\"codeline\" style=\";padding: 0px;font-family: Menlo, Monaco, 'Source Code Pro', 'Courier New', monospace;background: rgb(241, 243, 245);border: none;border-radius: 3px;display: block;line-height: 20px;height: 20px;font-size: 13px\"> :OUTPUT ACCEPT [53889:3286544]</code><code data-type=\"codeline\" style=\";padding: 0px;font-family: Menlo, Monaco, 'Source Code Pro', 'Courier New', monospace;background: rgb(241, 243, 245);border: none;border-radius: 3px;display: block;line-height: 20px;height: 20px;font-size: 13px\"> :POSTROUTING ACCEPT [53953:3290384]</code><code data-type=\"codeline\" style=\";padding: 0px;font-family: Menlo, Monaco, 'Source Code Pro', 'Courier New', monospace;background: rgb(241, 243, 245);border: none;border-radius: 3px;display: block;line-height: 20px;height: 20px;font-size: 13px\"> :istio_INBOUND - [0:0]</code><code data-type=\"codeline\" style=\";padding: 0px;font-family: Menlo, Monaco, 'Source Code Pro', 'Courier New', monospace;background: rgb(241, 243, 245);border: none;border-radius: 3px;display: block;line-height: 20px;height: 20px;font-size: 13px\"> :istio_IN_REDIRECT - [0:0]</code><code data-type=\"codeline\" style=\";padding: 0px;font-family: Menlo, Monaco, 'Source Code Pro', 'Courier New', monospace;background: rgb(241, 243, 245);border: none;border-radius: 3px;display: block;line-height: 20px;height: 20px;font-size: 13px\"> :istio_OUTPUT - [0:0]</code><code data-type=\"codeline\" style=\";padding: 0px;font-family: Menlo, Monaco, 'Source Code Pro', 'Courier New', monospace;background: rgb(241, 243, 245);border: none;border-radius: 3px;display: block;line-height: 20px;height: 20px;font-size: 13px\"> :istio_REDIRECT - [0:0]</code><code data-type=\"codeline\" style=\";padding: 0px;font-family: Menlo, Monaco, 'Source Code Pro', 'Courier New', monospace;background: rgb(241, 243, 245);border: none;border-radius: 3px;display: block;line-height: 20px;height: 20px;font-size: 13px\"> -A PREROUTING -p tcp -j istio_INBOUND</code><code data-type=\"codeline\" style=\";padding: 0px;font-family: Menlo, Monaco, 'Source Code Pro', 'Courier New', monospace;background: rgb(241, 243, 245);border: none;border-radius: 3px;display: block;line-height: 20px;height: 20px;font-size: 13px\"> -A OUTPUT -p tcp -j istio_OUTPUT</code><code data-type=\"codeline\" style=\";padding: 0px;font-family: Menlo, Monaco, 'Source Code Pro', 'Courier New', monospace;background: rgb(241, 243, 245);border: none;border-radius: 3px;display: block;line-height: 20px;height: 20px;font-size: 13px\"> -A istio_INBOUND -p tcp -m tcp --dport 22 -j RETURN</code><code data-type=\"codeline\" style=\";padding: 0px;font-family: Menlo, Monaco, 'Source Code Pro', 'Courier New', monospace;background: rgb(241, 243, 245);border: none;border-radius: 3px;display: block;line-height: 20px;height: 20px;font-size: 13px\"> -A istio_INBOUND -p tcp -m tcp --dport 15020 -j RETURN</code><code data-type=\"codeline\" style=\";padding: 0px;font-family: Menlo, Monaco, 'Source Code Pro', 'Courier New', monospace;background: rgb(241, 243, 245);border: none;border-radius: 3px;display: block;line-height: 20px;height: 20px;font-size: 13px\"> -A istio_INBOUND -p tcp -j istio_IN_REDIRECT</code><code data-type=\"codeline\" style=\";padding: 0px;font-family: Menlo, Monaco, 'Source Code Pro', 'Courier New', monospace;background: rgb(241, 243, 245);border: none;border-radius: 3px;display: block;line-height: 20px;height: 20px;font-size: 13px\"> -A istio_IN_REDIRECT -p tcp -j REDIRECT --to-ports 15006</code><code data-type=\"codeline\" style=\";padding: 0px;font-family: Menlo, Monaco, 'Source Code Pro', 'Courier New', monospace;background: rgb(241, 243, 245);border: none;border-radius: 3px;display: block;line-height: 20px;height: 20px;font-size: 13px\"> -A istio_OUTPUT -s 127.0.0.6/32 -o lo -j RETURN</code><code data-type=\"codeline\" style=\";padding: 0px;font-family: Menlo, Monaco, 'Source Code Pro', 'Courier New', monospace;background: rgb(241, 243, 245);border: none;border-radius: 3px;display: block;line-height: 20px;height: 20px;font-size: 13px\"> -A istio_OUTPUT ! -d 127.0.0.1/32 -o lo -j istio_IN_REDIRECT</code><code data-type=\"codeline\" style=\";padding: 0px;font-family: Menlo, Monaco, 'Source Code Pro', 'Courier New', monospace;background: rgb(241, 243, 245);border: none;border-radius: 3px;display: block;line-height: 20px;height: 20px;font-size: 13px\"> -A istio_OUTPUT -m owner --uid-owner 1337 -j RETURN</code><code data-type=\"codeline\" style=\";padding: 0px;font-family: Menlo, Monaco, 'Source Code Pro', 'Courier New', monospace;background: rgb(241, 243, 245);border: none;border-radius: 3px;display: block;line-height: 20px;height: 20px;font-size: 13px\"> -A istio_OUTPUT -m owner --gid-owner 1337 -j RETURN</code><code data-type=\"codeline\" style=\";padding: 0px;font-family: Menlo, Monaco, 'Source Code Pro', 'Courier New', monospace;background: rgb(241, 243, 245);border: none;border-radius: 3px;display: block;line-height: 20px;height: 20px;font-size: 13px\"> -A istio_OUTPUT -d 127.0.0.1/32 -j RETURN</code><code data-type=\"codeline\" style=\";padding: 0px;font-family: Menlo, Monaco, 'Source Code Pro', 'Courier New', monospace;background: rgb(241, 243, 245);border: none;border-radius: 3px;display: block;line-height: 20px;height: 20px;font-size: 13px\"> -A istio_OUTPUT -d 10.0.0.0/24 -j RETURN</code><code data-type=\"codeline\" style=\";padding: 0px;font-family: Menlo, Monaco, 'Source Code Pro', 'Courier New', monospace;background: rgb(241, 243, 245);border: none;border-radius: 3px;display: block;line-height: 20px;height: 20px;font-size: 13px\"> -A istio_OUTPUT -j istio_REDIRECT</code><code data-type=\"codeline\" style=\";padding: 0px;font-family: Menlo, Monaco, 'Source Code Pro', 'Courier New', monospace;background: rgb(241, 243, 245);border: none;border-radius: 3px;display: block;line-height: 20px;height: 20px;font-size: 13px\"> -A istio_REDIRECT -p tcp -j REDIRECT --to-ports 15001</code><code data-type=\"codeline\" style=\";padding: 0px;font-family: Menlo, Monaco, 'Source Code Pro', 'Courier New', monospace;background: rgb(241, 243, 245);border: none;border-radius: 3px;display: block;line-height: 20px;height: 20px;font-size: 13px\"> COMMIT</code><code data-type=\"codeline\" style=\";padding: 0px;font-family: Menlo, Monaco, 'Source Code Pro', 'Courier New', monospace;background: rgb(241, 243, 245);border: none;border-radius: 3px;display: block;line-height: 20px;height: 20px;font-size: 13px\"> # Completed on Fri Sep 17 14:26:10 2021</code><code data-type=\"codeline\" style=\";padding: 0px;font-family: Menlo, Monaco, 'Source Code Pro', 'Courier New', monospace;background: rgb(241, 243, 245);border: none;border-radius: 3px;display: block;line-height: 20px;height: 20px;font-size: 13px\"><br style=\";padding: 0px\"/></code></pre><p>复制代码</p><h2 data-id=\"heading12\" data-type=\"heading\" top=\"14905\" style=\";padding: 26px 0px 4px;font-size: 28px;line-height: 44px;color: rgb(53, 53, 53);white-space: pre-wrap;font-family: 'Helvetica Neue', 'PingFang SC', Verdana, 'Microsoft Yahei', 'Hiragino Sans GB', 'Microsoft Sans Serif', 'WenQuanYi Micro Hei', sans-serif;background-color: rgb(255, 255, 255)\">方法 3:用 Service 打败 Service</h2><p data-type=\"paragraph\" style=\"margin-top: 0px;margin-bottom: 0px;padding: 0px;line-height: 1.875;font-size: 16px;min-height: 30px;white-space: pre-wrap;color: rgb(48, 48, 48);font-family: 'Helvetica Neue', 'PingFang SC', Verdana, 'Microsoft Yahei', 'Hiragino Sans GB', 'Microsoft Sans Serif', 'WenQuanYi Micro Hei', sans-serif;background-color: rgb(255, 255, 255)\">这个方法基于 istio 会为集群中的 svc 自动生成 listener 的工作方式,手动在集群中为外部服务创建 service 和 endpoints:</p><p data-type=\"paragraph\" style=\"margin-top: 0px;margin-bottom: 0px;padding: 0px;line-height: 1.875;font-size: 16px;min-height: 30px;white-space: pre-wrap;color: rgb(48, 48, 48);font-family: 'Helvetica Neue', 'PingFang SC', Verdana, 'Microsoft Yahei', 'Hiragino Sans GB', 'Microsoft Sans Serif', 'WenQuanYi Micro Hei', sans-serif;background-color: rgb(255, 255, 255)\"><br style=\";padding: 0px\"/></p><pre data-origin=\"pm_code_preview\" style=\"margin-top: 0px;margin-bottom: 0px;padding: 0px;font-family: Courier, 'Courier New', monospace\"><code data-type=\"codeline\" style=\";padding: 0px;font-family: Menlo, Monaco, 'Source Code Pro', 'Courier New', monospace;background: rgb(241, 243, 245);border: none;border-radius: 3px;display: block;line-height: 20px;height: 20px;font-size: 13px\"> apiVersion: v1</code><code data-type=\"codeline\" style=\";padding: 0px;font-family: Menlo, Monaco, 'Source Code Pro', 'Courier New', monospace;background: rgb(241, 243, 245);border: none;border-radius: 3px;display: block;line-height: 20px;height: 20px;font-size: 13px\"> kind: Endpoints</code><code data-type=\"codeline\" style=\";padding: 0px;font-family: Menlo, Monaco, 'Source Code Pro', 'Courier New', monospace;background: rgb(241, 243, 245);border: none;border-radius: 3px;display: block;line-height: 20px;height: 20px;font-size: 13px\"> metadata:</code><code data-type=\"codeline\" style=\";padding: 0px;font-family: Menlo, Monaco, 'Source Code Pro', 'Courier New', monospace;background: rgb(241, 243, 245);border: none;border-radius: 3px;display: block;line-height: 20px;height: 20px;font-size: 13px\"> name: rediscluster</code><code data-type=\"codeline\" style=\";padding: 0px;font-family: Menlo, Monaco, 'Source Code Pro', 'Courier New', monospace;background: rgb(241, 243, 245);border: none;border-radius: 3px;display: block;line-height: 20px;height: 20px;font-size: 13px\"> labels:</code><code data-type=\"codeline\" style=\";padding: 0px;font-family: Menlo, Monaco, 'Source Code Pro', 'Courier New', monospace;background: rgb(241, 243, 245);border: none;border-radius: 3px;display: block;line-height: 20px;height: 20px;font-size: 13px\"> name: rediscluster</code><code data-type=\"codeline\" style=\";padding: 0px;font-family: Menlo, Monaco, 'Source Code Pro', 'Courier New', monospace;background: rgb(241, 243, 245);border: none;border-radius: 3px;display: block;line-height: 20px;height: 20px;font-size: 13px\"> app: redis-jf</code><code data-type=\"codeline\" style=\";padding: 0px;font-family: Menlo, Monaco, 'Source Code Pro', 'Courier New', monospace;background: rgb(241, 243, 245);border: none;border-radius: 3px;display: block;line-height: 20px;height: 20px;font-size: 13px\"> user: jf</code><code data-type=\"codeline\" style=\";padding: 0px;font-family: Menlo, Monaco, 'Source Code Pro', 'Courier New', monospace;background: rgb(241, 243, 245);border: none;border-radius: 3px;display: block;line-height: 20px;height: 20px;font-size: 13px\"> namespace: dev-self</code><code data-type=\"codeline\" style=\";padding: 0px;font-family: Menlo, Monaco, 'Source Code Pro', 'Courier New', monospace;background: rgb(241, 243, 245);border: none;border-radius: 3px;display: block;line-height: 20px;height: 20px;font-size: 13px\"> subsets:</code><code data-type=\"codeline\" style=\";padding: 0px;font-family: Menlo, Monaco, 'Source Code Pro', 'Courier New', monospace;background: rgb(241, 243, 245);border: none;border-radius: 3px;display: block;line-height: 20px;height: 20px;font-size: 13px\"> - addresses:</code><code data-type=\"codeline\" style=\";padding: 0px;font-family: Menlo, Monaco, 'Source Code Pro', 'Courier New', monospace;background: rgb(241, 243, 245);border: none;border-radius: 3px;display: block;line-height: 20px;height: 20px;font-size: 13px\"> - ip: 10.0.x.x</code><code data-type=\"codeline\" style=\";padding: 0px;font-family: Menlo, Monaco, 'Source Code Pro', 'Courier New', monospace;background: rgb(241, 243, 245);border: none;border-radius: 3px;display: block;line-height: 20px;height: 20px;font-size: 13px\"> - ip: 10.0.x.x</code><code data-type=\"codeline\" style=\";padding: 0px;font-family: Menlo, Monaco, 'Source Code Pro', 'Courier New', monospace;background: rgb(241, 243, 245);border: none;border-radius: 3px;display: block;line-height: 20px;height: 20px;font-size: 13px\"> - ip: 10.0.x.x</code><code data-type=\"codeline\" style=\";padding: 0px;font-family: Menlo, Monaco, 'Source Code Pro', 'Courier New', monospace;background: rgb(241, 243, 245);border: none;border-radius: 3px;display: block;line-height: 20px;height: 20px;font-size: 13px\"> ports:</code><code data-type=\"codeline\" style=\";padding: 0px;font-family: Menlo, Monaco, 'Source Code Pro', 'Courier New', monospace;background: rgb(241, 243, 245);border: none;border-radius: 3px;display: block;line-height: 20px;height: 20px;font-size: 13px\"> - name: tcp-7000</code><code data-type=\"codeline\" style=\";padding: 0px;font-family: Menlo, Monaco, 'Source Code Pro', 'Courier New', monospace;background: rgb(241, 243, 245);border: none;border-radius: 3px;display: block;line-height: 20px;height: 20px;font-size: 13px\"> port: 7000</code><code data-type=\"codeline\" style=\";padding: 0px;font-family: Menlo, Monaco, 'Source Code Pro', 'Courier New', monospace;background: rgb(241, 243, 245);border: none;border-radius: 3px;display: block;line-height: 20px;height: 20px;font-size: 13px\"> - name: tcp-7001</code><code data-type=\"codeline\" style=\";padding: 0px;font-family: Menlo, Monaco, 'Source Code Pro', 'Courier New', monospace;background: rgb(241, 243, 245);border: none;border-radius: 3px;display: block;line-height: 20px;height: 20px;font-size: 13px\"> port: 7001</code><code data-type=\"codeline\" style=\";padding: 0px;font-family: Menlo, Monaco, 'Source Code Pro', 'Courier New', monospace;background: rgb(241, 243, 245);border: none;border-radius: 3px;display: block;line-height: 20px;height: 20px;font-size: 13px\"> - name: tcp-7002</code><code data-type=\"codeline\" style=\";padding: 0px;font-family: Menlo, Monaco, 'Source Code Pro', 'Courier New', monospace;background: rgb(241, 243, 245);border: none;border-radius: 3px;display: block;line-height: 20px;height: 20px;font-size: 13px\"> port: 7002</code><code data-type=\"codeline\" style=\";padding: 0px;font-family: Menlo, Monaco, 'Source Code Pro', 'Courier New', monospace;background: rgb(241, 243, 245);border: none;border-radius: 3px;display: block;line-height: 20px;height: 20px;font-size: 13px\"> - name: tcp-7003</code><code data-type=\"codeline\" style=\";padding: 0px;font-family: Menlo, Monaco, 'Source Code Pro', 'Courier New', monospace;background: rgb(241, 243, 245);border: none;border-radius: 3px;display: block;line-height: 20px;height: 20px;font-size: 13px\"> port: 7003</code><code data-type=\"codeline\" style=\";padding: 0px;font-family: Menlo, Monaco, 'Source Code Pro', 'Courier New', monospace;background: rgb(241, 243, 245);border: none;border-radius: 3px;display: block;line-height: 20px;height: 20px;font-size: 13px\"> ---</code><code data-type=\"codeline\" style=\";padding: 0px;font-family: Menlo, Monaco, 'Source Code Pro', 'Courier New', monospace;background: rgb(241, 243, 245);border: none;border-radius: 3px;display: block;line-height: 20px;height: 20px;font-size: 13px\"> apiVersion: v1</code><code data-type=\"codeline\" style=\";padding: 0px;font-family: Menlo, Monaco, 'Source Code Pro', 'Courier New', monospace;background: rgb(241, 243, 245);border: none;border-radius: 3px;display: block;line-height: 20px;height: 20px;font-size: 13px\"> kind: Service</code><code data-type=\"codeline\" style=\";padding: 0px;font-family: Menlo, Monaco, 'Source Code Pro', 'Courier New', monospace;background: rgb(241, 243, 245);border: none;border-radius: 3px;display: block;line-height: 20px;height: 20px;font-size: 13px\"> metadata:</code><code data-type=\"codeline\" style=\";padding: 0px;font-family: Menlo, Monaco, 'Source Code Pro', 'Courier New', monospace;background: rgb(241, 243, 245);border: none;border-radius: 3px;display: block;line-height: 20px;height: 20px;font-size: 13px\"> name: rediscluster</code><code data-type=\"codeline\" style=\";padding: 0px;font-family: Menlo, Monaco, 'Source Code Pro', 'Courier New', monospace;background: rgb(241, 243, 245);border: none;border-radius: 3px;display: block;line-height: 20px;height: 20px;font-size: 13px\"> namespace: dev-self</code><code data-type=\"codeline\" style=\";padding: 0px;font-family: Menlo, Monaco, 'Source Code Pro', 'Courier New', monospace;background: rgb(241, 243, 245);border: none;border-radius: 3px;display: block;line-height: 20px;height: 20px;font-size: 13px\"> spec:</code><code data-type=\"codeline\" style=\";padding: 0px;font-family: Menlo, Monaco, 'Source Code Pro', 'Courier New', monospace;background: rgb(241, 243, 245);border: none;border-radius: 3px;display: block;line-height: 20px;height: 20px;font-size: 13px\"> ports:</code><code data-type=\"codeline\" style=\";padding: 0px;font-family: Menlo, Monaco, 'Source Code Pro', 'Courier New', monospace;background: rgb(241, 243, 245);border: none;border-radius: 3px;display: block;line-height: 20px;height: 20px;font-size: 13px\"> - name: tcp-7000</code><code data-type=\"codeline\" style=\";padding: 0px;font-family: Menlo, Monaco, 'Source Code Pro', 'Courier New', monospace;background: rgb(241, 243, 245);border: none;border-radius: 3px;display: block;line-height: 20px;height: 20px;font-size: 13px\"> protocol: TCP</code><code data-type=\"codeline\" style=\";padding: 0px;font-family: Menlo, Monaco, 'Source Code Pro', 'Courier New', monospace;background: rgb(241, 243, 245);border: none;border-radius: 3px;display: block;line-height: 20px;height: 20px;font-size: 13px\"> port: 7000</code><code data-type=\"codeline\" style=\";padding: 0px;font-family: Menlo, Monaco, 'Source Code Pro', 'Courier New', monospace;background: rgb(241, 243, 245);border: none;border-radius: 3px;display: block;line-height: 20px;height: 20px;font-size: 13px\"> targetPort: 7000</code><code data-type=\"codeline\" style=\";padding: 0px;font-family: Menlo, Monaco, 'Source Code Pro', 'Courier New', monospace;background: rgb(241, 243, 245);border: none;border-radius: 3px;display: block;line-height: 20px;height: 20px;font-size: 13px\"> - name: tcp-7001</code><code data-type=\"codeline\" style=\";padding: 0px;font-family: Menlo, Monaco, 'Source Code Pro', 'Courier New', monospace;background: rgb(241, 243, 245);border: none;border-radius: 3px;display: block;line-height: 20px;height: 20px;font-size: 13px\"> protocol: TCP</code><code data-type=\"codeline\" style=\";padding: 0px;font-family: Menlo, Monaco, 'Source Code Pro', 'Courier New', monospace;background: rgb(241, 243, 245);border: none;border-radius: 3px;display: block;line-height: 20px;height: 20px;font-size: 13px\"> port: 7001</code><code data-type=\"codeline\" style=\";padding: 0px;font-family: Menlo, Monaco, 'Source Code Pro', 'Courier New', monospace;background: rgb(241, 243, 245);border: none;border-radius: 3px;display: block;line-height: 20px;height: 20px;font-size: 13px\"> targetPort: 7001</code><code data-type=\"codeline\" style=\";padding: 0px;font-family: Menlo, Monaco, 'Source Code Pro', 'Courier New', monospace;background: rgb(241, 243, 245);border: none;border-radius: 3px;display: block;line-height: 20px;height: 20px;font-size: 13px\"> - name: tcp-7002</code><code data-type=\"codeline\" style=\";padding: 0px;font-family: Menlo, Monaco, 'Source Code Pro', 'Courier New', monospace;background: rgb(241, 243, 245);border: none;border-radius: 3px;display: block;line-height: 20px;height: 20px;font-size: 13px\"> protocol: TCP</code><code data-type=\"codeline\" style=\";padding: 0px;font-family: Menlo, Monaco, 'Source Code Pro', 'Courier New', monospace;background: rgb(241, 243, 245);border: none;border-radius: 3px;display: block;line-height: 20px;height: 20px;font-size: 13px\"> port: 7002</code><code data-type=\"codeline\" style=\";padding: 0px;font-family: Menlo, Monaco, 'Source Code Pro', 'Courier New', monospace;background: rgb(241, 243, 245);border: none;border-radius: 3px;display: block;line-height: 20px;height: 20px;font-size: 13px\"> targetPort: 7002</code><code data-type=\"codeline\" style=\";padding: 0px;font-family: Menlo, Monaco, 'Source Code Pro', 'Courier New', monospace;background: rgb(241, 243, 245);border: none;border-radius: 3px;display: block;line-height: 20px;height: 20px;font-size: 13px\"> - name: tcp-7003</code><code data-type=\"codeline\" style=\";padding: 0px;font-family: Menlo, Monaco, 'Source Code Pro', 'Courier New', monospace;background: rgb(241, 243, 245);border: none;border-radius: 3px;display: block;line-height: 20px;height: 20px;font-size: 13px\"> protocol: TCP</code><code data-type=\"codeline\" style=\";padding: 0px;font-family: Menlo, Monaco, 'Source Code Pro', 'Courier New', monospace;background: rgb(241, 243, 245);border: none;border-radius: 3px;display: block;line-height: 20px;height: 20px;font-size: 13px\"> port: 7003</code><code data-type=\"codeline\" style=\";padding: 0px;font-family: Menlo, Monaco, 'Source Code Pro', 'Courier New', monospace;background: rgb(241, 243, 245);border: none;border-radius: 3px;display: block;line-height: 20px;height: 20px;font-size: 13px\"> targetPort: 7003</code><code data-type=\"codeline\" style=\";padding: 0px;font-family: Menlo, Monaco, 'Source Code Pro', 'Courier New', monospace;background: rgb(241, 243, 245);border: none;border-radius: 3px;display: block;line-height: 20px;height: 20px;font-size: 13px\"> selector:</code><code data-type=\"codeline\" style=\";padding: 0px;font-family: Menlo, Monaco, 'Source Code Pro', 'Courier New', monospace;background: rgb(241, 243, 245);border: none;border-radius: 3px;display: block;line-height: 20px;height: 20px;font-size: 13px\"> name: rediscluster</code><code data-type=\"codeline\" style=\";padding: 0px;font-family: Menlo, Monaco, 'Source Code Pro', 'Courier New', monospace;background: rgb(241, 243, 245);border: none;border-radius: 3px;display: block;line-height: 20px;height: 20px;font-size: 13px\"> app: redis-jf</code><code data-type=\"codeline\" style=\";padding: 0px;font-family: Menlo, Monaco, 'Source Code Pro', 'Courier New', monospace;background: rgb(241, 243, 245);border: none;border-radius: 3px;display: block;line-height: 20px;height: 20px;font-size: 13px\"> user: jf</code><code data-type=\"codeline\" style=\";padding: 0px;font-family: Menlo, Monaco, 'Source Code Pro', 'Courier New', monospace;background: rgb(241, 243, 245);border: none;border-radius: 3px;display: block;line-height: 20px;height: 20px;font-size: 13px\"><br style=\";padding: 0px\"/></code></pre><p>复制代码</p><p data-type=\"paragraph\" style=\"margin-top: 0px;margin-bottom: 0px;padding: 0px;line-height: 1.875;font-size: 16px;min-height: 30px;white-space: pre-wrap;color: rgb(48, 48, 48);font-family: 'Helvetica Neue', 'PingFang SC', Verdana, 'Microsoft Yahei', 'Hiragino Sans GB', 'Microsoft Sans Serif', 'WenQuanYi Micro Hei', sans-serif;background-color: rgb(255, 255, 255)\"><br style=\";padding: 0px\"/></p><p data-type=\"paragraph\" style=\"margin-top: 0px;margin-bottom: 0px;padding: 0px;line-height: 1.875;font-size: 16px;min-height: 30px;white-space: pre-wrap;color: rgb(48, 48, 48);font-family: 'Helvetica Neue', 'PingFang SC', Verdana, 'Microsoft Yahei', 'Hiragino Sans GB', 'Microsoft Sans Serif', 'WenQuanYi Micro Hei', sans-serif;background-color: rgb(255, 255, 255)\">应用以上配置后 istio 会自动生成一个 service_ip+port 的 listener。Service 信息如下:</p><p data-type=\"paragraph\" style=\"margin-top: 0px;margin-bottom: 0px;padding: 0px;line-height: 1.875;font-size: 16px;min-height: 30px;white-space: pre-wrap;color: rgb(48, 48, 48);font-family: 'Helvetica Neue', 'PingFang SC', Verdana, 'Microsoft Yahei', 'Hiragino Sans GB', 'Microsoft Sans Serif', 'WenQuanYi Micro Hei', sans-serif;background-color: rgb(255, 255, 255)\"><br style=\";padding: 0px\"/></p><pre data-origin=\"pm_code_preview\" style=\"margin-top: 0px;margin-bottom: 0px;padding: 0px;font-family: Courier, 'Courier New', monospace\"><code data-type=\"codeline\" style=\";padding: 0px;font-family: Menlo, Monaco, 'Source Code Pro', 'Courier New', monospace;background: rgb(241, 243, 245);border: none;border-radius: 3px;display: block;line-height: 20px;height: 20px;font-size: 13px\"> Selector: app=redis-jf,name=rediscluster,user=jf</code><code data-type=\"codeline\" style=\";padding: 0px;font-family: Menlo, Monaco, 'Source Code Pro', 'Courier New', monospace;background: rgb(241, 243, 245);border: none;border-radius: 3px;display: block;line-height: 20px;height: 20px;font-size: 13px\"> Type: ClusterIP</code><code data-type=\"codeline\" style=\";padding: 0px;font-family: Menlo, Monaco, 'Source Code Pro', 'Courier New', monospace;background: rgb(241, 243, 245);border: none;border-radius: 3px;display: block;line-height: 20px;height: 20px;font-size: 13px\"> IP: 10.233.40.115</code><code data-type=\"codeline\" style=\";padding: 0px;font-family: Menlo, Monaco, 'Source Code Pro', 'Courier New', monospace;background: rgb(241, 243, 245);border: none;border-radius: 3px;display: block;line-height: 20px;height: 20px;font-size: 13px\"> Port: tcp-7000 7000/TCP</code><code data-type=\"codeline\" style=\";padding: 0px;font-family: Menlo, Monaco, 'Source Code Pro', 'Courier New', monospace;background: rgb(241, 243, 245);border: none;border-radius: 3px;display: block;line-height: 20px;height: 20px;font-size: 13px\"> TargetPort: 7000/TCP</code><code data-type=\"codeline\" style=\";padding: 0px;font-family: Menlo, Monaco, 'Source Code Pro', 'Courier New', monospace;background: rgb(241, 243, 245);border: none;border-radius: 3px;display: block;line-height: 20px;height: 20px;font-size: 13px\"> Endpoints: <none></code><code data-type=\"codeline\" style=\";padding: 0px;font-family: Menlo, Monaco, 'Source Code Pro', 'Courier New', monospace;background: rgb(241, 243, 245);border: none;border-radius: 3px;display: block;line-height: 20px;height: 20px;font-size: 13px\"> Port: tcp-7001 7001/TCP</code><code data-type=\"codeline\" style=\";padding: 0px;font-family: Menlo, Monaco, 'Source Code Pro', 'Courier New', monospace;background: rgb(241, 243, 245);border: none;border-radius: 3px;display: block;line-height: 20px;height: 20px;font-size: 13px\"> TargetPort: 7001/TCP</code><code data-type=\"codeline\" style=\";padding: 0px;font-family: Menlo, Monaco, 'Source Code Pro', 'Courier New', monospace;background: rgb(241, 243, 245);border: none;border-radius: 3px;display: block;line-height: 20px;height: 20px;font-size: 13px\"> Endpoints: <none></code><code data-type=\"codeline\" style=\";padding: 0px;font-family: Menlo, Monaco, 'Source Code Pro', 'Courier New', monospace;background: rgb(241, 243, 245);border: none;border-radius: 3px;display: block;line-height: 20px;height: 20px;font-size: 13px\"> Port: tcp-7002 7002/TCP</code><code data-type=\"codeline\" style=\";padding: 0px;font-family: Menlo, Monaco, 'Source Code Pro', 'Courier New', monospace;background: rgb(241, 243, 245);border: none;border-radius: 3px;display: block;line-height: 20px;height: 20px;font-size: 13px\"> TargetPort: 7002/TCP</code><code data-type=\"codeline\" style=\";padding: 0px;font-family: Menlo, Monaco, 'Source Code Pro', 'Courier New', monospace;background: rgb(241, 243, 245);border: none;border-radius: 3px;display: block;line-height: 20px;height: 20px;font-size: 13px\"> Endpoints: <none></code><code data-type=\"codeline\" style=\";padding: 0px;font-family: Menlo, Monaco, 'Source Code Pro', 'Courier New', monospace;background: rgb(241, 243, 245);border: none;border-radius: 3px;display: block;line-height: 20px;height: 20px;font-size: 13px\"> Port: tcp-7003 7003/TCP</code><code data-type=\"codeline\" style=\";padding: 0px;font-family: Menlo, Monaco, 'Source Code Pro', 'Courier New', monospace;background: rgb(241, 243, 245);border: none;border-radius: 3px;display: block;line-height: 20px;height: 20px;font-size: 13px\"> TargetPort: 7003/TCP</code><code data-type=\"codeline\" style=\";padding: 0px;font-family: Menlo, Monaco, 'Source Code Pro', 'Courier New', monospace;background: rgb(241, 243, 245);border: none;border-radius: 3px;display: block;line-height: 20px;height: 20px;font-size: 13px\"> Endpoints: <none></code><code data-type=\"codeline\" style=\";padding: 0px;font-family: Menlo, Monaco, 'Source Code Pro', 'Courier New', monospace;background: rgb(241, 243, 245);border: none;border-radius: 3px;display: block;line-height: 20px;height: 20px;font-size: 13px\"> Session Affinity: None</code><code data-type=\"codeline\" style=\";padding: 0px;font-family: Menlo, Monaco, 'Source Code Pro', 'Courier New', monospace;background: rgb(241, 243, 245);border: none;border-radius: 3px;display: block;line-height: 20px;height: 20px;font-size: 13px\"> Events: <none></code><code data-type=\"codeline\" style=\";padding: 0px;font-family: Menlo, Monaco, 'Source Code Pro', 'Courier New', monospace;background: rgb(241, 243, 245);border: none;border-radius: 3px;display: block;line-height: 20px;height: 20px;font-size: 13px\"><br style=\";padding: 0px\"/></code></pre><p>复制代码</p><p data-type=\"paragraph\" style=\"margin-top: 0px;margin-bottom: 0px;padding: 0px;line-height: 1.875;font-size: 16px;min-height: 30px;white-space: pre-wrap;color: rgb(48, 48, 48);font-family: 'Helvetica Neue', 'PingFang SC', Verdana, 'Microsoft Yahei', 'Hiragino Sans GB', 'Microsoft Sans Serif', 'WenQuanYi Micro Hei', sans-serif;background-color: rgb(255, 255, 255)\"><br style=\";padding: 0px\"/></p><p data-type=\"paragraph\" style=\"margin-top: 0px;margin-bottom: 0px;padding: 0px;line-height: 1.875;font-size: 16px;min-height: 30px;white-space: pre-wrap;color: rgb(48, 48, 48);font-family: 'Helvetica Neue', 'PingFang SC', Verdana, 'Microsoft Yahei', 'Hiragino Sans GB', 'Microsoft Sans Serif', 'WenQuanYi Micro Hei', sans-serif;background-color: rgb(255, 255, 255)\">Listener 部分信息如下:</p><p data-type=\"paragraph\" style=\"margin-top: 0px;margin-bottom: 0px;padding: 0px;line-height: 1.875;font-size: 16px;min-height: 30px;white-space: pre-wrap;color: rgb(48, 48, 48);font-family: 'Helvetica Neue', 'PingFang SC', Verdana, 'Microsoft Yahei', 'Hiragino Sans GB', 'Microsoft Sans Serif', 'WenQuanYi Micro Hei', sans-serif;background-color: rgb(255, 255, 255)\"><br style=\";padding: 0px\"/></p><pre data-origin=\"pm_code_preview\" style=\"margin-top: 0px;margin-bottom: 0px;padding: 0px;font-family: Courier, 'Courier New', monospace\"><code data-type=\"codeline\" style=\";padding: 0px;font-family: Menlo, Monaco, 'Source Code Pro', 'Courier New', monospace;background: rgb(241, 243, 245);border: none;border-radius: 3px;display: block;line-height: 20px;height: 20px;font-size: 13px\"> {</code><code data-type=\"codeline\" style=\";padding: 0px;font-family: Menlo, Monaco, 'Source Code Pro', 'Courier New', monospace;background: rgb(241, 243, 245);border: none;border-radius: 3px;display: block;line-height: 20px;height: 20px;font-size: 13px\"> "name": "10.233.59.159_7000",</code><code data-type=\"codeline\" style=\";padding: 0px;font-family: Menlo, Monaco, 'Source Code Pro', 'Courier New', monospace;background: rgb(241, 243, 245);border: none;border-radius: 3px;display: block;line-height: 20px;height: 20px;font-size: 13px\"> "address": {</code><code data-type=\"codeline\" style=\";padding: 0px;font-family: Menlo, Monaco, 'Source Code Pro', 'Courier New', monospace;background: rgb(241, 243, 245);border: none;border-radius: 3px;display: block;line-height: 20px;height: 20px;font-size: 13px\"> "socketAddress": {</code><code data-type=\"codeline\" style=\";padding: 0px;font-family: Menlo, Monaco, 'Source Code Pro', 'Courier New', monospace;background: rgb(241, 243, 245);border: none;border-radius: 3px;display: block;line-height: 20px;height: 20px;font-size: 13px\"> "address": "10.233.59.159",</code><code data-type=\"codeline\" style=\";padding: 0px;font-family: Menlo, Monaco, 'Source Code Pro', 'Courier New', monospace;background: rgb(241, 243, 245);border: none;border-radius: 3px;display: block;line-height: 20px;height: 20px;font-size: 13px\"> "portValue": 7000</code><code data-type=\"codeline\" style=\";padding: 0px;font-family: Menlo, Monaco, 'Source Code Pro', 'Courier New', monospace;background: rgb(241, 243, 245);border: none;border-radius: 3px;display: block;line-height: 20px;height: 20px;font-size: 13px\"> }</code><code data-type=\"codeline\" style=\";padding: 0px;font-family: Menlo, Monaco, 'Source Code Pro', 'Courier New', monospace;background: rgb(241, 243, 245);border: none;border-radius: 3px;display: block;line-height: 20px;height: 20px;font-size: 13px\"> },</code><code data-type=\"codeline\" style=\";padding: 0px;font-family: Menlo, Monaco, 'Source Code Pro', 'Courier New', monospace;background: rgb(241, 243, 245);border: none;border-radius: 3px;display: block;line-height: 20px;height: 20px;font-size: 13px\"> "filterChains": [</code><code data-type=\"codeline\" style=\";padding: 0px;font-family: Menlo, Monaco, 'Source Code Pro', 'Courier New', monospace;background: rgb(241, 243, 245);border: none;border-radius: 3px;display: block;line-height: 20px;height: 20px;font-size: 13px\"> {</code><code data-type=\"codeline\" style=\";padding: 0px;font-family: Menlo, Monaco, 'Source Code Pro', 'Courier New', monospace;background: rgb(241, 243, 245);border: none;border-radius: 3px;display: block;line-height: 20px;height: 20px;font-size: 13px\"> "filters": [</code><code data-type=\"codeline\" style=\";padding: 0px;font-family: Menlo, Monaco, 'Source Code Pro', 'Courier New', monospace;background: rgb(241, 243, 245);border: none;border-radius: 3px;display: block;line-height: 20px;height: 20px;font-size: 13px\"> {</code><code data-type=\"codeline\" style=\";padding: 0px;font-family: Menlo, Monaco, 'Source Code Pro', 'Courier New', monospace;background: rgb(241, 243, 245);border: none;border-radius: 3px;display: block;line-height: 20px;height: 20px;font-size: 13px\"> "name": "mixer",</code><code data-type=\"codeline\" style=\";padding: 0px;font-family: Menlo, Monaco, 'Source Code Pro', 'Courier New', monospace;background: rgb(241, 243, 245);border: none;border-radius: 3px;display: block;line-height: 20px;height: 20px;font-size: 13px\"> "typedConfig": {</code><code data-type=\"codeline\" style=\";padding: 0px;font-family: Menlo, Monaco, 'Source Code Pro', 'Courier New', monospace;background: rgb(241, 243, 245);border: none;border-radius: 3px;display: block;line-height: 20px;height: 20px;font-size: 13px\"> "@type": "type.googleapis.com/istio.mixer.v1.config.client.TcpClientConfig",</code><code data-type=\"codeline\" style=\";padding: 0px;font-family: Menlo, Monaco, 'Source Code Pro', 'Courier New', monospace;background: rgb(241, 243, 245);border: none;border-radius: 3px;display: block;line-height: 20px;height: 20px;font-size: 13px\"> "transport": {</code><code data-type=\"codeline\" style=\";padding: 0px;font-family: Menlo, Monaco, 'Source Code Pro', 'Courier New', monospace;background: rgb(241, 243, 245);border: none;border-radius: 3px;display: block;line-height: 20px;height: 20px;font-size: 13px\"> "networkFailPolicy": {</code><code data-type=\"codeline\" style=\";padding: 0px;font-family: Menlo, Monaco, 'Source Code Pro', 'Courier New', monospace;background: rgb(241, 243, 245);border: none;border-radius: 3px;display: block;line-height: 20px;height: 20px;font-size: 13px\"> "policy": "FAIL_CLOSE",</code><code data-type=\"codeline\" style=\";padding: 0px;font-family: Menlo, Monaco, 'Source Code Pro', 'Courier New', monospace;background: rgb(241, 243, 245);border: none;border-radius: 3px;display: block;line-height: 20px;height: 20px;font-size: 13px\"> "baseRetryWait": "0.080s",</code><code data-type=\"codeline\" style=\";padding: 0px;font-family: Menlo, Monaco, 'Source Code Pro', 'Courier New', monospace;background: rgb(241, 243, 245);border: none;border-radius: 3px;display: block;line-height: 20px;height: 20px;font-size: 13px\"> "maxRetryWait": "1s"</code><code data-type=\"codeline\" style=\";padding: 0px;font-family: Menlo, Monaco, 'Source Code Pro', 'Courier New', monospace;background: rgb(241, 243, 245);border: none;border-radius: 3px;display: block;line-height: 20px;height: 20px;font-size: 13px\"> },</code><code data-type=\"codeline\" style=\";padding: 0px;font-family: Menlo, Monaco, 'Source Code Pro', 'Courier New', monospace;background: rgb(241, 243, 245);border: none;border-radius: 3px;display: block;line-height: 20px;height: 20px;font-size: 13px\"> "checkCluster": "outbound|9091||istio-policy.istio-system.svc.cluster.local",</code><code data-type=\"codeline\" style=\";padding: 0px;font-family: Menlo, Monaco, 'Source Code Pro', 'Courier New', monospace;background: rgb(241, 243, 245);border: none;border-radius: 3px;display: block;line-height: 20px;height: 20px;font-size: 13px\"> "reportCluster": "outbound|9091||istio-telemetry.istio-system.svc.cluster.local",</code><code data-type=\"codeline\" style=\";padding: 0px;font-family: Menlo, Monaco, 'Source Code Pro', 'Courier New', monospace;background: rgb(241, 243, 245);border: none;border-radius: 3px;display: block;line-height: 20px;height: 20px;font-size: 13px\"> "reportBatchMaxEntries": 100,</code><code data-type=\"codeline\" style=\";padding: 0px;font-family: Menlo, Monaco, 'Source Code Pro', 'Courier New', monospace;background: rgb(241, 243, 245);border: none;border-radius: 3px;display: block;line-height: 20px;height: 20px;font-size: 13px\"> "reportBatchMaxTime": "1s"</code><code data-type=\"codeline\" style=\";padding: 0px;font-family: Menlo, Monaco, 'Source Code Pro', 'Courier New', monospace;background: rgb(241, 243, 245);border: none;border-radius: 3px;display: block;line-height: 20px;height: 20px;font-size: 13px\"> },</code><code data-type=\"codeline\" style=\";padding: 0px;font-family: Menlo, Monaco, 'Source Code Pro', 'Courier New', monospace;background: rgb(241, 243, 245);border: none;border-radius: 3px;display: block;line-height: 20px;height: 20px;font-size: 13px\"> "mixerAttributes": {</code><code data-type=\"codeline\" style=\";padding: 0px;font-family: Menlo, Monaco, 'Source Code Pro', 'Courier New', monospace;background: rgb(241, 243, 245);border: none;border-radius: 3px;display: block;line-height: 20px;height: 20px;font-size: 13px\"> "attributes": {</code><code data-type=\"codeline\" style=\";padding: 0px;font-family: Menlo, Monaco, 'Source Code Pro', 'Courier New', monospace;background: rgb(241, 243, 245);border: none;border-radius: 3px;display: block;line-height: 20px;height: 20px;font-size: 13px\"> "context.proxy_version": {</code><code data-type=\"codeline\" style=\";padding: 0px;font-family: Menlo, Monaco, 'Source Code Pro', 'Courier New', monospace;background: rgb(241, 243, 245);border: none;border-radius: 3px;display: block;line-height: 20px;height: 20px;font-size: 13px\"> "stringValue": "1.4.8"</code><code data-type=\"codeline\" style=\";padding: 0px;font-family: Menlo, Monaco, 'Source Code Pro', 'Courier New', monospace;background: rgb(241, 243, 245);border: none;border-radius: 3px;display: block;line-height: 20px;height: 20px;font-size: 13px\"> },</code><code data-type=\"codeline\" style=\";padding: 0px;font-family: Menlo, Monaco, 'Source Code Pro', 'Courier New', monospace;background: rgb(241, 243, 245);border: none;border-radius: 3px;display: block;line-height: 20px;height: 20px;font-size: 13px\"> ......</code><code data-type=\"codeline\" style=\";padding: 0px;font-family: Menlo, Monaco, 'Source Code Pro', 'Courier New', monospace;background: rgb(241, 243, 245);border: none;border-radius: 3px;display: block;line-height: 20px;height: 20px;font-size: 13px\"><br style=\";padding: 0px\"/></code></pre><p>复制代码</p><p data-type=\"paragraph\" style=\"margin-top: 0px;margin-bottom: 0px;padding: 0px;line-height: 1.875;font-size: 16px;min-height: 30px;white-space: pre-wrap;color: rgb(48, 48, 48);font-family: 'Helvetica Neue', 'PingFang SC', Verdana, 'Microsoft Yahei', 'Hiragino Sans GB', 'Microsoft Sans Serif', 'WenQuanYi Micro Hei', sans-serif;background-color: rgb(255, 255, 255)\"><br style=\";padding: 0px\"/></p><p data-type=\"paragraph\" style=\"margin-top: 0px;margin-bottom: 0px;padding: 0px;line-height: 1.875;font-size: 16px;min-height: 30px;white-space: pre-wrap;color: rgb(48, 48, 48);font-family: 'Helvetica Neue', 'PingFang SC', Verdana, 'Microsoft Yahei', 'Hiragino Sans GB', 'Microsoft Sans Serif', 'WenQuanYi Micro Hei', sans-serif;background-color: rgb(255, 255, 255)\">该 listener 指向了一个 Cluster:</p><p data-type=\"paragraph\" style=\"margin-top: 0px;margin-bottom: 0px;padding: 0px;line-height: 1.875;font-size: 16px;min-height: 30px;white-space: pre-wrap;color: rgb(48, 48, 48);font-family: 'Helvetica Neue', 'PingFang SC', Verdana, 'Microsoft Yahei', 'Hiragino Sans GB', 'Microsoft Sans Serif', 'WenQuanYi Micro Hei', sans-serif;background-color: rgb(255, 255, 255)\"><br style=\";padding: 0px\"/></p><pre data-origin=\"pm_code_preview\" style=\"margin-top: 0px;margin-bottom: 0px;padding: 0px;font-family: Courier, 'Courier New', monospace\"><code data-type=\"codeline\" style=\";padding: 0px;font-family: Menlo, Monaco, 'Source Code Pro', 'Courier New', monospace;background: rgb(241, 243, 245);border: none;border-radius: 3px;display: block;line-height: 20px;height: 20px;font-size: 13px\"> {</code><code data-type=\"codeline\" style=\";padding: 0px;font-family: Menlo, Monaco, 'Source Code Pro', 'Courier New', monospace;background: rgb(241, 243, 245);border: none;border-radius: 3px;display: block;line-height: 20px;height: 20px;font-size: 13px\"> "name": "envoy.tcp_proxy",</code><code data-type=\"codeline\" style=\";padding: 0px;font-family: Menlo, Monaco, 'Source Code Pro', 'Courier New', monospace;background: rgb(241, 243, 245);border: none;border-radius: 3px;display: block;line-height: 20px;height: 20px;font-size: 13px\"> "typedConfig": {</code><code data-type=\"codeline\" style=\";padding: 0px;font-family: Menlo, Monaco, 'Source Code Pro', 'Courier New', monospace;background: rgb(241, 243, 245);border: none;border-radius: 3px;display: block;line-height: 20px;height: 20px;font-size: 13px\"> "@type": "type.googleapis.com/envoy.config.filter.network.tcp_proxy.v2.TcpProxy",</code><code data-type=\"codeline\" style=\";padding: 0px;font-family: Menlo, Monaco, 'Source Code Pro', 'Courier New', monospace;background: rgb(241, 243, 245);border: none;border-radius: 3px;display: block;line-height: 20px;height: 20px;font-size: 13px\"> "statPrefix": "outbound|7000||redis",</code><code data-type=\"codeline\" style=\";padding: 0px;font-family: Menlo, Monaco, 'Source Code Pro', 'Courier New', monospace;background: rgb(241, 243, 245);border: none;border-radius: 3px;display: block;line-height: 20px;height: 20px;font-size: 13px\"> "cluster": "outbound|7000||redis"</code><code data-type=\"codeline\" style=\";padding: 0px;font-family: Menlo, Monaco, 'Source Code Pro', 'Courier New', monospace;background: rgb(241, 243, 245);border: none;border-radius: 3px;display: block;line-height: 20px;height: 20px;font-size: 13px\"> }</code><code data-type=\"codeline\" style=\";padding: 0px;font-family: Menlo, Monaco, 'Source Code Pro', 'Courier New', monospace;background: rgb(241, 243, 245);border: none;border-radius: 3px;display: block;line-height: 20px;height: 20px;font-size: 13px\"> }</code><code data-type=\"codeline\" style=\";padding: 0px;font-family: Menlo, Monaco, 'Source Code Pro', 'Courier New', monospace;background: rgb(241, 243, 245);border: none;border-radius: 3px;display: block;line-height: 20px;height: 20px;font-size: 13px\"><br style=\";padding: 0px\"/></code></pre><p>复制代码</p><p data-type=\"paragraph\" style=\"margin-top: 0px;margin-bottom: 0px;padding: 0px;line-height: 1.875;font-size: 16px;min-height: 30px;white-space: pre-wrap;color: rgb(48, 48, 48);font-family: 'Helvetica Neue', 'PingFang SC', Verdana, 'Microsoft Yahei', 'Hiragino Sans GB', 'Microsoft Sans Serif', 'WenQuanYi Micro Hei', sans-serif;background-color: rgb(255, 255, 255)\"><br style=\";padding: 0px\"/></p><p data-type=\"paragraph\" style=\"margin-top: 0px;margin-bottom: 0px;padding: 0px;line-height: 1.875;font-size: 16px;min-height: 30px;white-space: pre-wrap;color: rgb(48, 48, 48);font-family: 'Helvetica Neue', 'PingFang SC', Verdana, 'Microsoft Yahei', 'Hiragino Sans GB', 'Microsoft Sans Serif', 'WenQuanYi Micro Hei', sans-serif;background-color: rgb(255, 255, 255)\">对应的 service 信息如下:</p><p data-type=\"paragraph\" style=\"margin-top: 0px;margin-bottom: 0px;padding: 0px;line-height: 1.875;font-size: 16px;min-height: 30px;white-space: pre-wrap;color: rgb(48, 48, 48);font-family: 'Helvetica Neue', 'PingFang SC', Verdana, 'Microsoft Yahei', 'Hiragino Sans GB', 'Microsoft Sans Serif', 'WenQuanYi Micro Hei', sans-serif;background-color: rgb(255, 255, 255)\"><br style=\";padding: 0px\"/></p><p><img src=\"https://static001.geekbang.org/infoq/59/5913d14aac0a6b342058142f8e896c3e.png\" style=\";padding: 0px;border: 0px;vertical-align: top;max-width: 100%;height: auto\"/></p><p data-type=\"paragraph\" style=\"margin-top: 0px;margin-bottom: 0px;padding: 0px;line-height: 1.875;font-size: 16px;min-height: 30px;white-space: pre-wrap;color: rgb(48, 48, 48);font-family: 'Helvetica Neue', 'PingFang SC', Verdana, 'Microsoft Yahei', 'Hiragino Sans GB', 'Microsoft Sans Serif', 'WenQuanYi Micro Hei', sans-serif;background-color: rgb(255, 255, 255)\"><br style=\";padding: 0px\"/></p><p data-type=\"paragraph\" style=\"margin-top: 0px;margin-bottom: 0px;padding: 0px;line-height: 1.875;font-size: 16px;min-height: 30px;white-space: pre-wrap;color: rgb(48, 48, 48);font-family: 'Helvetica Neue', 'PingFang SC', Verdana, 'Microsoft Yahei', 'Hiragino Sans GB', 'Microsoft Sans Serif', 'WenQuanYi Micro Hei', sans-serif;background-color: rgb(255, 255, 255)\">可以看到 endpoint 就是刚才我们指定的外部服务器地址:</p><p data-type=\"paragraph\" style=\"margin-top: 0px;margin-bottom: 0px;padding: 0px;line-height: 1.875;font-size: 16px;min-height: 30px;white-space: pre-wrap;color: rgb(48, 48, 48);font-family: 'Helvetica Neue', 'PingFang SC', Verdana, 'Microsoft Yahei', 'Hiragino Sans GB', 'Microsoft Sans Serif', 'WenQuanYi Micro Hei', sans-serif;background-color: rgb(255, 255, 255)\"><br style=\";padding: 0px\"/></p><p><img src=\"https://static001.geekbang.org/infoq/2f/2f21a36edf3e84722c189f2a9418a1a2.png\" style=\";padding: 0px;border: 0px;vertical-align: top;max-width: 100%;height: auto\"/></p><p data-type=\"paragraph\" style=\"margin-top: 0px;margin-bottom: 0px;padding: 0px;line-height: 1.875;font-size: 16px;min-height: 30px;white-space: pre-wrap;color: rgb(48, 48, 48);font-family: 'Helvetica Neue', 'PingFang SC', Verdana, 'Microsoft Yahei', 'Hiragino Sans GB', 'Microsoft Sans Serif', 'WenQuanYi Micro Hei', sans-serif;background-color: rgb(255, 255, 255)\"><br style=\";padding: 0px\"/></p><p data-type=\"paragraph\" style=\"margin-top: 0px;margin-bottom: 0px;padding: 0px;line-height: 1.875;font-size: 16px;min-height: 30px;white-space: pre-wrap;color: rgb(48, 48, 48);font-family: 'Helvetica Neue', 'PingFang SC', Verdana, 'Microsoft Yahei', 'Hiragino Sans GB', 'Microsoft Sans Serif', 'WenQuanYi Micro Hei', sans-serif;background-color: rgb(255, 255, 255)\">进行访问测试:</p><p data-type=\"paragraph\" style=\"margin-top: 0px;margin-bottom: 0px;padding: 0px;line-height: 1.875;font-size: 16px;min-height: 30px;white-space: pre-wrap;color: rgb(48, 48, 48);font-family: 'Helvetica Neue', 'PingFang SC', Verdana, 'Microsoft Yahei', 'Hiragino Sans GB', 'Microsoft Sans Serif', 'WenQuanYi Micro Hei', sans-serif;background-color: rgb(255, 255, 255)\"><br style=\";padding: 0px\"/></p><p><img src=\"https://static001.geekbang.org/infoq/ce/ceb5b5b950acaa5e74c2346ed41955d6.png\" style=\";padding: 0px;border: 0px;vertical-align: top;max-width: 100%;height: auto\"/></p><p data-type=\"paragraph\" style=\"margin-top: 0px;margin-bottom: 0px;padding: 0px;line-height: 1.875;font-size: 16px;min-height: 30px;white-space: pre-wrap;color: rgb(48, 48, 48);font-family: 'Helvetica Neue', 'PingFang SC', Verdana, 'Microsoft Yahei', 'Hiragino Sans GB', 'Microsoft Sans Serif', 'WenQuanYi Micro Hei', sans-serif;background-color: rgb(255, 255, 255)\"><br style=\";padding: 0px\"/></p><p data-type=\"paragraph\" style=\"margin-top: 0px;margin-bottom: 0px;padding: 0px;line-height: 1.875;font-size: 16px;min-height: 30px;white-space: pre-wrap;color: rgb(48, 48, 48);font-family: 'Helvetica Neue', 'PingFang SC', Verdana, 'Microsoft Yahei', 'Hiragino Sans GB', 'Microsoft Sans Serif', 'WenQuanYi Micro Hei', sans-serif;background-color: rgb(255, 255, 255)\">已经可以正常访问了。</p><p><br/></p>', '', '0', '0', '1', '2021-10-24 17:51:05', '2021-10-24 17:51:05', '2', '0', 'Istio ', '');
-- ----------------------------
-- Table structure for `tb_tag`
-- ----------------------------
DROP TABLE IF EXISTS `tb_tag`;
CREATE TABLE `tb_tag` (
`id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
`name` varchar(20) NOT NULL DEFAULT '' COMMENT '标签名',
`count` mediumint(8) unsigned NOT NULL DEFAULT '0' COMMENT '使用次数',
`created` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
`updated` timestamp NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
PRIMARY KEY (`id`),
KEY `name` (`name`)
) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8;
-- ----------------------------
-- Records of tb_tag
-- ----------------------------
INSERT INTO `tb_tag` VALUES ('1', 'iPhone', '3', '2017-08-08 10:58:39', '2017-08-08 10:58:39');
INSERT INTO `tb_tag` VALUES ('2', '越狱', '3', '2017-08-08 10:58:39', '2017-08-08 10:58:39');
-- ----------------------------
-- Table structure for `tb_tag_post`
-- ----------------------------
DROP TABLE IF EXISTS `tb_tag_post`;
CREATE TABLE `tb_tag_post` (
`id` int(11) unsigned NOT NULL AUTO_INCREMENT,
`tag_id` mediumint(8) unsigned NOT NULL DEFAULT '0' COMMENT '标签id',
`post_id` mediumint(8) unsigned NOT NULL DEFAULT '0' COMMENT '内容id',
PRIMARY KEY (`id`),
KEY `tagid` (`tag_id`),
KEY `postid` (`post_id`)
) ENGINE=InnoDB AUTO_INCREMENT=7 DEFAULT CHARSET=utf8;
-- ----------------------------
-- Records of tb_tag_post
-- ----------------------------
INSERT INTO `tb_tag_post` VALUES ('1', '1', '22');
INSERT INTO `tb_tag_post` VALUES ('2', '2', '22');
INSERT INTO `tb_tag_post` VALUES ('3', '1', '21');
INSERT INTO `tb_tag_post` VALUES ('4', '2', '21');
INSERT INTO `tb_tag_post` VALUES ('5', '1', '20');
INSERT INTO `tb_tag_post` VALUES ('6', '2', '20');
-- ----------------------------
-- Table structure for `tb_user`
-- ----------------------------
DROP TABLE IF EXISTS `tb_user`;
CREATE TABLE `tb_user` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`username` varchar(255) DEFAULT NULL,
`password` varchar(255) DEFAULT NULL,
`email` varchar(200) DEFAULT NULL,
`login_count` int(11) DEFAULT NULL,
`last_time` timestamp NULL DEFAULT NULL ON UPDATE CURRENT_TIMESTAMP,
`last_ip` varchar(200) DEFAULT 'current_timestamp()',
`state` tinyint(4) DEFAULT NULL,
`created` timestamp NULL DEFAULT CURRENT_TIMESTAMP,
`updated` timestamp NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8mb4;
-- ----------------------------
-- Records of tb_user
-- ----------------------------
INSERT INTO `tb_user` VALUES ('1', 'admin', ' e10adc3949ba59abbe56e057f20f883e', '', '54', null, '[', '0', null, '2017-08-08 19:48:05');