youtube_app-min_smaller

How to Design Youtube (Part I)

One of the most common types of system design interview questions is to design an existing popular system. For example, in the past, we’ve discussed How to Design Twitter, Design Facebook Chat Function and so on so forth.

Part of the reason is that the question is usually general enough so that there are a lot of areas to discuss. In addition, if candidates are generally curious enough, they are more likely to explore how existing products are designed.

So this week, we’re going to talk about how to design Youtube. It’s a broad question because building Youtube is like building a skyscraper from scratch and there are just too many things to consider. Therefore, we’ll cover most of the “major” components from interviewer’s perspective, including database model, video/image storage, scalability, recommendation, security and so on.

(more…)

Share on FacebookTweet about this on TwitterShare on LinkedInShare on Reddit

Read More

negativespace-22

Dropbox Interview – Design Hit Counter

It starts with a simple question – if you are building a website, how do you count the number of visitors for the past 1 minute?

“Design hit counter” problem has recently been asked by many companies including Dropbox and the question is harder than it seems to be. This week, we’ll uncover all the mysteries of the problem. A couple of topics are discussed including basic data structures design, various optimization, concurrency and distributed counter.

(more…)

Share on FacebookTweet about this on TwitterShare on LinkedInShare on Reddit

Read More

94_min

Design eCommerce Website (Part II)

This is the second post of Design eCommerce Website series posts. If you haven’t read the first post, it’s better to check it first as we’ll continue our discussion here.

To briefly remind you what we have discussed in the previous post, we started with the data model design for an eCommerce website. Although relational database is the most common approach, we notice that NoSQL database like MongoDB provides a lot of advantages and flexibilities when building an eCommerce website. To scale the system, concurrency is one of the key factors to consider.

(more…)

Share on FacebookTweet about this on TwitterShare on LinkedInShare on Reddit

Read More

restaurant-690569_640

Design eCommerce Website (Part I)

Over the past couple of weeks, a lot of people requested us to discuss eCommerce website. Not only has this topic been asked in quite a lot system design interviews, but also eCommerce websites are so popular today that a lot of techniques and researches are developed for it.

Before digging into this topic, it’s better to understand why design eCommerce website is popular in system design interviews. First of all, building an eCommerce website requires things like database design, system availability, concurrency consideration and so on so forth. All of them are extremely important in today’s distributed systems. In addition, everyone has used some eCommerce website like Amazon. If you are generally curious about surroundings, you should have already thought about this topic.
(more…)

Share on FacebookTweet about this on TwitterShare on LinkedInShare on Reddit

Read More

leaves-691363_640

Design a Garbage Collection System (Part II)

This is the second post of Design a Garbage Collection System series. If haven’t read our first post, please go check it since we’ll continue our discussion from last time.

In our previous post, we’ve been talking about the basic concept of garbage collection, which is a system that automatically recycles unused memory in programming languages. What’s cool about garbage collection is quite obvious. It allows developers care less about memory management and write more robust code. On the flip side, it may affect the performance and provide less flexibility when working with memory.
(more…)

Share on FacebookTweet about this on TwitterShare on LinkedInShare on Reddit

Read More

leaves-691363_640

Design a Garbage Collection System (Part I)

Our system design interview series gets a lot of feedback in the past couple of months. I’m glad to know that our readers find it helpful.

One advice I always give is that don’t take these articles as standard answers. System design interview questions are usually open-ended and it’s all about analysis and communication. Any point in the discussion can go deeper based on interviewers’ preferences.

This week, the question is slightly different as it’s a little low-level but at the same times quite useful – garbage collection system. Not only is garbage collection system widely used in many modern programming languages, the same idea can adapt to other areas as well.

(more…)

Share on FacebookTweet about this on TwitterShare on LinkedInShare on Reddit

Read More

FSPLFPQBCZ

Build a Web Crawler

Let’s talk about this popular system design interview question – How to build a web crawler?

Web crawlers are one of the most common used systems nowadays. The most popular example is that Google is using crawlers to collect information from all websites. Besides search engine, news websites need crawlers to aggregate data sources. It seems that whenever you want to aggregate a large amount of information, you may consider using crawlers.
(more…)

Share on FacebookTweet about this on TwitterShare on LinkedInShare on Reddit

Read More

o_19sj4n0p610v61a5skru1i7t1q0r7_new

Design a Key-Value Store (Part II)

This is the second post of Design a Key-Value Store series posts. If you haven’t read the first post, please go check it.

In our previous post, we mostly focus on the basic concepts of key-value store, especially the single machine scenario. When it comes to scaling issues, we need to distribute all the data into multiple machines by some rules and a coordinator machine can direct clients to the machine with requested resource.

(more…)

Share on FacebookTweet about this on TwitterShare on LinkedInShare on Reddit

Read More

compass-691006_640

Design a Key-Value Store (Part I)

Since many people have emailed us saying they want to read more about system design interviews, we’re going to cover more on this topic. I’m quite happy to hear a lot of feedbacks and if you have any suggestions or questions, do tell us by leaving a comment.

This week, I’m going to talk about key-value store. A key-value store is a very power technique that is used in almost every system in the world. It can be as simple as a hash table and at the same time, it can also be a distributed storage system. For instance, the underline system of Cassandra is a key-value storage system and Cassandra is widely used in many companies like Apple, Facebook etc..
(more…)

Share on FacebookTweet about this on TwitterShare on LinkedInShare on Reddit

Read More