寫點東西吧,懒人。

· ☕ 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/.

· ☕ 1 分钟
https://shaharmike.com/cpp/vtable-part2/

· ☕ 4 分钟
https://tenzir.com/blog/production-debugging-bpftrace-uprobes/ https://shaharmike.com/cpp/vtable-part1/ 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 #include <iostream> class Parent { public: virtual void Foo() {} virtual void FooNotOverridden() {} }; class Derived : public Parent { public: void Foo() override {} }; int main() { Parent p1, p2; Derived d1, d2; std::cout << "done" << std::endl; } $ # compile our code with debug symbols and start debugging using gdb $ clang++ -std=c++14 -stdlib=libc++ -g main.

· ☕ 1 分钟
https://netflixtechblog.com/predictive-cpu-isolation-of-containers-at-netflix-91f014d856c7

· ☕ 1 分钟
https://www.youtube.com/watch?v=spzfupads2o#fromHistory Envoy Internals Deep Dive - Matt Klein, Lyft

· ☕ 5 分钟
Terminology Cluster: a logical service with a set of endpoints that Envoy forwards requests to. Downstream: an entity connecting to Envoy. This may be a local application (in a sidecar model) or a network node. In non-sidecar models, this is a remote client. Endpoints: network nodes that implement a logical service. They are grouped into clusters. Endpoints in a cluster are upstream of an Envoy proxy. Filter: a module in the connection or request processing pipeline providing some aspect of request handling.

· ☕ 0 分钟

· ☕ 1 分钟
tcmalloc,通过-define tcmalloc=disabled禁用 https://blog.gmem.cc/envoy-study-note

· ☕ 1 分钟
https://istio.cn/t/topic/299 Envoy源码分析之Dispatcher:https://developer.aliyun.com/article/659277 线程相关 Misc: Envoy进程由一个Main Thread和多个Worker Thread 组成 每个Main和Worker包含一个eventloop,所有的处理都是由eventloop触发开始 Main负责xDS等功能,Worker负责处理连接和请求 当一个client向Envoy建立连接的时候,因为所有Worker的EventLoop都注册了listening fd(启用SO_PORTREUSE除外),会由内核决定分配给哪个Worker 当一个下游client连接到了Envoy,在保持连接不断的情况下,会和同一个Worker进行通讯

· ☕ 2 分钟
HTTP/1.1 Header Casing https://www.envoyproxy.io/docs/envoy/latest/configuration/http/http_conn_man/header_casing#config-http-conn-man-header-casing When handling HTTP/1.1, Envoy will normalize the header keys to be all lowercase. While this is compliant with the HTTP/1.1 spec, in practice this can result in issues when migrating existing systems that might rely on specific header casing. To support these use cases, Envoy allows configuring a formatting scheme for the headers, which will have Envoy transform the header keys during serialization. To configure this formatting on response headers, specify the format in the http_protocol_options.