我们如何在Uber的各系统中统一配置分配
Uber has multiple, domain-specific products to manage and distribute configuration changes at runtime across our many systems. These configuration products cater to different use cases: some have a web UI that can be used by non-engineers to change product configuration for different cities, and others expose a Git-based interface that primarily caters to engineers.
Uber有多个特定领域的产品,在运行时管理和分发我们许多系统的配置变化。这些配置产品迎合了不同的使用情况:有些产品有一个网页用户界面,非工程师可以使用它来改变不同城市的产品配置,而其他产品则暴露了一个基于Git的界面,主要是为了迎合工程师。
While these domain-specific configuration products have different applications, they share common parts that can be consolidated for simplicity and to reduce the overhead of operations, maintenance, and compliance. This article will cover how we consolidated and streamlined our underlying configuration and rollout mechanisms, including some of the interesting challenges we solved along the way, and the efficiencies we achieved by doing so.
虽然这些特定领域的配置产品有不同的应用,但它们有共同的部分,可以通过整合来实现简单化,并减少运营、维护和合规的开销。本文将介绍我们是如何整合和精简我们的底层配置和推出机制的,包括我们在这一过程中解决的一些有趣的挑战,以及我们通过这样做实现的效率。
Configuration System Definition
配置系统的定义
Taking a step back, because our existing systems were so spread out and bespoke, we needed to first define a configuration system, so we could reduce the duplication of the common parts among them.
退一步讲,由于我们现有的系统是如此分散和定制的,我们需要首先定义一个配置系统,这样我们就可以减少它们之间共同部分的重复。
At a high level, configuration systems commonly consist of at least these 5 parts:
在高层次上,配置系统通常至少由这5个部分组成。
- A configuration store used to store configuration
- 一个用于存储配置的配置库
- A generator that maps the configuration store into a consumable form
- 一个生成器,将配置存储映射成可消费的形式
- A distribution pipeline that transfers generated configurations to downstream consumers
- 将产生的配置传输给下游消费者的分配管道
- A rollout mechanism that ensures that the distribution is executed safely, including policies to monitor specific configuration changes (i.e., what is their impact on a given availability zone), and triggers for rollbacks
- 确保分发安全执行的推出机制,包括监控特定配置变化的策略(即它们对特定可用区的影响),以及回滚的触发器
- Configuration clients that consume generated conf...