Justin Phillips, Software Engineer, Lyft

Sourcegraph code search helped ensure production stability throughout the monolith to microservices decomposition by verifying applications were no longer pointing at the monolith version of a service.

Justin Phillips, Software Engineer, Lyft
Download PDF

Lyft ensures production stability during monolith to microservices transition

Lyft's mission is to improve people's lives with the world's best transportation. With over 30 million riders in 2018, Lyft's business is growing, as are the numbers of engineers, repositories, and microservices. Effectively scaling and managing a large engineering organization requires an elite set of development tools and practices to preserve efficiency, while protecting, and enhancing code quality.

Decomposition or migrating a service is a high-risk endeavor, often involving changes in hundreds of repositories, so a high level of accuracy is needed.

Justin Phillips, Software Engineer, Lyft

From monolith to microservices

The largest refactoring effort in Lyft's 10-year history came in 2018 when the number one company priority was the decomposition of the PHP monolith to microservices.

Performing such significant and wide-ranging code changes meant extensive analysis was required to verify all call sites and references to the monolith had been updated. This meant transforming monolith code to consuming the new microservice API endpoints, which in many cases, meant altering an API schema.

This wasn't simply slicing up the monolith by domain into separate services—it was also a crucial opportunity to eliminate tech debt by removing dead code, deprecated libraries, and unused API and database fields.

During our decomp efforts, we also spent time to refactor our APIs. Many of these APIs were undocumented and lacked a formalized contract.

With the help of Sourcegraph, we were able to quickly look at all clients of an API and remove unused attributes that lived in different repositories, ultimately simplifying our APIs and speeding up developer iteration time.

Justin Phillips, Software Engineer, Lyft

The refactoring and the decomposition of legacy applications is constant

With the confidence gained from the successful PHP monolith decomposition, new projects are underway to reduce tech debt by more aggressively tackling migrations and the deprecation of systems.

Lyft teams are constantly innovating and building new systems, necessitating decomposing and migrating off of older ones. Sourcegraph gives us the ability to search for and refactor references to deprecated services, libraries, URL patterns, and more across our 2000+ repositories, and the confidence that we're not leaving anyone behind.

Sourcegraph makes it easy to survey and understand existing use cases to make sure we build the right thing.

Aneesh Agrawal, Software Engineer, Lyft

Using Sourcegraph code search, Lyft software engineers were able to verify the migration and deprecation of code from their monolith to microservices at scale, significantly reducing the risk to production stability during deployment of the new microservices.

Try Sourcegraph on your code.

Experience code intelligence with a free trial for you and your team, or search millions of open source repositories.