Search, in its most basic form, can be implemented as a plain inverted index. See Figure-1 for an illustration. We build the index as we add/delete/update documents, and use it during search to go from a search term to the documents that contain it. That’s all good. But if you’re more ambitious than building a simplistic lookup by keyword system, read on. This blog post is a gentle introduction to the core ideas behind some of the advanced search functions. By the way, you may recognize that a lot of the ideas here are based on the lucene index.

Source: Facebook Symbols


String encoding is probably not something you’ll get asked directly in a system design interview. But it may come up as a side question. Let’s say you want to send a long string over the network and print it out piece by piece on the other end. The interviewer may ask if there is anything you need to watch out for when the character set is not ASCII. The answer is yes. For example, you can’t arbitrarily segment the byte array because a character may be encoded in multiple bytes. …


Let me state upfront, this is not an easy system design interview question. If you don’t have a good understanding of distributed systems, you may not even know where to start. It’s no doubt difficult. But unless you’re in a domain specific interview, chances are that the interviewer probably just wants to test your ability of navigating complex system design problems. So I’m hoping to present exactly that — working through this question bit by bit and see how far we’d get. In the end, we’ll not only arrive at some solutions, but also practice problem solving in the…

Designing a replicated and strongly consistent key-value store, which sounds seemingly simple, is actually quite a tricky interview question. You’d need to have a good understanding of some of the distributed systems concepts to be able to answer this question well. If you’re not in a domain specific interview, for this kind of questions, chances are that the interviewer just wants to observe how well you can navigate through a complex design problem. In that case, the discussion itself is usually more important than the final solution. So rather than just giving you the straight answer, I think it’d be…

Cover Image

I quite often ran into system design discussions in which people seemed to have the tendency to use Kafka as a magic box, as if drawing out that horizontal cylinder would just magically make problems go away. It may. After all, “80% of all fortune 100 trust and use Kafka” [1]. It’s such a versatile tool that I think we should give it the credit. Personally, I like it very much as well.

When it comes to a system design interview however, I think we should do better than the superficial name dropping. Knowing a specific product is good. But…

Photo by Samuel Hinton on


The top k frequent elements question is a classic coding interview question. Viewing through the lens of system design interview however, it suddenly has a special appeal. But before we start our usual system design interview discussion, let’s quickly talk about how it’s solved in the coding interview context, which will facilitate the design discussion that follows.

In the coding interview context, the question is often posed as given an array of elements, find k elements of the highest frequency. We first go through the array and count each element’s frequency, creating a distribution map.

distribution := map<element, int>{}…

Test your system design abilities before the next interview

Diagram explaining cloud monitoring
Diagram explaining cloud monitoring
Photo from Google Cloud.

I read this system design interview question online and wanted to write about it. When I initially tried to answer this question, I embarrassingly didn’t have a good way to structure my thoughts. I had a couple of ideas floating around, but I didn’t know where to start. I later realized that it was probably because server monitoring was so prevalent in modern web development that I had been taking it for granted. So I seemed to know a good deal about it, but I couldn’t really connect the dots. …



Nginx is an open source web server that can be used as a reserve proxy, load balancer, HTTP cache, and mail proxy. It’s capable of supporting a high number of concurrent connections, which is one of its flagship features. The Nginx website has a blog post [1] that explains the event driven architecture behind its stellar scalability. While that’s an excellent deep dive, hardcore engineers may still feel unsatisfied because we’re always looking for a level of understanding that involves actual code.

Nginx’s source code, albeit openly available, is challenging to read because of its humongous size and slim comments…


Append-only log, sometimes called write ahead log, is a fundamental building block in all modem databases. It’s used to persist mutation commands for recovery purposes. A command to change the database’s state will first be recorded in such a log before applying to the database. Should the database crash and lose updates, its state can be restored by applying the commands since the most recent snapshot backup. …

Source: AWS documentations

I still remember the early day when I failed a dream job interview:

The interviewer drew a box on the whiteboard and said “This is an application server. Now make it highly available”.

“Sure”, I said. I drew a couple more boxes and said “We can replicate the application servers and have a load balancer in front of them that automatically redirects requests to others when a particular one fails”.

The interviewer then asked “What if your load balancer box fails?”

Eh, I didn’t see that coming. I thought he would venture into other more interesting topics like sharing states…

Eileen Pangu

Eng @ FANG. Enthusiastic tech generalist. Enjoy distilling wisdom from experiences. Believe in that learning is a lifelong journey.

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store