Image for post
Image for post
Source: Facebook Symbols

Background

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. …


Prologue

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…


Image for post
Image for post
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…


Image for post
Image for post
Photo by Samuel Hinton on cosmiccoding.com.au

Background

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. …


Image for post
Image for post
Source: nginx.com

Background

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…


Background

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. …


Image for post
Image for post
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…


Comparing Neo4j and graph databases to relational databases

A macro shot of water droplets on a leaf.
A macro shot of water droplets on a leaf.
Photo by Willem Karssenberg on Unsplash

Background

While the evolution of database technology over the past two decades has been dominated by the debate of NoSQL versus relational, there’s a quiet force that’s been steadily gaining traction over the same period of time. That’s native graph database. Popularized by Neo4j [1], the native graph database has now been widely adopted in many industries and leveraged by many real-world use cases.

I want to talk about the storage layer in native graph databases in this article because there are surprisingly far fewer online resources on it when compared to NoSQL or relational databases. The most useful material you’ll…

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