Apache APISIX How to implement plugin orchestration in API GatewayNative Support: Lua plugins • Few developers are familiar with Lua • Solution:Go plugin Envoy • C++ filter:difficult to get started • Lua filter:Few features, few developers can write Lua • Solution:WASM,not DAG,generate AST(Abstract Syntax Tree) • Generate Lua codes from AST • https://github.com/api7/jsonschema Step 3 • Apache APISIX watch and sync Lua code from etcd(like serverless plugin) More • Open no longer the traditional functions of Nginx and F5 • Open source projects blooming:BFE、MOSN Low Code • PM can directly implement features by plugin orchestration • developers pay more attention to core0 码力 | 28 页 | 1.19 MB | 6 月前3
API7 ⽹关技术⽩⽪书规则将请求转发⾄上游服务。 此外,借助API7内置的50多种插件,可实现⾝份验证、安全防护、流量控制、分析监控、请求/响应 转换等常⻅业务需求;若内置插件⽆法满⾜需求,我们也⽀持使⽤Lua、Java、Go、Python语⾔⾃ 定义插件,可作⽤于请求进⼊、上游响应各个阶段。 ManagerAPI 2. ⽤于管理API⽹关,通过访问其暴露的RESTfulAPI接⼝以实现对路由、上游、证书、全局插件、消 board控制⾯板以可视化形式操作⽹关,⽀持监控分析、⽇ 志审计、多租⼾管理、多集群切换、多⼯作分区等能⼒。 1.1技术架构 数据平⾯ 1. 数据平⾯⽤于接收并处理调⽤⽅请求,使⽤Lua与Nginx动态控制请求流量。当请求进⼊时,将根据 预设路由规则进⾏匹配,匹配到的请求将被⽹关转发⾄对应上游服务。在此过程中,⽹关有能⼒根据 预设规则中不同插件的配置,使⽤⼀系列插件对请求 板,可⽅便、清楚地完成相关功能设置; • ⾃定义插件:API7内置了50多种插件,涵盖安全防护、流量控制、⽇志记录等各个分类,可满⾜ 绝⼤多数企业需求。对于特定业务,API7⽬前⽀持Lua、Java、Go、Python编写⾃定义插件, 且插件可以作⽤于流量进出的各个阶段。得益于全动态能⼒,新增、修改插件⽆需停机重启,可实 时⽣效,避免中断业务; • 分析监控:API7内置0 码力 | 19 页 | 1.12 MB | 1 年前3
10-APISIX 与 SkyWalking 的最佳实践-王院生share dict Nginx + Lua http(s) ⼆次优化实践 ⼆次优化实践 - ⾼性能调优利器,⽕焰图 ⼆次优化实践 - 去掉不必要的共享内存交换 rewrite phase bodyfiler phase log phase init worker phase background timer client Lua table Nginx + Lua http(s) rewrite init worker phase background timer client share dict Nginx + Lua http(s) ⼆次优化实践 ➤ Nginx 性能很⾼,⽽⾼性能的代码有时候是不优雅的 ➤ reuse the temporary Lua table object ➤ use `ngx.var.http_****` to fetch specific header ,后⾯会有更好表现 ➤ PR:https://github.com/apache/skywalking-nginx-lua/pull/49 为什么要参与开源项⽬ “懂王下线,赌王上线” 懂王下线,赌王上线 [bug] SkyWalking-nginx-lua0.3.0 traceid repeat all the time: https://github.com/apa0 码力 | 29 页 | 7.43 MB | 6 月前3
Istio Security Assessmentits control plane. The goal of the assessment was to identify security issues related to the Istio code base, highlight high risk configurations commonly used by administrators, and provide perspective areas of focus for subsequent phases of the assessment. A test plan was created which matched areas of code with specific security controls (e.g. service discovery, certificate lifecycle, side car injection) architectures were used to provide testers with a way of validating that security expectations in the code were implemented when deployed. Each environment was deployed following Istio Documentation using0 码力 | 51 页 | 849.66 KB | 1 年前3
Leveraging Istio for Creating API Tests - Low Effort API Testing for Microservicesr trace: r trace: r trace: r CI Pipeline | CONFIDENTIAL 9 Process flow using Istio Deploy Lua filters (kubectl apply -f) Capture traces for E2E test requests Create tests & mocks Capture API interactions with lua filters Service A Proxy Proxy Service B Service C Proxy Mesh Dynamics Data Store Deploy: kubectl apply -f Capture using Lua filter All API data + TraceIDs API request • Context propagation rarely obvious Challenge • Dependencies require lot of time to code • Many dependencies in a test suite • Dependency maintenance is effort intensive Solution • ML-driven 0 码力 | 21 页 | 1.09 MB | 1 年前3
How HP set up secure and
wise platform with Istiolisteners in all sidecars Or Istio gateway The Lua code that Envoy will execute. Which port number the filter will apply to #IstioCon Wise Platform – lua #IstioCon Wise Platform Using envoyfilter to0 码力 | 23 页 | 1.18 MB | 1 年前3
Apache APISIX 在金山办公的开发和落地实践Apache APISIX 在金山办公的开发和落地实践 张强 金山办公 01 前情回顾&增补 02 关于 OpenResty 和 Lua 的思考 03 基于 Apache APISIX 破局 04 解决 Nginx 带来的问题 CONTENT W r i t e h e r e S o m e t h i n g a b o u t 前情回顾 & 增补 01 About •金山办公云原生应用组流量网关 o u t 关于 OpenResty 和 Lua 的思考 一个菜鸟的视角 02 关于 OpenResty 和 Lua 的思考 Lua 适合 “ 平均水平 ” 的大团队做大工程吗 •动态类型语言 •网关产品对 runtime error 容忍度比较低 •Lua 开发环境,特别是 OpenResty 相关的比较弱 •难招人,后端开发转 lua 成本高昂 “A programming language applications” Wikipedia - Lua 关于 OpenResty 和 Lua 的思考 Nginx 的设计给 “ 平均水平 ” 终端开发者带来的问题 •多进程模型 + 异步 •线上问题难以调试 •多进程间同步效率低 •以nginx-lua-prometheus为例 (https://github.com/knyar/nginx-lua-prometheus/issues/107)0 码力 | 27 页 | 4.88 MB | 1 年前3
1.3 MOSN 在云原生的探索及实践为什么做 用户痛点 • east-west、north-south Gateway 技术栈不统一, 维护成本高 • Envoy C++ 编写,对于 业务方来说开发门槛高 技术趋势 • Lua extension • WASM extension • External-proc extension 可扩展性、灵活性、生态 价值意义 • 技术共享,融合 Envoy 和 MOSN GoLang 社区生态粘性 MOE Envoy 和 GoLong 生态打通 维护成本高、可扩展性弱 MoE 背景介绍 — 方案调研 方案名称 优势 劣势 Lua Extension Lua 编写简单业务处理方便 Lua 脚本语言,开发复杂功能不 方便;支持的库(SDK)相对较 少 WASM Extension 跨语言语言支持 (C/C++/Rust)、隔离性、安 全性、敏捷性 处于试验阶段,性能损耗较大; 成本 生态 Lua Extension 高 高 高 较低 WASM Extension ES 低 高 活跃 External Processing Filter 高 低 中 N MOSN(GoLang) Extension 高 较高 低 活跃 对比:MOE 相比 ext-proc 无需跨进程 gRPC,性能高,易管理; 相比 WASM 无需网络 IO 操作转换成本;相比 Lua 生态好、能0 码力 | 36 页 | 35.61 MB | 1 年前3
01. MOSN 高性能网络扩展实践 - 王发康为什么做 用户痛点 • east-west、north-south Gateway 技术栈不统一, 维护成本高 • Envoy C++ 编写,对于 业务方来说开发门槛高 技术趋势 • Lua extension • WASM extension • External-proc extension 可扩展性、灵活性、生态 价值意义 • 技术共享,融合 Envoy 和 MOSN 和 GoLang 社区生态粘性 MoE Envoy 和 GoLong 生态打通 维护成本高、可扩展性弱 MoE 背景介绍 — 方案调研 方案名称 优势 劣势 Lua Extension Lua 编写简单业务处理方便 Lua 脚本语言,开发复杂功能不方便 支持的库(SDK)相对较少 WASM Extension 跨语言语言支持(C/C++/Rust)、 隔离性、安全性、敏捷性 处于试验阶段,性能损耗较大; 性能 成本 生态 Lua Extension 高 高 高 较低 WASM Extension ES 低 高 活跃 External Processing Filter 高 低 中 N MOSN(GoLang) Extension 高 较高 低 活跃 对比:MoE 相比 ext-proc 无需跨进程 gRPC,性能高;相比 WASM 无需 网络 IO 操作转换成本;相比 Lua 生态好、能复用现有的0 码力 | 29 页 | 2.80 MB | 1 年前3
Envoy原理介绍及线上问题踩坑onNewConnection新连接建立,可以决定是否拒绝 • onData处理连接数据到达 • onWrite处理连接数据发送 • L7 HTTP过滤器 • 修改HTTP请求头,限流处理,Lua扩展、WASM扩展、开发调试支持、压缩、元数据交换、 路由等。 • decodeHeaders处理HTTP请求头部 • decodeData处理HTTP请求数据 • decodeTrailers处理HTTP请求结束位置 L4网络过滤器 专门用于处理HTTP请求的网络过滤器,根据协议类型 处理HTTP编解码并调用L7层HTTP过滤器。 envoy.filters.http.lua L7 HTTP过滤器 基于Lua脚本语言,处理HTTP请求及相应,每个Lua运 行时运行在工作线程中。 envoy.filters.http.local_ratelimit L7 HTTP过滤器 基于L4层请求限流,通过令牌桶防止定期时间间隔内 Envoy采用每个工作线程独立处理网络及定时器事件,线程间无数据共享,提升性 能。 过滤器架构 Envoy采用可扩展插件架构实现监听过滤器、L4网络过滤器、L7 HTTP过滤器;同时 支持基于L4/L7 WASM及L7 Lua过滤器的二次扩展。 版权所有©2021,华为技术有限公司,保留所有权利。 本资料所有内容仅供华为授权的培训使用,禁止用于任何其他用途。未经许可,任何人 不得对本资料进行复制、修改、改编、也不得将本资料或其任何部分或基于本资料的衍0 码力 | 30 页 | 2.67 MB | 1 年前3
共 353 条
- 1
- 2
- 3
- 4
- 5
- 6
- 36













