Posted in

优化 Uber 的持续部署:在大规模多项目单一代码库中自动化微服务部署_AI阅读总结 — 包阅AI

包阅导读总结

1.

关键词:Uber、Continuous Deployment、Microservices、Monorepos、Automation

2.

总结:Uber 分享了优化微服务连续部署的经验,面临大规模单体库的挑战,通过重新设计系统(Up CD),提高了自动化程度和安全性,使自动部署服务的比例大幅上升,生产事故率下降。

3.

主要内容:

– Uber 面临微服务连续部署挑战,其架构包含大量服务,需求可靠高效的部署系统。

– 早期部署系统存在规模、标准化和安全问题,手动干预多,缺乏统一标准。

– 2022 年启动项目重新设计 CD 流程,推出 Up CD 系统。

– 与内部平台和工具集成,优化部署,按提交影响服务部署。

– 有统一提交流和安全检查,用户界面友好。

– Up CD 成效显著。

– 自动部署服务比例大幅提升,生产事故率下降。

– 应对新风险,如共享代码变更的部署风险。

– 其他公司也有类似优化开发流程的举措。

思维导图:

文章地址:https://www.infoq.com/news/2024/09/uber-continuous-feployment/?utm_campaign=infoq_content&utm_source=infoq&utm_medium=feed&utm_term=global

文章来源:infoq.com

作者:Claudio Masolo

发布时间:2024/9/7 0:00

语言:英文

总字数:617字

预计阅读时间:3分钟

评分:87分

标签:持续部署,微服务,多项目单一代码库,DevOps,自动化


以下为原文内容

本内容来源于用户推荐转载,旨在分享知识与观点,如有侵权请联系删除 联系邮箱 media@ilingban.com

In a recent post, Uber shared how the development team manage the continuous deployment of the microservices, tackling challenges of working with large monorepos.

Uber’s microservices architecture, consisting of thousands of services, requires a reliable and efficient system for deploying updates, security patches, and new features. To ensure this process is safe and timely, Uber embraced continuous deployment (CD), automating deployments to production. This has been essential for maintaining code quality and minimizing delays in delivering changes. However, as Uber’s codebase and service demands grew, the existing deployment system faced challenges related to scale, standardization, and safety, particularly within large monorepos that housed multiple microservices.

Uber recognized the need for a more streamlined and automated continuous deployment system. In 2022, the company undertook a project to redesign its CD process, aiming to create a more uniform and automated solution for deploying microservices. At the time, Uber was managing around 4,500 microservices across three monorepos, processing 5,600 commits and 7,000 deployments weekly. Yet, only 7% of these services were automatically deployed using CD, with many deployments requiring manual intervention. This decentralized and highly flexible system led to inefficiencies and safety risks, particularly as there were over 100 unique deployment templates with no company-wide standards.

The newly designed system, named Up CD, was designed to improve automation and safety. It is tightly integrated with Uber’s internal cloud platform and observability tools, ensuring that deployments follow a standardized and repeatable process by default. The new system prioritized simplicity and transparency, especially in managing monorepos. One key improvement was optimizing deployments by looking at which services were affected by each commit, rather than deploying every service with every code change. This reduced unnecessary builds and gave engineers more clarity over the changes impacting their services.

The architecture of the CD system.

Up introduced a unified commit flow for all services, ensuring that each service progressed through a series of deployment stages, each with its own safety checks. These conditions included time delays, deployment windows, and service alerts, ensuring deployments were triggered only when safe. Each stage operated independently, allowing flexibility in customizing deployment flows while maintaining safety. This new approach reduced manual errors and provided a more structured deployment experience.

A critical part of Up CD’s success was its user-friendly interface, which gave engineers an intuitive view of their service’s commit history and deployment state. The interface collapsed non-essential commits, making tracking changes and identifying potential issues easier. Engineers could also see real-time updates on the status of deployments, allowing them to quickly identify which commits had been deployed and to which environments.

Collapsed view of commit history

Since launching Up CD, Uber has seen a dramatic increase in the automation of service deployments. The percentage of services deployed automatically rose from under 10% to nearly 70% within a year. Despite the increased frequency of deployments, the rate of production incidents dropped by over 50% per 1,000 code changes, highlighting the system’s ability to safely manage more frequent deployments. However, the increased speed of deploying changes, especially those affecting shared code in monorepos, introduced new risks. Uber addressed these by staggering the deployment of such changes across service tiers, halting deployments if issues arose in the lower-priority services.

Working with monorepos is challenging, also other tech companies developed their own internal tools to improve the development process, like TikTok that releases Sparo a tool to optimize the performances of git operations for large monorepos.

In conclusion, Uber’s revamped continuous deployment system has successfully automated and standardized deployments at scale, significantly increasing the safety, efficiency, and transparency of deploying microservices. By integrating tightly with existing tools and prioritizing automation, Up CD has enabled Uber to handle rapid growth while minimizing production incidents.