当前位置:网站首页>Extension and customization of Istio
Extension and customization of Istio
2022-08-06 12:32:00 【51CTO】
1, Istio and Kubernetes decoupling
For non-Kubernetes environments and no plans to migrate to Kubernetes for a long time, there is no need to use Istio-based Service Mesh solutions.However, if it is a multi-platform support scenario, for example, there are both Kubernetes environment users and non-Kubernetes environment users in the customer, in this case, Istio can be customized and modified to remove the strong coupling to Kubernetes and add support for other platforms..
The coupling of Istio to Kubernetes mainly includes the following aspects, so it needs to be adapted and modified in a targeted manner.
- API resource management is dependent on Kubernetes API Server
Resource management is where Istio relies most on Kubernetes.Istio's management of core resources is based on Kubernetes CRD, and uses kubectl as the command line operation entry, kubectl will call API Server, store resources in etcd, and trigger resource change event notifications through the Kubernetes CRD mechanism to notify careThe module of the Istio resource change event handles it accordingly.
Kubernetes provides a complete set of API resource management mechanisms through kubectl, API Server, etcd and Kubernetes CRD components, including resource additions, deletions and changes and resource change notifications.To bind Istio to Kubernetes, it is necessary to implement this set of API management methods by itself, and be platform-independent.
- Reliance on kube DNS at the communication access level
At the communication level, before the client sends a request, the virtual IP address of the service is obtained through DNS. Istio's DNS implementation follows the Kubernetes DNS solution (Kubernetes DNS is the key to Kubernetes network management.One ring), based on DNS, you can directly access the service through the service name.Therefore, at the communication level, it is necessary to decouple from Kubernetes at the DNS solution level and use a platform-independent DNS solution.
2. Platform-independent Istio support scheme
As the control plane, Istio mainly manages the service information and configuration information of the data plane Envoy. Therefore, the platform-independent Istio support solution mainly needs to provide a platform-independent configuration management center andService Registry.
Consul is an open source project for managing the configuration and service discovery of distributed systems. Compared with other distributed service discovery solutions such as ZooKeeper and etcd, Consul provides a one-stop solution.Built-in service discovery, health check, key/value storage, multi-data center solution, REST API interface and many other features.It is recommended to use Consul as a platform-independent configuration center and service discovery solution. Istio currently also provides basic support for Consul, but it is not yet mature, so it cannot be directly applied to the production environment.
3. RPC protocol extension support
Envoy currently focuses on providing support for HTTP1 and HTTP2, while support for the RPC protocol is still weak.In terms of RPC protocol, although support for Thrift protocol and Dubbo protocol is currently provided, the level of support is very weak, and it does not support common link management features, so they are not suitable for use in production environments.
If you need to add the corresponding RPC protocol extension to Envoy, you can refer to the specific implementation of the Thrift protocol under Envoy. First, define the Network Filter plug-in corresponding to the RPC protocol and register it statically through RegisterFactory.
In the entry function createFilterFactoryFromProtoTyped that must be implemented by the plug-in, the analysis of the corresponding configuration of the plug-in can be realized, such as routing-related configuration, and the plug-in protocol processing function must be registered with the filter manager through addFilter.
The specific protocol parsing logic is implemented in the OnData function of the plug-in, and the parameters required for routing are parsed, so that the corresponding Upstream node can be selected through the configured routing strategy, and then the Upstream node can be called to performdeal with accordingly.
边栏推荐
- SQL图解面试题:人均付费如何分析?(分组、条件汇总)
- Nacos启动失败:Nacos Server did not start because dumpservice bean construction failure:No DataSource set
- 顶象首期业务安全月报来了!
- SQL图解面试题:如何找到喜欢的电影?(表连接,语句执行顺序、模糊查询)
- Week 7 Learning Representation with Auto-Encoder(无监督学习)
- QT: Using custom signals and slots
- VS Code 调试中显示变量内容快捷键
- EOS密钥被盗后如何恢复?
- “恰好装满求最值”背包问题的初始化解析
- Application Practice of Distributed Lock | Microservices apply for incremental and non-repetitive numbers
猜你喜欢

Ansible自动化运维、ZABBIX监控

Wang Shuang Assembly Language Chapter 6: Programs Containing Multiple Segments

多重背包问题 ← 规模小时可转化为0-1背包问题

SQL图解面试题:人均付费如何分析?(分组、条件汇总)

PS6603 代理直销Type-C PD 电源传输接收 SINK 端控制器芯片

PS6652+JD6606S_2C 35W双C口PD协议方案

哈希表 | 快乐数 | leecode刷题笔记
How does MySQL implement multi-table query?
产品经理需求池管理

链表 | 双指针法 | 删除链表的倒数第 N 个结点 | leecode刷题笔记
随机推荐
Link Aggregation Brief
分布式架构网络通信
苏秋贵:谷歌广告投放带来的长期效益
分布式锁的应用实践 | 微服务申请逐渐递增且不重复的号码
Kubernetes 虚拟机部署弊端
【SSL集训DAY1】B【动态规划】
用代码画时序图!YYDS
链表 | 双指针法 | 删除链表的倒数第 N 个结点 | leecode刷题笔记
PHP fopen write file content
GD32E103 USB official library + STM32CubeMX
PS6603-USB PD 协议 SINK 端输出控制器芯片
微服务架构 | 分布式事务 - [Seata]
产品经理需求池管理
How to find stills?Where can I get HD resources?It's too late to meet these 9 website channels!original
Flexible and easy-to-use sql monitoring script part4
【cookie & & session】
明德扬FmcAd9144 产品说明书
软件设计原则
NASA suspends all spacewalks on the International Space Station due to safety issues with spacesuits
1408. String Matching in Arrays: Simple Simulation Questions