How Uber Broke a Monolithic API into Microservices

In the last few months, Uber has invested thousands of engineering hours in expanding their new microservices ecosystem after abandoning its monolithic codebase. In a recent post on Uber Engineering, Emily Reinhold explains a few key design and architectural decisions that have helped to rewrite Uber engineering as a modular and flexible microservices architecture.

One design decision was adopting MVCS to separate the persistence specifics from the application logic. This pattern is an extension of the common MVC with an additional Service layer where the business logic lives. They then replaced PostgreSQL with Uber’s own globally replicated scalable datastore UDR that allows them to serve trips simultaneously from multiple datacentres.

With the number of microservices increasing, the engineering team addressed the related concerns by making some architectural decisions.

  • Tornado is an event-loop-based asynchronous framework for python that prevents blocking on network I/O by handling thousands of concurrent open connections. Tornado also offered the benefit of integrating with Uber’s existing Python networking code to maintain much of the original application logic.
  • TChannel was used over Uber’s network multiplexing and framing protocol for RPC Hyperbahn to connect clients and servers via its intelligent routing mesh. This implementation handles the increasing concerns of service discovery, fault tolerance, and circuit breaking in a growing system.
  • Thrift forces service owners to publish strict interface definitions using an IDL to streamline service integrations. It catches and rejects calls that do not comply with the interface before they have the opportunity to fail deeper in the code.

Reinhold ends by describing three principles that contribute to a healthy production environment. These include running load tests to identify bottlenecks and breakpoints, using containers to improve the efficiency of hardware use, and simulating outages and other service disruptions to identify vulnerabilities and improve durability.

Original Article

REWRITING UBER ENGINEERING: THE OPPORTUNITIES MICROSERVICES PROVIDE

Martin W Brennan Martin W Brennan is a co-founder of ViewPop, the social network that puts the creation of 3D photos and videos in the hands of anyone with a smartphone. For his day job, Martin is a copywriting consultant at We Write Words, learning about the world as he writes about it.

Comments