改善特使航线变更的体验

In a microservice world, significant route configuration changes to the front proxy are often required to keep up with an evolving business. Making these route configuration changes easily manageable and testable quickly becomes a challenging issue with the number of developers needing to make changes and the frequency of these changes.

在微服务领域,经常需要对前台代理进行重大的路由配置变更,以跟上不断发展的业务。随着需要改变的开发人员的数量和这些改变的频率,使这些路由配置的改变容易管理和可测试性迅速成为一个具有挑战性的问题。

The Old Way

旧的方式

At Lyft, developers used to create Envoy route configurations, specifically Route Discovery Service (RDS) responses, in JSON by leveraging Jinja. These were subsequently uploaded to S3 and consumed by the control plane.

在Lyft,开发人员曾经利用Jinja在JSON中创建Envoy路由配置,特别是路由发现服务(RDS)响应。这些配置随后被上传到S3,并被控制平面所使用。

We also used the Envoy OSS route check tool to verify those generated route JSON files.

我们还使用Envoy OSS路由检查工具来验证那些生成的路由JSON文件。

A New Approach

一种新的方法

To avoid directly updating the route configuration in JSON and decouple developers’ inputs from the Envoy API, we introduced our own protobuf for route configurations. This allowed us to have finer-grained control on the Envoy features we need to support at Lyft.

为了避免直接更新JSON中的路由配置,并将开发者的输入与Envoy API解耦,我们为路由配置引入了自己的protobuf。这使我们能够对我们需要在Lyft支持的Envoy功能进行更精细的控制。

After the route configurations are changed in protobuf, they are first converted into JSON and then uploaded to S3. Eventually, the control plane reads the JSON files from S3, materializes them into RDS responses, and finally delivers the configurations to the Envoy sidecar.

在protobuf中改变路由配置后,首先将其转换为JSON,然后上传到S3。最终,控制平面从S3读取JSON文件,将其具体化为RDS响应,并最终将配置交付给Envoy sidecar。

Additionally, as the implementation of the route check tool is straightforward, simple enough to maintain in-house, and can be updated easily to catch up with improvements to the open source (OSS) version, we chose to replace the OSS route check tool with an in-house version that consumes our internal protobuf format. This saves developers’ time by allowing them to to run the route-check unit tests locally without c...

开通本站会员,查看完整译文。

首页 - Wiki
Copyright © 2011-2024 iteam. Current version is 2.124.0. UTC+08:00, 2024-05-01 22:19
浙ICP备14020137号-1 $访客地图$