How Khan Academy Successfully Handled 2.5x Traffic in a Week[System Design Sundays]
A great indication that combining common ideas can lead to great results.
To learn more about the newsletter, check our detailed About Page + FAQs
To help me understand you better, please fill out this anonymous, 2-min survey. If you liked this post, make sure you hit the heart icon in this email.
Recommend this publication to Substack over here
Take the next step by subscribing here
Imagine that you saw a huge spike in traffic in a week,
How would you build systems to handle this? Luckily, we have one answer. Khan Academy has put out a fantastic blog titled How Khan Academy Successfully Handled 2.5x Traffic in a Week to share how they did it. True educators through and through.
In the month of April, we served 30 million learners on our platform. A recent national survey of parents found that Khan Academy was the “most used online resource”.
In this email/post we will go over their blog post and cover the important points. Regular readers will notice that I have already covered a lot of ideas over here. This is a great illustration of the 80-20 rule I talk about here- most of your systems can be designed by relying on a few fundamental ideas/tools. With all that out of the way, let’s get right into it.
Important Ideas
The two fundamental ideas- To quote the writeup- “Two fundamental components of our architecture serve us particularly well here. We use Google Cloud, including AppEngine, Datastore, and Memcache, and Fastly CDN, and they were the backbone of the serverless and caching strategy that’s key to our scalability.”
CDNs- CDN stands for content delivery networks. They are essentially a group of servers throughout the world to allow users to interact with points close to them. These servers are owned by a third party, which let you ‘rent’ the server space in proportion to your system’s needs (done real-time). This adds to scalability and cost. The post below gives more details on CDNs-
The use of serverless architecture- Serverless is another idea that has gained a lot of attention recently. Essentially, instead of owning your own servers, you host your applications on someone else’s servers. The benefits of this can be summed by this Khan Academy statement- “Even with a substantial traffic increase, our site stayed up and performed well, with minimal intervention. We didn’t need to worry about load balancing ourselves because server instances were brought up as needed without any intervention.” Once again, the most woke has covered by doing an article on the most important ideas in computing.
Using YouTube to load videos- The KA academy has the choice to load videos from either Fastly or YouTube. If you’ve read into my post on CDNs, you know CDNs cache content, which makes the request fulfillment quicker. However the Khan Academy team chooses to go with YouTube. Their reason is the following- “We load videos primarily from YouTube and secondarily from Fastly. This also keeps costs down as well as ensures that the videos load quickly.”
Using Fastly CDN to cache all static Data- “Fastly CDN allows us to cache all static data and minimize server trips. Huge for scalability, it also helps us optimize hosting resources, for which costs grow linearly with usage in our App Engine serverless model. As shown in the architecture diagram, all client requests go through Fastly so we can prevent unnecessary server traffic, improving performance.”
As you will notice, many of these ideas have been discussed extensively in this newsletter. The goal of this write-up is to show you how multiple different pieces fit together to create amazing solutions. Great software engineering isn’t about flashy algorithms and insanely creative solutions (those can be important). Often it’s about using insight to see how fundamental building blocks can be combined to deal with the challenge at hand. Reading Engineering Blogs/Papers or Watching Talks is a great to use other people’s experiences to gain insight into the subjects.
I created Technology Made Simple using new techniques discovered through tutoring multiple people into top tech firms. The newsletter is designed to help you succeed, saving you from hours wasted on the Leetcode grind. I have a 100% satisfaction policy, so you can try it out at no risk to you. You can read the FAQs and find out more here. Scroll down till the end to get 20% off for up to a whole year.
If you have enjoyed this post so far, please make sure you like it (the little heart button in the email/post). I also have a special request for you.
***Special Request***
This newsletter has received a lot of love. If you haven’t already, I would really appreciate it if you could take 5 seconds to let Substack know that they should feature this publication on their pages. This will allow more people to see the newsletter.
There is a simple form in Substack that you can fill up for it. Here it is. Thank you.
https://docs.google.com/forms/d/e/1FAIpQLScs-yyToUvWUXIUuIfxz17dmZfzpNp5g7Gw7JUgzbFEhSxsvw/viewform
To get your Substack URL, follow the following steps-
Open - https://substack.com/
If you haven’t already, log in with your email.
In the top right corner, you will see your icon. Click on it. You will see the drop-down. Click on your name/profile. That will show you the link.
You will be redirected to your URL. Please put that in to the survey. Appreciate your help.
In the comments below, share what topic you want to focus on next. I’d be interested in learning and will cover them. To learn more about the newsletter, check our detailed About Page + FAQs
If you liked this post, make sure you fill out this survey. It’s anonymous and will take 2 minutes of your time. It will help me understand you better, allowing for better content.
https://forms.gle/XfTXSjnC8W2wR9qT9
I’ll see you living the dream.
Go kill all and Stay Woke,
Devansh <3
To make sure you get the most out of System Design Sundays, make sure you’re checking in the rest of the days as well. Leverage all the techniques I have discovered through my successful tutoring to easily succeed in your interviews and save your time and energy by joining the premium subscribers down below. Get a discount (for a whole year) using the button below
Reach out to me on:
Instagram: https://www.instagram.com/iseethings404/
Message me on Twitter: https://twitter.com/Machine01776819
My LinkedIn: https://www.linkedin.com/in/devansh-devansh-516004168/
My content:
Read my articles: https://rb.gy/zn1aiu
My YouTube: https://rb.gy/88iwdd
Get a free stock on Robinhood. No risk to you, so not using the link is losing free money: https://join.robinhood.com/fnud75