https://nigelpoulton.com/blog/f/demystifying-kubernetes-service-discovery K8S服务发现揭秘 这篇文章介绍了K8S如何让其上运行的服务发现其他的服务。以服务发现为线索,串起了很多基础概念和配置。理解服务发现对Debug很有帮助,也有助于规划K8S网络。
Nigel Poulton
Demystifying Kubernetes service discovery
The definitive guide to Kubernetes Service Discovery.
https://understandlegacycode.com/blog/avoid-rewriting-a-legacy-system-from-scratch-by-strangling-it/ 不要重写老系统,而是“绞杀”它 这里的“绞杀”,是指系统的替换过程:先使用新的接口实现一套代理,调用老系统实现新接口,再慢慢把老系统的实现替换成新的实现。这样可以保证整个系统同时进行新功能开发和重构。该方法可能更适合Service的开发。
https://jvns.ca/blog/2020/04/29/why-strace-doesnt-work-in-docker/ 为什么strace在Docker里不工作 一个表面上不奇怪,但深究起来很奇怪的问题。由于Docker
--cap-add
做了一些“多余”的工作,使得strace看起来需要添加cap才能工作,但实际是seccomp的设置问题。最新版Docker在最新内核已经修正这个问题,但依然值得看看分析。Julia Evans
Why strace doesn't work in Docker
https://lwn.net/SubscriberLink/820217/47ed80088c03b18d/ Go1.15新特性 最重要的是改写了链接器。Ken Thompson怹老人家人走茶凉。当年他一人之力写的链接器不够模块化,无法抽象,导致跟不上新的变化。怹现在退休了!是时候重写了!(对,我只是想吐个槽
lwn.net
What's coming in Go 1.15
Go 1.15, the 16th major version of the Go
programming language, is due out on
August 1. It will be a release with fewer changes than usual, but many of
the major changes are behind-the-scenes or in the tooling: for example,
there is a
new linker, which…
programming language, is due out on
August 1. It will be a release with fewer changes than usual, but many of
the major changes are behind-the-scenes or in the tooling: for example,
there is a
new linker, which…
https://arxiv.org/abs/2005.11710 羽量级Go泛型 谷歌公司传统艺能:发论文。论文提到Go类型系统希望通过静态的方法,解决Wadler表达问题。这是Go支持泛型的出发点。之后描述了Go泛型的理论原型,并进行了证明。
https://go.googlesource.com/proposal/+/refs/heads/master/design/go2draft-type-parameters.md 类型参数-设计草案 Go关于泛型的最新设计草案。和之前的最主要的区别,使用interface作为类型参数约束。感觉这里有学习Rust的影子。已经有
go2go
可以实际运作。https://redislabs.com/blog/redisraft-new-strong-consistency-deployment-option/ RedisRaft介绍:强一致性的新选择 Redis今天官宣了RedisRaft模块,这个模块可以实现多个Redis之间强一致存储集群,功能上与ZooKeeper和Etcd类似。模块基于Redis5开发。有兴趣的话可以关注一下。
Redis
Introducing RedisRaft, a New Strong-Consistency Deployment Option | Redis
The RedisRaft module makes it possible to use Redis and its existing clients, libraries, and data types in beyond-cache scenarios requiring a high level of reliability and consistency.
https://dropbox.tech/infrastructure/how-we-migrated-dropbox-from-nginx-to-envoy Dropbox是如何从Nginx迁移到Envoy的 Nginx应该是没办法满足中大型公司的需求和灵活性,越来越多的公司开始迁移到Envoy这种动态配置为主的HTTP服务器。Dropbox这里对比了内部两种服务运维的差别以及特性。另外,文章说xDS APIs已经成为事实标准,也是另一个关注的理由。
dropbox.tech
How we migrated Dropbox from Nginx to Envoy
https://dropbox.tech/infrastructure/-broccoli--syncing-faster-by-syncing-less Broccoli:减少数据,提高同步速度 Dropbox最近的技术文章不少。这篇文章是Dropbox开发的新压缩算法Broccoli的介绍文章。相比zlib,新算法压缩率高,安全性好,支持流压缩。算法使用Rust实现。
dropbox.tech
Broccoli: Syncing faster by syncing less
https://engineering.shopify.com/blogs/engineering/shopify-monolith 解构中:Shopify单件的状态 记得以前分享过Shopify关于单件的文章,这篇是其实践经验。其中有一些错误经验分享,但更多是如何拆解模块并解耦的实践经验,也是一些工程性强的语言一直倡导的经验。不过,这种情况下,是不是开始使用别的语言开发会更好呢?
Shopify
Under Deconstruction: The State of Shopify’s Monolith
It’s been 18 months since we talked about our Rails modular monolith. We lay out the current state of the work, and things we’d do differently if we started again.
https://rakyll.org/spanner-ha-writes/ Spanner是如何实现高可用写操作 这篇文章虽然是介绍Spanner,其实总结了常用的带状态分布式系统的设计模式。常见的同步/异步写,副本读策略,数据分裂,副本同步,提交事务,重试等模式,都有提及。
https://github.com/googollee/grpc-gateway-example 一个gRPC通过Gateway转HTTP API的例子 定义一个gRPC proto,可以同时输出gRPC API,HTTP API以及OpenAPI定义文件。Gateway支持Server side streaming,但OpenAPI还不支持Streaming,只能读到第一个返回。
GitHub
GitHub - googollee/grpc-gateway-example: An example of gRPC Gateway.
An example of gRPC Gateway. Contribute to googollee/grpc-gateway-example development by creating an account on GitHub.
https://dancres.github.io/Pages/ 分布式系统阅读列表 列出了分布式系统相关的经典论文,而且按照不同的主题分类。粗扫了一眼,延迟一致性模型,基础架构这几个主题我比较感兴趣,会慢慢读一下里面的论文。
https://www.smashingmagazine.com/2021/08/http3-core-concepts-part1/ HTTP3入门:核心概念 这篇文章解释了为什么要有HTTP3,以及最基础的QUIC协议。QUIC最重要的功能:集成TLS,支持链接复用,支持链接迁移,更灵活且便于演进。HTTP3的特性会在后续文章跟进。
Smashing Magazine
HTTP/3 From A To Z: Core Concepts — Smashing Magazine
What exactly is HTTP/3? Why was it needed so soon after HTTP/2 (which was only finalized in 2015)? How can or should you use it? And especially, how does this improve web performance? Let’s find out.
https://github.blog/2021-09-27-partitioning-githubs-relational-databases-scale/ 对关系数据库进行分区来处理伸缩 GitHub介绍其如何基于MySQL处理数据伸缩能力的文章。GitHub没有对表做横向拆分,而是依据业务逻辑纵向拆分。比较有意思的是通过ProxySQl实现写入切换的过程。过程中会有短时停机,但能保证不丢失业务数据。
The GitHub Blog
Partitioning GitHub’s relational databases to handle scale
In 2019, to meet growth and availability challenges, we set a plan in motion to improve our tooling and ability to partition relational databases.
https://air.googol.im/post/neovim-configuration/ 组织Neovim配置的方法 最近把NeoVim的配置整理了一下。这里记录了组织配置的方式。
air.googol.im
组织Neovim配置的方法
如何使用Lua组织Neovim的配置
https://calpaterson.com/against-database-teardown.html 关于测试前是否清空数据库的讨论 作者探讨是否可以测试前不清空数据库,只确保需要的数据存在。好处是:速度快,环境真实,可并行。坏处是:难查错,不容易满足前置条件。作者并没有应用经验,但是这个想法似乎值得尝试,尤其在CI的集成测试,可以提高整个流程的速度。
calpaterson.com
The argument against clearing the database between tests
Some reasons why you might not want to remove data from the database between automated tests: speed, correctness, data growth issues and parallelism advantages
https://www.mnot.net/blog/2022/02/20/websockets SSE,WebSockets和HTTP 文章比较了目前可用的几种基于HTTP的双向通信方案:Server-Sent Event,WebSockets和基于扩展105/106的HTTP(类似long polling)。浏览器和CDN对几种方案的支持各不相同,目前并没有最佳方案。
https://datatracker.ietf.org/doc/rfc9114/ HTTP/3 HTTP3 RFC正式公布。从技术上讲,HTTP3完善了很多HTTP2基于TCP未能解决的问题。随之而来的问题是,ISP什么时候会开放基于QUIC的UDP包。HTTP3很多概念也远比HTTP1复杂。希望业界能够顺利迁移到新协议。
IETF Datatracker
RFC 9114: HTTP/3
The QUIC transport protocol has several features that are desirable in a transport for HTTP, such as stream multiplexing, per-stream flow control, and low-latency connection establishment. This document describes a mapping of HTTP semantics over QUIC. This…
https://eng.uber.com/data-race-patterns-in-go/ Go里的数据争用模式 Uber的这篇Blog,统计了内部产生数据争用(Data racing)的代码,并加以分类。可以对照每个分类,看看类似的错误是不是出现在自己的项目中。最后还统计了每种分类的出现次数。值得思考一下,该如何避免这些模式。