Chapter 4: Good and Bad Cache Practices

Cache can help reduce the load to the database and improve the service performance, however, designing and using the cache in the optimal way is one of the most tricky problems. In Doordash’s monolithic world, there were many anti-patterns cache usage, which makes cache itself a scalability issue. In this chapter, I am going to revisit the bad practices using cache, and discuss the right principles as well as some interesting cache problems.

read more

Chapter 3: How to Scale SQL Database?

Database is oftentimes the bottleneck of service scalability and reliability. Between 2018 and 2020, Doordash experienced multiple site wide outages during our traffic peak hours due to database issues. Before we are able to break down the monolithic service, we need to put off the database fires to ensure the team has enough room to focus on the service extraction. In this chapter, I am going to introduce how we scale the SQL databases.

read more

Chapter 1: Decouple Client and Backend through BFF Layer

In the monolithic world, doordash service only has two layers: a python Django monolithic service as the backend, and the client layer, including the web and mobile clients. The simple architecture worked well when the business and the team were small, as it enabled the product team to move fast. However it doesn’t scale as it increases the overhead maintaining the backend.

read more

Introduction to Monolithic to Microservice Extraction

The biggest issues Doordash faced in the past few years are reliability and scalability challenges. They are connected: since we can’t scale the server as the business grows, we crash very often. In the worst outage, Doordash lost millions of dollars since it had to pay for the prepared food to the merchant and send extra apology credit to the customer besides the refund.

read more

Concurrency Based on Threads, Locks and Shared State

This is the third article discussing the challenges of implementing high concurrent web applications. In the previous two articles, we mainly focused on the challenge for handling concurrent requests and the two design patterns of handling concurrent requests. In this article, we are going to discuss the challenges in designing highly concurrent business logic.

read more

Complier Design: Scanner, Parser and Analysis

Compiler is the translator between human readable high level language and the computer readable low level languages, it translate the a program from a source language into a target language. Why do we need compiler? Because for human beings, programming in a machine language, such as assembly is highly inefficient and time consuming.

read more