BT

Facilitating the Spread of Knowledge and Innovation in Professional Software Development

Write for InfoQ

Topics

Choose your language

InfoQ Homepage News QCon London: Meta Used Monolithic Architecture to Ship Threads in Only Five Months

QCon London: Meta Used Monolithic Architecture to Ship Threads in Only Five Months

This item in japanese

Zahan Malkani talked during QCon London 2024 about Meta's journey from identifying the opportunity in the market to shipping the Threads application only five months later. The company leveraged Instagram's existing monolithic architecture and quickly iterated to create a new text-first microblogging service in record time.

Soon after Elon Musk acquired Twitter, Meta saw an opportunity to create a competing service but had little time to launch it to attract existing Twitter users, who were looking for alternatives. The company initially tested whether better support for text-based posts on Instagram would be sufficient to sway some Twitter users over to Meta's products, but these efforts didn’t attract enough new users.

Meta formed a small team to devise an approach to delivering a new service that would directly compete with Twitter in just a few months. Zahan Malkani, a software engineer at Meta, shared how his team was able to reuse the existing Instagram backend components, data stores, and large parts of the existing infrastructure stack but customize them to offer functionality comparable to what now is X.

Instagram / Threads High-Level Architecture (Source: Daniel Bryant’s LinkedIn post)

Theads's technology stack is almost identical to Instagram's, consisting of a few monolithic application components and dedicated data stores. The main backend component is a large Python codebase using a custom version of the Django Framework, named Distillery, that integrates with an older PHP component called WWW. The data is stored in TAO, a write-though cache that operates on a graph data model, which in turn uses UDB, a sharded MySQL deployment, that stores all the data. Additionally, the ZippyDB key-value cache stores transient data, and Async, a serverless function compute platform, is used to execute asynchronous jobs outside of peak hours.

While working on Threads, the team used a Server-Driven UI (SDUI) approach to enable a quick experimentation cycle in the early days of the project, using thousands of company employees for feedback.

Despite the apparent advantages of reusing Instagram's platform for Threads (much faster delivery time), Malkani admitted the company introduced a substantial amount of technical debt that must be addressed in the future. The team is working on gradually separating the data models from Instagram's as the Threads service gains new functionality so that both platforms can be separated, but the process will take some time.

Malkani recounted the stressful period when Threads launched in July 2023, including a few mishaps, like when users in Southeast Asia and other time zones were able to download the mobile app before the US team was ready to allow traffic in, due to the time zone confusion. Engineers also had to improve scalability of some processes to allow for importing followers from Instagram. The team has been working tirelessly to address any issues and ensure the stability of the platform, which saw unprecedented adoption. Ten million users downloaded the app on the first day, and 100 million in the first five days.

Since the launch, the team delivered new features like the "following" feed, trending conversations, and the limited availability of API access for reading and writing posts. The Threads team is also actively working on adopting the ActivityPub protocol, allowing users to share their posts to other social networks that support the protocol.

Access recorded QCon London talks with a Video-Only Pass.

About the Author

Rate this Article

Adoption
Style

BT