<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"><channel><title>Weir&apos;s Note</title><description>应无所住而生其心</description><link>https://leeweir.github.io/</link><language>zh-CN</language><item><title>稳定性的模式与反模式</title><link>https://leeweir.github.io/posts/stability/</link><guid isPermaLink="true">https://leeweir.github.io/posts/stability/</guid><description>稳定性之于系统，就像健康之于人类，看起来重要不紧急，然而一旦失去，就追悔莫及。</description><pubDate>Thu, 17 Sep 2020 00:00:00 GMT</pubDate><category>sre</category><category>stability</category></item><item><title>LIVENESS PROBE 的问题</title><link>https://leeweir.github.io/posts/liveness-probe-problem/</link><guid isPermaLink="true">https://leeweir.github.io/posts/liveness-probe-problem/</guid><description>Kubernetes 提供了两种功能 Readiness and Liveness Probes，它们可以定期执行操作（例如发出 HTTP 请求，打开 TCP 连接或在您的容器中运行命令），以确认您的应用程序按预期工作。</description><pubDate>Sun, 28 Jun 2020 00:00:00 GMT</pubDate><category>cloud-native</category><category>best-practice</category></item><item><title>Replacing iptables with eBPF in Kubernetes with Cilium</title><link>https://leeweir.github.io/posts/cilium/</link><guid isPermaLink="true">https://leeweir.github.io/posts/cilium/</guid><description>It makes disadvantages of iptables disappear. And always gets the best from the Linux kernel.</description><pubDate>Fri, 19 Jun 2020 00:00:00 GMT</pubDate><category>network</category><category>cloud-native</category></item><item><title>谈谈 ACID、CAP 和 BASE</title><link>https://leeweir.github.io/posts/acid-cap-base/</link><guid isPermaLink="true">https://leeweir.github.io/posts/acid-cap-base/</guid><description>ACID 是指数据库管理系统在写入或更新资料的过程中，为保证事务（transaction）是正确可靠的，所必须具备的四个特性：</description><pubDate>Mon, 15 Jun 2020 00:00:00 GMT</pubDate><category>distributed-system</category></item><item><title>Raft 协议介绍</title><link>https://leeweir.github.io/posts/raft/</link><guid isPermaLink="true">https://leeweir.github.io/posts/raft/</guid><description>论文: In Search of an Understandable Consensus Algorithm (Extended Version)</description><pubDate>Mon, 15 Jun 2020 00:00:00 GMT</pubDate><category>distributed-system</category></item><item><title>Dockerfile ENV 的问题</title><link>https://leeweir.github.io/posts/dockerfile-env/</link><guid isPermaLink="true">https://leeweir.github.io/posts/dockerfile-env/</guid><description>今天遇见一个小问题，大概是这样，我们的镜像是分层的，在 base 镜像里设置了一个 ENV，然后在后面一层镜像的时候 unset 掉了，但是实际运行的时候发现这个 ENV 一直存在，导致应用启动失败。花了一些时间查问题，其实本身也是 dockerfile 的设计，之前没有体系化的去看，所以这篇就记录下关于 ENV 的最</description><pubDate>Thu, 28 May 2020 00:00:00 GMT</pubDate><category>cloud-native</category><category>docker</category></item><item><title>云原生交付思考</title><link>https://leeweir.github.io/posts/cloud-native-delivery/</link><guid isPermaLink="true">https://leeweir.github.io/posts/cloud-native-delivery/</guid><description>当 DevOps 遇上容器时，PPT 上往往有各种遐想的空间。实际在落地的过程中，因为公司已有成熟的发布系统，该发布系统是基于虚拟机时代的场景设计，发布主要是更新下代码和重启服务。为了兼容现有的发布模式，交付做的并不成功，和 k8s 的弹性理念存在冲突。所以我们需要打造一个以 k8s 为核心的新一代云原生 PaaS。</description><pubDate>Mon, 25 May 2020 00:00:00 GMT</pubDate><category>cloud-native</category></item><item><title>关于网卡中断不均衡问题及其解决方案</title><link>https://leeweir.github.io/posts/irq-not-balance/</link><guid isPermaLink="true">https://leeweir.github.io/posts/irq-not-balance/</guid><description>前不久生产碰到一个故障，一台宿主机上出现了大量的丢包，对业务造成了比较大的影响，遇到的问题还是蛮值得记录下来，所以简单的整理了下。</description><pubDate>Wed, 13 May 2020 00:00:00 GMT</pubDate><category>sre</category><category>linux</category><category>network</category></item><item><title>[译] A deep dive into Kubernetes controllers</title><link>https://leeweir.github.io/posts/a-deep-dive-into-kubernetes-controllers/</link><guid isPermaLink="true">https://leeweir.github.io/posts/a-deep-dive-into-kubernetes-controllers/</guid><description>原文地址</description><pubDate>Fri, 06 Mar 2020 00:00:00 GMT</pubDate><category>cloud-native</category></item><item><title>Linux 丢包那些事</title><link>https://leeweir.github.io/posts/linux-packet-loss/</link><guid isPermaLink="true">https://leeweir.github.io/posts/linux-packet-loss/</guid><description>最近一直在排查一些网络的问题，比如 connect timeout 、read timeout 以及一些丢包的问题，刚好想整理一些东西，方便和团队内及开发分享。</description><pubDate>Mon, 28 Oct 2019 00:00:00 GMT</pubDate><category>sre</category><category>tcp</category><category>linux</category></item><item><title>[译] Linux bcc/eBPF tcpdrop</title><link>https://leeweir.github.io/posts/linux-bcc-tcpdrop/</link><guid isPermaLink="true">https://leeweir.github.io/posts/linux-bcc-tcpdrop/</guid><description>最近在看 eBPF 的一些材料，看到 Brendan Gregg 的博客，后面想陆续针对一些主题翻译下，这一篇主要自介绍 tcpdrop，文章比较短，原文地址</description><pubDate>Fri, 25 Oct 2019 00:00:00 GMT</pubDate><category>sre</category><category>tcp</category><category>kernel</category></item><item><title>一个 Connect Timeout 故障排查</title><link>https://leeweir.github.io/posts/connect-timeout-problem/</link><guid isPermaLink="true">https://leeweir.github.io/posts/connect-timeout-problem/</guid><description>有用户反馈在dubbo的应用发布后，过几分钟之后，调用方会出现大量的connectTimeout。当时在服务端容器上进行了抓包，看到在故障期间，客户端发了syn，但是服务端没有任何响应。</description><pubDate>Mon, 21 Oct 2019 00:00:00 GMT</pubDate><category>sre</category><category>tcp</category></item><item><title>MasteringGo 翻译完成</title><link>https://leeweir.github.io/posts/masteringgo-translate/</link><guid isPermaLink="true">https://leeweir.github.io/posts/masteringgo-translate/</guid><description>之前，运维或者运维开发很多时候主力语言都是python，python作为动态解释性语言，一方面，较低的运行效率，一些场景无法满足，另一方面，过于灵活的语言特性也导致多人协作和项目维护成本较高。受益于云原生的发展，Golang自然也成为了云计算时代的语言，所以也希望Golang能够替代Python，成为后续团队内的主力开</description><pubDate>Fri, 23 Aug 2019 00:00:00 GMT</pubDate><category>golang</category></item><item><title>关于 423 故障</title><link>https://leeweir.github.io/posts/about-423/</link><guid isPermaLink="true">https://leeweir.github.io/posts/about-423/</guid><description>其实写这种文章压力很大，因为本身自己写这种总结类文章文采真的很差，刚好昨天聊到了这个话题，我还是想把自己想的一些思考记录下来。</description><pubDate>Tue, 30 Apr 2019 00:00:00 GMT</pubDate><category>sre</category></item><item><title>一台服务器可以发起多少个连接</title><link>https://leeweir.github.io/posts/how-many-connections-can-a-server-send/</link><guid isPermaLink="true">https://leeweir.github.io/posts/how-many-connections-can-a-server-send/</guid><description>最近好多同学纠结这个问题，拿出以前分享的ppt发个博客。总结来说，发起多少连接不受源端口限制，只要保证TCP四元组唯一，那么就可以继续建立连接。</description><pubDate>Fri, 19 Apr 2019 00:00:00 GMT</pubDate><category>tcp</category></item><item><title>two-sum</title><link>https://leeweir.github.io/posts/two-sum/</link><guid isPermaLink="true">https://leeweir.github.io/posts/two-sum/</guid><description>最近刚好在学golang，所以就拿简单的LeetCode提来练习练习，顺便把结果分享下</description><pubDate>Thu, 14 Feb 2019 00:00:00 GMT</pubDate><category>golang</category></item><item><title>DNS 缓存介绍: NSCD</title><link>https://leeweir.github.io/posts/dns-cache-nscd/</link><guid isPermaLink="true">https://leeweir.github.io/posts/dns-cache-nscd/</guid><description>NSCD（name service cache daemon）是我们在linux上最常用的DNS缓存服务，它是glibc网络库的一个组件。基本上来讲我们能见到的一些编程语言和开发框架最终均会调用到glibc的网络解析的函数（如GETHOSTBYNAME or GETHOSTBYADDR等），因此绝大部分程序能够使用NS</description><pubDate>Sat, 02 Feb 2019 00:00:00 GMT</pubDate><category>sre</category><category>dns</category></item><item><title>TLS1.3 初探</title><link>https://leeweir.github.io/posts/tls13/</link><guid isPermaLink="true">https://leeweir.github.io/posts/tls13/</guid><description>openssl1.1.1 final正式发布后，准备在线上开始灰度了。虽然之前有一些了解，但是其实没有准确的认知，所以需要再好好的分析一下：</description><pubDate>Tue, 16 Oct 2018 00:00:00 GMT</pubDate><category>https</category></item><item><title>听说你访问了 Ctrip</title><link>https://leeweir.github.io/posts/access-ctrip/</link><guid isPermaLink="true">https://leeweir.github.io/posts/access-ctrip/</guid><description>昨天和新人交谈的时候，发现他们对网站整体的访问和架构都不清楚，所以想着可以写一篇比较白话一点的技术入门文章，内容上也可以慢慢丰富。</description><pubDate>Wed, 12 Sep 2018 00:00:00 GMT</pubDate><category>sre</category></item><item><title>8.8.8.8 的问题</title><link>https://leeweir.github.io/posts/8.8.8.8-problem/</link><guid isPermaLink="true">https://leeweir.github.io/posts/8.8.8.8-problem/</guid><description>其实这不是8.8.8.8的问题。</description><pubDate>Wed, 22 Aug 2018 00:00:00 GMT</pubDate><category>sre</category><category>dns</category></item><item><title>Python 格式化工具 Black</title><link>https://leeweir.github.io/posts/python-black/</link><guid isPermaLink="true">https://leeweir.github.io/posts/python-black/</guid><description>Black是facebook提供的一个python formatter工具，体验了下确实很不错，现在默认编码格式化就用它了。 名字的是来自福特公司当年说过的一句话：</description><pubDate>Fri, 20 Jul 2018 00:00:00 GMT</pubDate><category>python</category></item><item><title>skyline timeseries 异常检测算法介绍</title><link>https://leeweir.github.io/posts/skyline-timeseries-anomaly-detection/</link><guid isPermaLink="true">https://leeweir.github.io/posts/skyline-timeseries-anomaly-detection/</guid><description>最近重新拾起了异常检测这块内容，所以把skyline预定义的几个算法分析了下，总体来说代码还是比较简单和清楚的，输入是一个timeseries，输出是检测结果（True or False）。</description><pubDate>Thu, 07 Jun 2018 00:00:00 GMT</pubDate><category>sre</category><category>aiops</category></item><item><title>测试几个公共 DNS 的性能</title><link>https://leeweir.github.io/posts/common-local-dns/</link><guid isPermaLink="true">https://leeweir.github.io/posts/common-local-dns/</guid><description>最近CloudFlare推出了自己的免费DNS解析器：1.1.1.1，可以说CloudFlare是我比较喜欢的一个公司之一，当时在想具体性能怎么样，所以找了个工具本地测试了下。Shell脚本测试公共dns的性能，可以测试各个dns server的解析速度，标准输出如下：</description><pubDate>Sun, 08 Apr 2018 00:00:00 GMT</pubDate><category>dns</category></item><item><title>谈谈 syn cookie 的问题</title><link>https://leeweir.github.io/posts/syn-cookie-problem/</link><guid isPermaLink="true">https://leeweir.github.io/posts/syn-cookie-problem/</guid><description>Syn Flood是常见的一种拒绝服务（DOS）攻击方式，所谓的拒绝服务攻击就是通过攻击，使受害主机或者网络不能提供良好的服务，从而达到攻击的目的。</description><pubDate>Fri, 23 Mar 2018 00:00:00 GMT</pubDate><category>sre</category><category>tcp</category></item><item><title>谈谈证书链的问题</title><link>https://leeweir.github.io/posts/cert-chain/</link><guid isPermaLink="true">https://leeweir.github.io/posts/cert-chain/</guid><description>这两天公司遇到影响比较大的故障，是因为服务端证书给的证书链上配置的中间证书错了，导致一部分android用户访问失败。完整的证书内容一般分为3级，服务端证书-中间证书-根证书。其中Root CA是信任锚点，一条证书链中只能有一个。Intermediate CA可以有多个。Root CA通常不直接签发用户证书，而是签发I</description><pubDate>Fri, 09 Mar 2018 00:00:00 GMT</pubDate><category>sre</category><category>https</category></item><item><title>系统设计入门</title><link>https://leeweir.github.io/posts/system-design/</link><guid isPermaLink="true">https://leeweir.github.io/posts/system-design/</guid><description>学习如何设计大型系统。</description><pubDate>Mon, 05 Mar 2018 00:00:00 GMT</pubDate><category>design</category></item><item><title>在 OpenSSL 中使用 TLSv1.3</title><link>https://leeweir.github.io/posts/use-tls13/</link><guid isPermaLink="true">https://leeweir.github.io/posts/use-tls13/</guid><description>即将到来的OpenSSL 1.1.1版本将支持TLSv1.3。这个新版本将兼容OpenSSL 1.1.0版本的二进制文件和API。理论上，如果你的应用程序支持OpenSSL 1.1.0，那么当更新可用时，TLSv1.3版本也将自动得到支持，你不需要专门进行安装。但有一些问题仍需要应用程序开发人员和部署人员了解。在这篇博</description><pubDate>Thu, 01 Mar 2018 00:00:00 GMT</pubDate><category>https</category></item><item><title>HTTP/2 介绍</title><link>https://leeweir.github.io/posts/http2/</link><guid isPermaLink="true">https://leeweir.github.io/posts/http2/</guid><description>2017年公司全面切换到了https和http/2，以前也陆续整理了些材料，这里算做一下总结。</description><pubDate>Tue, 06 Feb 2018 00:00:00 GMT</pubDate><category>http2</category><category>https</category></item><item><title>DomContentLoaded 和 Load 的区别</title><link>https://leeweir.github.io/posts/DomContentLoaded-and-Load/</link><guid isPermaLink="true">https://leeweir.github.io/posts/DomContentLoaded-and-Load/</guid><description>前两天排查了一个用户访问的问题，从而对DomContentLoaded和load进行了一下了解，首先看下chrome上的network：</description><pubDate>Mon, 05 Feb 2018 00:00:00 GMT</pubDate><category>sre</category><category>frontend</category></item><item><title>wget 或者 curl 无法正确解析域名，而 ping 可以</title><link>https://leeweir.github.io/posts/wget-curl-does-not-resolve-domain-properly/</link><guid isPermaLink="true">https://leeweir.github.io/posts/wget-curl-does-not-resolve-domain-properly/</guid><description>刚才用户反馈服务器上不能wget一个资源，我这边具体测试了下，现象如下</description><pubDate>Thu, 01 Feb 2018 00:00:00 GMT</pubDate><category>sre</category></item><item><title>Nginx TLS Session 复用</title><link>https://leeweir.github.io/posts/nginx-tls-session-reuse/</link><guid isPermaLink="true">https://leeweir.github.io/posts/nginx-tls-session-reuse/</guid><description>Session 复用，是指将握手时算出来的对称密钥存起来，后续请求中直接使用。这样可以节省证书传送等开销，也可以将 TLS 握手所需 RTT 减少到一个，如下：</description><pubDate>Wed, 31 Jan 2018 00:00:00 GMT</pubDate><category>https</category><category>nginx</category></item><item><title>解决 fullnat 下获取用户源 IP</title><link>https://leeweir.github.io/posts/fullnat-get-sip/</link><guid isPermaLink="true">https://leeweir.github.io/posts/fullnat-get-sip/</guid><description>在设计L4负载均衡架构的时候，往往选择fnat，它支持LB和RS垮vlan通信。LB位于客户端和后端服务之间，对于客户端的请求报文，将目的地址替换成后端服务的地址，源地址替换成LB的本地地址，对于后端服务的响应报文，将目的地址替换成客户端地址，源地址替换成LB的VIP地址。这样就带来一个问题，后端RS上就看不到客户端的</description><pubDate>Wed, 31 Jan 2018 00:00:00 GMT</pubDate><category>tcp</category></item><item><title>django singal post update</title><link>https://leeweir.github.io/posts/django-singal-post-update/</link><guid isPermaLink="true">https://leeweir.github.io/posts/django-singal-post-update/</guid><description>前不久一个新人问我如何在 django 的 singal 中实现 post update，可是默认 queryset 的 update 是直接调用 sql 的，不会使用 django orm 中的 save 方法，signal 中默认只有 post save 的方法。最后大致实现如下:</description><pubDate>Tue, 30 Jan 2018 00:00:00 GMT</pubDate><category>python</category></item></channel></rss>