Istio Canary(金丝雀) 上线
· ☕ 1 分钟
按比例分配分配新旧版本流量 VirtualService: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 apiVersion: networking.istio.io/v1alpha3 kind: VirtualService metadata: name: reviews spec: hosts: - reviews http: - route: - destination: host: reviews subset: v1 weight: 75 - destination: host: reviews subset: v2 weight: 25 DestinationRule : 1 2 3 4 5 6 7

系统级跟踪 eBPF 工具 —— bpftrace 入门
· ☕ 1 分钟
bpftrace 简介 bpftrace 简单使用 查询可以跟踪的内核函数,以 sleep 为关键字 1 2 3 4 5 6 7 8 $ bpftrace -l '*open*' tracepoint:syscalls:sys_exit_open_tree tracepoint:syscalls:sys_enter_open ... kprobe:vfs_open kprobe:tcp_try_fastopen ... 跟踪所有 sys_enter_open() 系统调用 1 $ bpftrace -e 'tracepoint:syscalls:sys_enter_open{ printf("%s %s\n", comm,str(args->filename)); }' | grep vi 然后在另外

Kernel - Page Frame 回收
· ☕ 4 分钟
From [Understanding The Linux Kernel] Page Frame 回收 之前我们了解到,Linux 倾向用最多的内存做 Page Cache。这使我们不得不考虑如何在内存不足前回收内存。问题是,回收内存的程

Kernel - Pagecache
· ☕ 1 分钟
简介 page cache 存放的数据的类型 普通的文件 目录数据 直接读取自 block device file 的数据 已经被swap out的用户进程内存的数据(可以强制内核在page cahce中

Kernel - Pagecache - Core
· ☕ 3 分钟
address_space 数据结构 Page cahce 的核心数据结构是 addrees_space。一般来说,每个 inode (Kernel 用来存放文件元信息的内存中的数据结构,可以视为一个文

2月4日 - IT当年今日
· ☕ 3 分钟
2月4日 - IT当年今日 1943年2月4日 Ken Thompson 出生 简介 Unix 来源于一个程序员想玩游戏 肯尼斯·汤普森(Kenneth Thompson)与丹尼斯·里奇

2020年的回顾;2021年的一些想法
· ☕ 4 分钟
2020年回顾 2020让我受益最大的资料 📚 翻开印象笔记,我回顾了一下最有价值的资料: Service Mesh 深度理解 Istio 如何路由 TCP 流量 Container Under the hood of Docker — Janos Pasztor Understanding resource limits in kubernetes:

· ☕ 1 分钟
$ pip install md-translate export md-translate -s Google -S en -T zh-CN ./java-native-mem.md Ref https://github.com/ilyachch/md_docs-trans-app

· ☕ 1 分钟
https://docs.bazel.build/versions/4.2.1/tutorial/cpp.html

· ☕ 1 分钟
Overriding repositories from the command line https://docs.bazel.build/versions/4.2.1/external.html#overriding-repositories-from-the-command-line To override a declared repository with a local repository from the command line, use the --override_repository flag. Using this flag changes the contents of external repositories without changing your source code. For example, to override @foo to the local directory /path/to/local/foo, pass the --override_repository=foo=/path/to/local/foo flag. Some of the use cases include: Debugging issues. For example, you can override a http_archive repository to a local directory where you can make changes more easily.

· ☕ 1 分钟
https://docs.bazel.build/versions/4.2.1/configurable-attributes.html

· ☕ 4 分钟
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 make build_envoy #BUILD_WITH_CONTAINER=1 make build_envoy #dry run make -n build #log make V=1 build make build BAZEL_STARTUP_ARGS='' BAZEL_BUILD_ARGS='-s --explain=explain.txt --config=debug' BAZEL_TARGETS='//src/envoy:envoy' make build BAZEL_STARTUP_ARGS='' BAZEL_BUILD_ARGS='-s --explain=explain.txt --config=debug --sandbox_debug' BAZEL_TARGETS='//src/envoy:envoy' make build BAZEL_STARTUP_ARGS='' BAZEL_BUILD_ARGS='-s --explain=explain.txt --config=debug --cxxopt="-fno-stack-protector" --copt="-fno-stack-protector"' BAZEL_TARGETS='//src/envoy:envoy' 2>&1 | tee bazel-log.log Makefile.core.mk 1 2 3 4 build_envoy: export PATH=$(PATH) CC=$(CC) CXX=$(CXX) && \ bazel $(BAZEL_STARTUP_ARGS) build $(BAZEL_BUILD_ARGS) $(BAZEL_CONFIG_REL) @com_googlesource_chromium_v8//:build && \ bazel $(BAZEL_STARTUP_ARGS) build $(BAZEL_BUILD_ARGS) $(BAZEL_CONFIG_REL) //src/envoy:envoy 1 2 3 4 5 6 7 8 bazel info //src/envoy:envoy bazel build //src/envoy:envoy bazel query 'deps(//src/envoy:envoy)' bazel query --notool_deps --noimplicit_deps 'deps(//src/envoy:envoy)' --output graph show_args 1 2 3 4 5 show_args: /bin/echo \ export PATH=$(PATH) CC=$(CC) CXX=$(CXX) \ bazel $(BAZEL_STARTUP_ARGS) build $(BAZEL_BUILD_ARGS) $(BAZEL_CONFIG_REL) @com_googlesource_chromium_v8//:build \ bazel $(BAZEL_STARTUP_ARGS) build $(BAZEL_BUILD_ARGS) $(BAZEL_CONFIG_REL) //src/envoy:envoy 1 2 3 4 5 make show_args export PATH=/usr/lib/llvm-10/bin:/root/.