How Uber Built the Tincup Microservice: Lessons in Scalable Backend Architecture

This article details Uber's transition to a modular microservice architecture, describing the RFC process for new services, the design and implementation of the Tincup currency service, and the technologies—such as MVCS, UDR, Tornado, TChannel, and Thrift—used to ensure scalability, reliability, and efficient production deployment.

21CTO
21CTO
21CTO
How Uber Built the Tincup Microservice: Lessons in Scalable Backend Architecture

Several months ago Uber began replacing its monolithic codebase with a modular microservice architecture. Engineers invested thousands of hours to evolve the ecosystem, using multiple languages and frameworks, and adopted new microservice building techniques.

Start a New Service

At fast‑growing engineering companies, tracking ongoing tasks is hard, so Uber requires new service authors to submit an RFC (Request for Comments). The RFC details purpose, architecture, dependencies, and other details, inviting discussion from the rest of Uber’s engineering department.

The RFC serves two purposes: (1) gather feedback to improve service quality; (2) avoid duplicate work and create collaboration opportunities.

Execute a New Service

Uber’s currency and exchange‑rate service “Tincup” illustrates a successful microservice. It provides two main endpoints: obtaining currency targets and fetching the current exchange rate against USD for about 60 currencies.

Regardless of location, riders can request a ride and Tincup ensures the fare is paid in the local currency.

Guide Microservices with New Tech

Building Tincup required refactoring all currency‑related logic, prompting a review of long‑standing design decisions. Uber introduced a “MVCS” approach, extending MVC to include the service layer, allowing the persistence layer to be swapped without touching business logic.

For persistence, Uber replaced PostgreSQL with UDR (Uber’s globally replicated scalable database) to support all‑active data‑center replication.

Predict Microservice Growth Issues

To avoid blocking I/O, Uber adopted Tornado, an event‑loop‑based Python async framework, after extracting much code from a Flask monolith. Go is also mentioned as an alternative for high‑throughput services.

Uber uses TChannel on top of Hyperbahn for RPC multiplexing, providing service discovery, fault tolerance, and rate‑limiting/circuit‑breaker capabilities.

Thrift is employed as the IDL to enforce strict interface definitions and backward compatibility across rapidly growing service calls.

Prepare Services for Production

Before launch, Uber runs load‑testing with the internal Hailstorm tool to verify Tincup under peak traffic (e.g., New Year’s Eve, Halloween).

uContainer, Uber’s Docker‑based container system, isolates resources so multiple services can share a machine without interfering with each other.

uDestroy simulates failures to test system resilience by deliberately causing outages.

Reflections After Implementation

Key lessons from building Tincup and expanding the SOA include: simplify user migration, keep the technology stack small per service, develop generic units and run integration tests early, and perform frequent load testing to catch capacity issues before they impact users.

Uber’s Microservices

Uber’s migration to SOA offers engineers of all experience levels the chance to own a service, benefit from a knowledge‑sharing culture, and experiment with new technologies.

Original Source

Signed-in readers can open the original source through BestHub's protected redirect.

Sign in to view source
Republication Notice

This article has been distilled and summarized from source material, then republished for learning and reference. If you believe it infringes your rights, please contactadmin@besthub.devand we will review it promptly.

MicroservicesService ArchitectureScalable SystemsUberRFC process
21CTO
Written by

21CTO

21CTO (21CTO.com) offers developers community, training, and services, making it your go‑to learning and service platform.

0 followers
Reader feedback

How this landed with the community

Sign in to like

Rate this article

Was this worth your time?

Sign in to rate
Discussion

0 Comments

Thoughtful readers leave field notes, pushback, and hard-won operational detail here.