运维 Airbnb 的微服务架构

allenlsy · 2018年07月30日 · 最后由 springwq 回复于 2018年07月30日 · 7742 次阅读

软广我的博客:http://allenlsy.com/airbnb-microservices-architecture

微信订阅号:网站架构札记


原文:From Monorail to Monorepo: Airbnb’s journey into Microservices

Airbnb 最开始是一个 single repo Ruby on Rails 项目。前端用过 backbone 和 react,后端有 Ruby 和 Java。

2014 年之前的 deployment workflow 是:

  • Code review & CI
  • merge to master
  • staging, manual test
  • production

用于支持 deploy 的内部项目:

  • deployment dashboard
  • SCRAM: rollback system, error tracking,类似于 bugsnag 和 honeybadger
  • merge queue:确保 merge to master 是有序的

随着这个 single repo project 不断变大,Airbnb 开始采用 microservices architecture。

  • 拆分为 前端 和 后端 两个部分

  • 前端使用 react,但 page 是使用 server side rendering 传回给前端的

后端

  • Airbnb 有 700+ 个 microservices
  • synchronous communication 使用 thrift schema,比 json 的格式要求更严谨
  • asynchronous communication 使用 kafka

架构中使用的工具

  • service generation:用于新开一个 service。自带 thrift 配置
  • 所有配置文件放在一个 repo
  • deployment with Kubernetes
  • microservice 测试工具
  • infrastructure as code, using Kubernetes, Amazon EKS

原文的 talk 值得推荐

需要 登录 后方可回复, 如果你还没有账号请 注册新账号