绕过conntrack,使用eBPF增强 IPVS优化K8s网络性能at PREROUTING chain • SNAT at POSTROUTING chain • Pros • Iptables is widely adopted in popular Linux distributions • Cons • O(N^2) in control plane / O(N) in data plane • Poor in scheduling algorithm service? • Not mature enough eBPF brief • Write C • Compile into eBPF assembly code • Inject to kernel • Attach to network tc hooks • Triggered by ingress/egress packets IPVS bypass conntrack • Why efficient and secure • V.S Taobao IPVS SNAT patch • Bypass conntrack/iptables • Less modification to kernel Comparison with industry • Pitfalls • Performance of clusters of the same configure may differ0 码力 | 24 页 | 1.90 MB | 1 年前3
sealos 以 kubernetes 为内核的云操作系统Kubernetes是云操作系统内核,整个集群是一个整体 Sealos是云操作系统发行版本 Linux发行版,如redhat Linux kernel CPU 内存 磁盘 Linux发行版,如redhat Linux kernel CPU 内存 磁盘 Linux发行版,如redhat Linux kernel CPU 内存 磁盘 有了 sealos 就可以一条命令构建一朵云 抛弃 IaaS IaaS PaaS SaaS 拥抱 云内核 架构 传统云计算架构 基于云内核的云计算架构 SaaS PaaS IaaS 分层架构代表 openstack 内核架构代表 linux 我快黄了 我经久不衰 我一锅大杂烩 我高内聚高抽象 我装起来都费劲 我一键安装 我运行起来一堆问题 我小白都能稳定运行 我一堆模块 我大道至简海纳百川 不求最好,但求最贵 优秀还便宜 你真的需要虚拟机?真的需要 用户态内核态反复横跳 在 Sealos 上使用 GPU 在 Sealos 上利用 Cilium + BPF 实现流量统计 Slide source credit to: How to Make Linux Microservice-Aware with Cilium and eBPF (InfoQ, 2019) 集群生命周期管理 创建集群 装其它应用 增删集群节点 离线交付 sealos0 码力 | 29 页 | 7.64 MB | 9 月前3
K8S安装部署开放服务升级&配置 centos7 Step1. 升级 linux 内核 uname –r wget https://cbs.centos.org/kojifiles/packages/kernel/4.9.220/37.el7/x86_64/kernel-4.9.220-37.el7.x86_64.rpm rpm -ivh kernel-4.9.220-37.el7.x86_64.rpm device-mapper-persistent-data lvm2 # 添加 yum 源 yum-config-manager --add-repo https://download.docker.com/linux/centos/docker-ce.repo # 查看 docker-ce 安装包 yum list | grep docker-ce # 安装 docker-ce yum install "max-size": "100m" }, "storage-driver": "overlay2", "storage-opts": [ "overlay2.override_kernel_check=true" ] } systemctl restart docker Step2: 安装 k8s # 添加 yum 源 cat <0 码力 | 54 页 | 1.23 MB | 1 年前3
多租户Kubernetes VM Solutions for Multi-Tenant ApplicationsOthers Why We Run VM on Kubernetes? • Traditional Applications • No linux based Applications • Functions provided by host kernel are not satisfied • OpenStack is too complex • Unified infrastructure gVisor is a user-space kernel that implements a substantial portion of the Linux system surface https://github.com/google/gvisor Why does gVisor exist? ü a single, shared kernel also mean that container container escape is possible ü gVisor implements Linux by way of Linux ü another approach to enhance container isolation gVisor is special Machine-level virtualization Rule-based execution gVisor0 码力 | 33 页 | 3.34 MB | 1 年前3
运维上海2017-Kubernetes 在大规模场景下的service性能优化实战 - 杜军��iptables������� IPVS��Service���� Iptables vs. IPVS Iptables�:�� • �������������Netfilter���� Xtables ����linux������ ��E��Iptables��� Iptables����������� • IptablesU������� Ø DNAT��IPP��oI�X iptables -t nat SVC-*������service��������� ��������O(N) • �B���� ���� • ���� �������iptables�������/�������kernel lock Another app is currently holding the xtables lock. Perhaps you want to use the -w option? Iptables��Service���� ��iptables������� IPVS��Service���� Iptables vs. IPVS ���IPVS�IP Virtual Server� • Linux�����L4 LB�LVS������� • ��netfilter, hash table • ��TCP, UDP�SCTP���IPV4�IPV6 • ���������� Ø rr0 码力 | 38 页 | 3.39 MB | 1 年前3
k8s操作手册 2.3集装箱 kubernetes 舵手,领航员 helm 舵轮,驾驶盘 chart 图表,海图 ①k8s对系统要求 linux内核在3.10及以上,服务器规格2核cpu,2G内存及以上,可以装在虚拟机 里,也可以装在实体机上 ②规划主机名及ip k8s的服务器使用固定ip地址,配置主机名,要求能解析相应的主机名(master /etc/yum.repos.d/ # wget h�ps://mirrors.aliyun.com/docker-ce/linux/centos/docker-ce.repo #aliyun的源 或者: h�ps://download.docker.com/linux/centos/docker-ce.repo #官方的 源 然后在/etc/yum.repos $basearch baseurl=h�ps://mirrors.aliyun.com/docker-ce/linux/centos/7/$basearch/stable enabled=1 gpgcheck=1 gpgkey=h�ps://mirrors.aliyun.com/docker-ce/linux/centos/gpg # yum install containerd.io -y #0 码力 | 126 页 | 4.33 MB | 1 年前3
第29 期| 2023 年9 月- 技术雷达语法性别 API 101. htmx 102. Kotlin Kover 103. LangChain 104. LlamaIndex 105. promptfoo 106. Semantic Kernel 107. Spring Modulith 暂缓 — 工具 语言和框架 © Thoughtworks, Inc. All Rights Reserved. 技术 1 21 29 33 相比,它更轻量、更快速并且更容易部署和使用。这个工具仍在开发阶段,所以目前功能较少,但其简洁和速 度已经显示出了它的巨大潜力。您也可以使用 OrbStack 在 macOS 上创建和管理 Linux 虚拟机。 81. Pixie 评估 Pixie 是一个用于 Kubernetes 原生应用程序的可观察性工具。它通过利用 eBPF 从多个 数据源 自动地采集遥测 数据,以一种有趣的方式 语法性别 API 101. htmx 102. Kotlin Kover 103. LangChain 104. LlamaIndex 105. promptfoo 106. Semantic Kernel 107. Spring Modulith 暂缓 — 1 21 29 33 34 35 36 37 38 39 40 41 30 31 32 4 5 16 220 码力 | 43 页 | 2.76 MB | 1 年前3
腾讯云 Kubernetes 高性能网络技术揭秘——使用 eBPF 增强 IPVS 优化 K8s 网络性能-范建明post-routing阶段做SNAT • 每个service 添加一条或多条rules。使用数组管理rules。 • 仅支持随机的调度算法 • kube-proxy代码实现比较简单 • iptables 在linux 已经广泛部署 优势 iptables mode 不足之处 • 控制平面的时间复杂度是O(N^2), 当service达到上千时,修改rule耗时超过半小时。 • 数据平面的时间复杂度是O(N) -> ip_finish_output • 修改成: • 对kenel 做了hack,直接访问ip_finish_output IPVS 绕过conntrack 技术创新点二 • 在linux traffic control上挂一段eBPF 代码,在网卡出报文之前做SNAT • 尽量将大部分代码放在eBPF中,方便升级和维护。 • eBPF loader 创建eBPF map时,将map的id 围,加了一个大循环,插入失败会重新分配lport。 06 未来的工作 未来的工作 • 适配更多的linux 发行版本 • Tencent linux , ubuntu, centos • 独立开源 • 内核修改在github.com/Tencent/TencentOS-kernel/ THANK YOU 感谢聆听 Jianmingfan 腾讯云 了解更多云原生技术和动态,请关注腾讯云原生公众号0 码力 | 27 页 | 1.19 MB | 9 月前3
运维上海2017-Kubernetes与AI相结合架构、落地解析-赵慧智• 快速部署应用程序 • 弹性负载均衡 • 无缝升级应用 • 硬件隔离 Kubernetes 介绍 LXC (Linux Container) 介绍 在单一系统的内核层通过一套 API 在应用层提供硬件及软 件环境隔离的 Linux 环境(containers 。在内核层,通过 cgroup 来提供硬件环境的隔离(例如 CPU,Memory, Block I/O,网络等等 I/O,网络等等 和通过 namespace 来提供软件层面 的隔离(例如 process tree,网络,user IDs 和挂载的文件 系统 。 Container 框架 通过在 Kernel 层面提供的 API 来达到上层可以容器化应 用程序。 Container VS VM (Virtual Machine) 由于采用系统当前的内核,Container会启动加载更快,更 轻量,并且更省资源。 • 同一个 Image 会有版本记录。 • 只包含软件环境的配置 • 硬件配置需要运行时去指定 OCI (Open Container Initiative) • From Linux Foundation • 旨在为 Container 格式和运行时创建开放行业标准。 • 该组织于2015年6月22日由Docker,CoreOS等 Container 行 业的领导人推出。0 码力 | 77 页 | 14.48 MB | 1 年前3
Amazon Elastic Kubernetes Service (EKS) 初探秘multi-tenancy requirements • gotchas: Linux packages/CVEs, leaks, GDPR (in Europe) • runtime/standards (OCI) • immutability of images • all containers share a kernel (mitigation: Firecracker) • gotchas:0 码力 | 39 页 | 1.83 MB | 1 年前3
共 33 条
- 1
- 2
- 3
- 4













