Rewriting Uber Engineering: The Opportunities Microservices Provide

Emily Reinhold
9 min readadvanced
--
View Original

Overview

The article discusses Uber's transition from a monolithic architecture to a microservices architecture, highlighting the implementation of Tincup, a currency and exchange rate service. It outlines the processes, technologies, and lessons learned during this significant engineering effort.

What You'll Learn

1

How to implement a Request for Comments (RFC) process for new services

2

Why using an asynchronous framework like Tornado can prevent blocking I/O issues

3

How to utilize uContainer for resource isolation in microservices

Prerequisites & Requirements

  • Understanding of microservices architecture
  • Familiarity with asynchronous programming frameworks(optional)

Key Questions Answered

What is the purpose of the Request for Comments (RFC) process at Uber?
The RFC process at Uber is designed to solicit feedback on new services, ensuring quality and preventing duplicate efforts. It allows engineers to discuss the service's purpose, architecture, and dependencies before development begins, fostering collaboration and improving service design.
How does Tincup handle currency and exchange rate data?
Tincup serves as the interface for up-to-date currency and exchange rate data, providing endpoints to retrieve currency objects and current exchange rates. This is crucial for Uber's global operations, as it facilitates transactions in nearly 60 currencies, adapting to frequently changing exchange rates.
What challenges arise from increasing the number of microservices?
As the number of microservices grows, challenges such as network I/O blocking and service discovery become significant. Uber addresses these issues by adopting asynchronous frameworks like Tornado and implementing service discovery protocols like TChannel and Hyperbahn to manage service interactions effectively.
What tools did Uber use to prepare Tincup for production?
Uber utilized several internal tools to prepare Tincup for production, including Hailstorm for load testing, uContainer for resource isolation, and uDestroy for simulating outages. These tools help ensure that Tincup can handle variable traffic and maintain resilience in production environments.

Technologies & Tools

Backend
Tornado
Used as an asynchronous framework to prevent blocking I/O in microservices.
Networking
Tchannel
Facilitates service discovery and communication between microservices.
API
Thrift
Manages service interfaces and ensures backwards compatibility.
Testing
Hailstorm
Used for load testing services before production deployment.
Containerization
Ucontainer
Provides resource isolation for microservices using Docker.
Resilience
Udestroy
Simulates outages to test system resilience.

Key Actionable Insights

1
Implement a Request for Comments (RFC) process for new services to enhance collaboration and quality.
This process allows engineers to gather feedback and prevent duplication of efforts, ensuring that all team members are aligned on the service's goals and architecture before development begins.
2
Adopt asynchronous frameworks like Tornado to mitigate blocking I/O issues in microservices.
Using Tornado allows for non-blocking I/O, which is crucial for maintaining performance and preventing service degradation due to synchronous calls.
3
Utilize load testing tools like Hailstorm to prepare services for peak traffic.
Conducting load tests before launching a service helps identify potential bottlenecks and ensures that the system can handle expected traffic spikes effectively.

Common Pitfalls

1
Failing to provide adequate documentation and examples during migration can slow down the process.
When migrating consumers to new services, it's crucial to offer clear guidance and examples to facilitate a smoother transition and reduce resistance.
2
Neglecting to conduct thorough load testing can lead to performance issues post-deployment.
Without early and frequent load testing, teams may discover critical performance bottlenecks only after significant development time has been invested, leading to costly rework.

Related Concepts

Microservices Architecture
Service-oriented Architecture (soa)
Asynchronous Programming
Load Testing Strategies