惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

Engineering at Meta
Engineering at Meta
D
DataBreaches.Net
云风的 BLOG
云风的 BLOG
B
Blog
T
The Blog of Author Tim Ferriss
MyScale Blog
MyScale Blog
A
About on SuperTechFans
H
Heimdal Security Blog
AI
AI
F
Full Disclosure
The Last Watchdog
The Last Watchdog
cs.AI updates on arXiv.org
cs.AI updates on arXiv.org
K
KPMG report finds enterprise disconnect between AI and its ROI | CIO
量子位
I
InfoQ
Martin Fowler
Martin Fowler
MongoDB | Blog
MongoDB | Blog
WordPress大学
WordPress大学
Hugging Face - Blog
Hugging Face - Blog
小众软件
小众软件
N
News and Events Feed by Topic
腾讯CDC
L
LINUX DO - 最新话题
Attack and Defense Labs
Attack and Defense Labs
Hacker News: Ask HN
Hacker News: Ask HN
Google Online Security Blog
Google Online Security Blog
博客园_首页
Forbes - Security
Forbes - Security
The Register - Security
The Register - Security
博客园 - 三生石上(FineUI控件)
PCI Perspectives
PCI Perspectives
V
Vulnerabilities – Threatpost
The Cloudflare Blog
酷 壳 – CoolShell
酷 壳 – CoolShell
Recent Commits to openclaw:main
Recent Commits to openclaw:main
L
LangChain Blog
Security Archives - TechRepublic
Security Archives - TechRepublic
NISL@THU
NISL@THU
博客园 - Franky
Microsoft Security Blog
Microsoft Security Blog
J
Java Code Geeks
Simon Willison's Weblog
Simon Willison's Weblog
O
OpenAI News
H
Hacker News: Front Page
Project Zero
Project Zero
P
Privacy International News Feed
Cyberwarzone
Cyberwarzone
cs.CV updates on arXiv.org
cs.CV updates on arXiv.org
大猫的无限游戏
大猫的无限游戏
Application and Cybersecurity Blog
Application and Cybersecurity Blog

hwchiu learning note Blog

Kubernetes 怎麼計算 imageFS | hwchiu learning note Nginx Proxy_Pass 不會重新查詢 DNS | hwchiu learning note Multus 下如何透過 network policy 設定 | hwchiu learning note Linux Bridge MTU | hwchiu learning note Kubevirt 初體驗 | hwchiu learning note [MacOS ]隨手筆記 Sed 與 Rename 的使用 | hwchiu learning note Docusaurus 使用 blog mode 後連結一直反白的問題 | hwchiu learning note gcloud 切換帳號 | hwchiu learning note k8s 內安裝 redis-cluster | hwchiu learning note Helm Chart 中如何根據條件來動態安裝 Template 內的物件 | hwchiu learning note GCS 操作上注意事項 | hwchiu learning note istio 操作記錄 | hwchiu learning note terraform | hwchiu learning note Kubernetes GKE 維運上小筆記 | hwchiu learning note Git 修改 author/committer | hwchiu learning note GCP NAT 相關筆記 | hwchiu learning note gcloud ssh 到 GCP VM | hwchiu learning note CloudSQL 收費注意事項 | hwchiu learning note Loki 安裝上的參數調整以及 Ring 的問題除錯 | hwchiu learning note kustomize + helm | hwchiu learning note 觀測 K8s 內 OOM 事件 | hwchiu learning note GKE 上的 RBAC 筆記 | hwchiu learning note 本地產生 jwt token | hwchiu learning note ArgoCD 安裝筆記 | hwchiu learning note CircleCI Context 的使用 | hwchiu learning note 透過 GCP IAP Gateway 來保護 GKE 內的網站 | hwchiu learning note 閱讀筆記: 「SRE 的工作介绍」 | hwchiu learning note 閱讀筆記: 「DevOps is a failure」 | hwchiu learning note 閱讀筆記: 「面試人生 - 設計一個簡易的分散式 Job Scheduler」 | hwchiu learning note 閱讀筆記: 「Cloudflare 06/21 災後報告」 | hwchiu learning note 閱讀筆記: 「啟動 container 直接 kernel panic 的 bug」 | hwchiu learning note 閱讀筆記: 「分散式系統上的常見網路謬誤」 | hwchiu learning note 閱讀筆記: 「為什麼有些工程師不相信 Best Practices 」 | hwchiu learning note 閱讀筆記: 「使用 StressChaos 的經驗來學習 Pod Memory 使用情況」 | hwchiu learning note 閱讀筆記: 「/proc/meminfo 與 free 指令的內容比較」 | hwchiu learning note 閱讀筆記: 「goss, 一個簡易且迅速的 server 驗證工具」 | hwchiu learning note 閱讀筆記: 「如何寫出有意義的討論訊息 」 | hwchiu learning note 閱讀筆記: 「如何提供專業 Code Review 意見」 | hwchiu learning note 閱讀筆記: 「Mizu, 一套用來檢視 Kubernetes Traffic 的視覺化工具」 | hwchiu learning note 閱讀筆記: 「Tetragon, 基於 eBPF 的 Kubernetes 資安管理工具」 | hwchiu learning note 閱讀筆記: 「Datree, Kubernetes Configuration 檢查工具」 | hwchiu learning note 閱讀筆記: 「提升 DevOps 技術的免費書籍」 | hwchiu learning note 閱讀筆記: 「新手閱讀,我踩過的 Terraform 各種雷」 | hwchiu learning note 閱讀筆記: 「容器的除錯之路,遇到 Permission Denied 該怎麼辦」 | hwchiu learning note 閱讀筆記: 「成為軟體架構師的閱讀之路」 | hwchiu learning note 閱讀筆記: 「使用 serverless 5年後的心酸經驗談」 | hwchiu learning note 閱讀筆記: 「istio 下因為YAML 與 Go template 結合產生的 CVE」 | hwchiu learning note 閱讀筆記: 「三座獨立 k8s cluster 還是一個跨三個地區的 k8s cluster ?」 | hwchiu learning note 閱讀筆記: 「DevOps 的 2022 學習之路」 | hwchiu learning note 閱讀筆記: 「強化 Kubernetes 叢集的必備工具」 | hwchiu learning note 閱讀筆記: 「你真的有正確使用 SSH 嗎?」 | hwchiu learning note 閱讀筆記: 「透過 Kubernetes Event-Driver Autoscaler(KEDA) 來根據各種指標動態擴充容器」 | hwchiu learning note 閱讀筆記: 「升級 Kubernetes 1.22 的注意事項」 | hwchiu learning note 閱讀筆記: 「kubectl delete 的行為跟 docker delete 完全不同」 | hwchiu learning note 閱讀筆記: 「Dockerfile 中透過 COPY --chomd 比透過 RUN chomd 可以省下更多空間」 | hwchiu learning note 閱讀筆記: 「軟體工程師你真的工作的很開心嗎??」 | hwchiu learning note 閱讀筆記: 「如何於 Docker 環境中運行 rootless 模式」 | hwchiu learning note 閱讀筆記: 「一個用來管理 Kubernetes 開源工具的開源工具」 | hwchiu learning note 閱讀筆記: 「為什麼 3A 大作的遊戲室都不愛喜歡使用 STL」 | hwchiu learning note 閱讀筆記: 「Terraform 生態下的五個相關輔助工具」 | hwchiu learning note 閱讀筆記: 「Facebook 內的文化特別之處」 | hwchiu learning note 閱讀筆記: 「Package Maintainers 應該要具備的資安概念」 | hwchiu learning note 閱讀筆記: 「如何判別到底要不要使用 Service Mesh」 | hwchiu learning note 閱讀筆記: 「透過 Helm 與 Terraform 來自動 Re-new Cloudflare origin CA」 | hwchiu learning note 閱讀筆記: 「20年工程師生涯教會我的 20 件事情」 | hwchiu learning note 閱讀筆記: 「Kubernetes 紀錄片 」 | hwchiu learning note 閱讀筆記: 「Golang 原始碼的的版本控制歷史」 | hwchiu learning note 閱讀筆記: 「大家總是喜歡誇大自己的工作時數」 | hwchiu learning note 閱讀筆記: 「ClickHouse 與 Elasticsearch 的比較」 | hwchiu learning note 閱讀筆記: 「Paypal 如何調整 Kubernetes 讓其規模達到四千節點,20萬個 Pod」 | hwchiu learning note 閱讀筆記: 「macOS 的 fsync 實作其實跟大家想像的完全不同 」 | hwchiu learning note 閱讀筆記: 「 取代 Docker Desktop 的高效率開發環境」 | hwchiu learning note 閱讀筆記: 「 Kubernetes 四種不同開發環境的比較」 | hwchiu learning note 閱讀筆記: 「 談談遷移應用程式到 Kubernetes 內的失敗經驗談」 | hwchiu learning note 閱讀筆記: 「GitHub 上常常看到的奇妙 commit 到底是什麼?」 | hwchiu learning note 閱讀筆記: 「透過一點小技巧讓你的 Makefile 有一個更好的 Help說明」 | hwchiu learning note 閱讀筆記: 「視覺化系統內 iptables 規則」 | hwchiu learning note hwchiu learning note 閱讀筆記: 「如何使用 jq 讓你的 kubectl更為強大」 | hwchiu learning note 閱讀筆記: 「PwnKit, 長達 12 年可以讓一般使用者輕鬆變成 Root 的 CVE」 | hwchiu learning note 閱讀筆記: 「Linux 5.17 將使用 BLAKE2s 來替代 SAH1 來達到更安全更快速的隨機亂數產生器」 | hwchiu learning note 閱讀筆記: 「Kubernetes 內透過 DNS-01 處理 wildcard TLS 的兩三事」 | hwchiu learning note 閱讀筆記: 「透過 Crossplane 與 ArgoCD 來達成應用程式與基礎建設的 GitOps 部署方式」 | hwchiu learning note 閱讀筆記: 「The pains of GitOps 1.0」 | hwchiu learning note 閱讀筆記: 「NPM 的 colors modules 打亂一堆人...」 | hwchiu learning note 閱讀筆記: 「2021年回顧,因為 DB 的效能的爭論所以我女友跟我分手了....」 | hwchiu learning note 閱讀筆記: 「使用 OpenKruise v1.0 提供更進階的 workload 部署與升級」 | hwchiu learning note 閱讀筆記: 「透過 Kubefarm 來自動化幫實體機器打造基於 Kubernetes in Kubernetes 的 Kubernetes 環境」 | hwchiu learning note 閱讀筆記: 「Meta 如何打造一個供多團隊使用的 SLI/SLO 設定與觀測平台」 | hwchiu learning note 閱讀筆記: 「多年工作經驗總是搞砸電話面試, why ?」 | hwchiu learning note 系統設計文,探討交友app背後的設計理念 | hwchiu learning note 2021-年度回顧 | hwchiu learning note [Cloud Design Pattern] - Ambassador 模式 | hwchiu learning note 是時候停止使用 python 3.6 | hwchiu learning note 工作20 餘年的軟體架構經驗談 | hwchiu learning note Dockerfile 內 Shell/Exec 的用法差異 | hwchiu learning note Bash 下要如何處理 Signal | hwchiu learning note Infrastructure 各種踩雷經驗 | hwchiu learning note 建置 Container Image 中的 Anti-Patterns | hwchiu learning note 又一個 0-day... | hwchiu learning note
閱讀筆記: 「基於 eBPF 的 ServiceMesh」 | hwchiu learning note
HungWei ChiuBlogger · 2022-05-11 · via hwchiu learning note Blog

標題: 「基於 eBPF 的 ServiceMesh」 類別: networking 連結: https://isovalent.com/blog/post/2021-12-08-ebpf-servicemesh

本篇文章是 2021末 由 Cilium 背後的 isovalent 公司團隊所發表的文章,主要探討一個全新的 Service Mesh 的架構可能帶來的好處,整篇文章以 Cillium + eBPF 為背景去探討 我認為如果對於 eBPF 沒有全面理解的情況下,其實只能讀懂這篇文章想要帶來的果,沒有辦法去理解到底整體實作與運作原理,同時因為 eBPF 本身的用途除了網路(Cilium)之外有愈來愈多的底層除錯工具都是透過 eBPF 的概念來實作的,因此學習 eBPF 的概念其實帶來的好處很多,有空的都推薦大家花點時間去學習。

本文主要分成幾個部分

  1. 什麼是 Service Mesh 以及目前的主流做法
  2. 聊一下 Linux 網路傳輸的歷史發展
  3. 基於 eBPF 的 Service Mesh 架構
  4. 不同架構下的差異以及可能的隱性成本

隨者分散式應用程式架構的興起,如何針對這些散落各地的應用程式提供關於網路連線方面的資訊一直以來都是維運上的問題,過往最簡單的方式就是針對各種開發環境導入相關框架 每個應用程式都需要修改來整合這些框架,但是隨者整個架構發展與要求愈來愈多,譬如開發環境有不同程式語言,甚至有不可修改的第三方應用程式,除了網路監控外還想要導入認證授權,負載平衡等各種功能 要求每個應用程式開發者引用這些框架已經沒有辦法漂亮的滿足所有需求,因此一個能夠無視應用程式本體的透明性框架架構就變成眾人追捧與渴望的解決方案。

現今大部分的 Service Mesh 就是採取這種透明性的架構,透過額外 Proxy 來攔截應用程式的封包進行後續管理與監控,使得

  1. 應用程式開發者專注自己的商業邏輯開發
  2. 第三方不可修改應用程式也可以導入這些進階網路功能

以 kubernetes 來說,目前主流都是透過 sidecar 的概念,讓每個應用程式旁邊都放一個 Proxy 的應用程式,同時基於 Pod 內 Containers 可以使用 localhost 互通的方式來處理連線。 應用程式本身都透過 localhost 打到 Proxy,而所有對外連線都讓 Proxy 幫忙處理,因此所有的進階功能都實作於該 Proxy 上。

Isovalent 認為這種方式功能面上可行,但是認為如果導入 Sidecar 其實有很多隱性成本

  1. 根據測試不管哪種 Service Mesh/Proxy 的解決方案都會使得真正連線的 Latency 提高 3~4 倍,這主因是 Linux Kernel 的架構導致,所有的網路封包 都必須要於 Linux Kernel Network Stack 來回繞行很多次,封包這種東西來回本身又會牽扯到 Context Switch, Memory Copy 等各種成本,所以整體 Latency 的提升是不可避免的。
  2. 系統的額外資源需求,每個 Pod 都需要一個額外的 Proxy 來處理,以一個 500 節點,同時每個節點都有 30 Pod 來說,整個環境就要額外部署 15,000 的 Proxy 的 Container,每個 Container 消耗 50MB 就至少要額外 750G 的記憶體, 同時也要注意隨者 Pod/Node 等數量增加,每個 Proxy 可能就需要更多的記憶體來維護這些 Mesh(網格) 之間的資訊,因此使用的 Memory 量只會愈來愈多。

所以 Cillium/Isovalent 想要引入基於 eBPF 的架構來打造一個不同架構的 Service Mesh。透過 eBPF 的架構使得整個 Service Mesh 的發生點是發生於 Kernel 階段,而非一個獨立的 Uses Proxy。 這邊帶來的改變有

  1. 基於 eBPF 的特性,其本身就有辦法針對系統上所有 Socket 去執行特定的函式,所以 Cillium 就可以偷偷去修改應用程式的網路流量,不論是修改封包內容,偵錯與監控等都可以達到
  2. 不需要如同之前一樣每個 Pod 都部署一個獨立的應用程式,取而代之的是撰寫通用的 eBPF 程式來提供各種功能
  3. 由於所有的事情都發生於 Kernel,甚至可以達到基於 Socket-level 的封包處理,所以封包不需要繞來繞去,整個處理的路徑非常的短,因此產生的 Latency 非常的小

非常對於這系列戰爭有興趣的人花點時間去把 eBPF 的概念補齊,接下來針對這系列的大戰與討論就能夠有更多的背景去理解