Mastering System Design

Arjun
8 min readOct 2, 2019

--

Outcome: Solved 21 System design problems

After spending the first month Mastering Data Structures and Algorithms, I’m ready to embark upon my second challenge.

First month was great. Okay, well not so great. I could have done much better but the good news is I did much better than I would have without taking the challenge.

Boring, you might say! Again, I can’t disagree. But the thing is these 2 boring months will go a long way in shaping my career in near future, only if you understood what I mean ;)

Getting down to the brass tacks!

Credits: https://techcrunch.com/

October 1, 2019

Which challenge do I take next?

I should have planned beforehand, just like Max Deutsch but I wasn’t sure whether I’d need this or not. Better late than never.

Goal:

I’m going to master System Design in this month and am going to tackle atleast 20 system design problems. How does Elastic Search works? Where exactly is Big data useful and how do things like Map Reduce, Hadoop, Spark etc work. These questions have been in the back of my mind for some time now. This time I’m gonna learn them all at once.

Indeed, I want to make this challenge more interesting, maybe do meta study of some exotic technologies or implement some tool like In-memory DB myself. I’ll figure something out.

October 2, 2019

Right back at ElasticSearch

Today being Gandhi Jayanti holiday, I had ample time to dig into ElasticSearch. Although there’s more to learn, but I became aware of some basic stuff like Inverted filters etc. At the same time, I learnt how to implement Hash table on disk and Hash index (as opposed to B-Tree) index supported by MySql for Memory engine.

October 3, 2019

Struggling with my diet

I just completed the video about how ElasticSearch works, which I couldn’t complete yesterday. ELK stack keeps on popping everywhere on internet as soon as you let the word ‘ElasticSearch’ out of your keyboard. That’s right, I guess this is one of the most popular patterns out there pertaining to ElasticSearch. I’m gonna devote one more, okay atleast half day to ES.

By the way, I’m struggling with my diet. It’s too hard to consume 160 grams protein in a single day (Yes my body weight is 79 kg) Dammit! Then digesting this protein needs more fibers so that the stomach doesn’t screw up. Add to it the problem that I want to reduce belly fat and you get most complex problem the world needs to solve before we can start living on the moon.

October 4, 2019

Talk over dinner

Today I was having dinner while talking to a top gun in a tech company who was paranoid that all of a sudden they will get huge number of customers and their system will fall like a house of cards.

He used some nice idioms about bottlenecks and told me even horizontal scalability has a limit. I think he was too paranoid.

October 5, 2019

How Google search works

The day started with ElasticSearch. I came across a nice video of 1 hour about ElasticSearch internals by Adrien Grand. The guy has such a strong accent that it drained me of all my concentrating energy and I slept twice without completing the video. At last, I was enervated and didn’t finish it.

Curiosity killed the cat 🐈 and I couldn’t help but read the original paper writing by Larry Page about how they implemented Google for the first time. I didn’t totally grasp it, especially the hits and forward barrels. In future, probably I’d write a blog explaining how Google search works.

October 6, 2019

Designing tiny url service

Today I’ve finished System Design Primer and solved another system design problem ‘designing tinyurl service’ apart from the fact that I’ve watched the last movie in trilogy ‘Lord of the rings’.

From tomorrow, I’m gonna accelerate solving problems and gonna write another article on Medium I had kept on hold since long.

October 7, 2019

What’s Pastebin?

Cutting it short, I went out for dinner with my uncle and practised Pastebin during the day.

October 8, 2019

Let’s stop being a night owl

And that’s why I’m gonna cut it real short because the blue screen light will not let me fall asleep easily.

Today I solved two problems Instagram and Dropbox design and yes I’ve decided to be a morning person and have already told my Google Home to set an alarm for 6 in the morning.

October 9, 2019

Parking Slot problem

Today I had a busy day and coded the famous parking slot problem. It’s 10th October 1AM right now and I’m still writing test cases for that problem. See ya tomorrow!

October 11, 2019

How busy can Life get?

An extremely busy day, skipped my gym and came back from office after 11 PM. I stuffed my clothes in the washing machine only to discover that we don’t have detergent. Tomorrow I’m flying to Chennai for weekend and I had to finish things today.

Good thing is Parking problem is done and dusted. I’ve dotted the I’s and crossed the T’s.

Don’t you think I’m sidetracked from my actual goal. Yes, even I think so. But all this was mandatory and I’m back on the horse.

October 11, 2019

Looking out of the window

I’m in my hotel room in Chennai, looking out towards beautiful city among glimmering lights at midnight. It’s breathtaking, at the same time I’m feeling so guilty that every day I write that I didn’t make any progress. I’m great at procrastinating while keeping myself busy, I know it.

I’m gonna do something about it.

October 12, 2019

Pycon conference, Chennai

I had to represent my company at Pycon in Chennai. But I stole at-least one hour right after I woke up to focus on my system design repertoire. I solved Facebook Messenger design.

After conference we had dinner at Flying Elephant, such an expensive restaurant. I guess when people earn too much money, they don’t know how to spend it and then they go to places like Flying Elephant. When you become too rich, it’s a must go place to make you feel you are still poor.

October 13, 2019

It’s not about having free time, it’s about the zeal inside you

Today was the last day for Pycon. I remember reading in some self-help guide. Plan the night before what you want to do tomorrow that will take you closer to your goal. Right after you get up in the morning, first thing you should do is execute that task.

That’s what I did. Although I had to attend the Pycon today. But I spent 2 good hours on Twitter Design and Youtube design and I could be laid back during the day since my goal for the day was already completed.

We had so much fun these 2 days at Pycon and today was the time for farewell. So, yeah at the end of the day we all were feeling pensive and nostalgic it was time to bid farewell to some of my colleagues. Tomorrow I have a flight back to Hyderabad. Gotta sleep!

October 14, 2019

I want to sleep

It’s been hell of a day, I came back from Chennai, booked a cab for office straight from airport and landed up in BITS Hyderabad for campus recruitment.

I’m enervated, let me sleep. Please?

October 15, 2019

Keeping the ball rolling, it’s consistency that counts

Although I could manage to sleep at 2 AM. I finished Twitter Search and API Rate limiter.

I went to gym after a long time and was sleepy when came back, with the same old guilt that I didn’t finish the TODO for today. I ended up spending next few hours studying.

October 16, 2019

Heartbreaks hurt

Although I was doing quite well, finishing my day-to-day work backlog like washing shoes and applying for reimbursements at work, I ended up skipping gym and talking to a friend of mine at Google. It’s quite sad to discover that Google has blacklisted my candidature.
If I explain ‘WHY’, They might find yet another reason to make the make it permanent. I’m trying to pull all strings to get myself whitelisted.

Yes, Despite the heartbreak, I finished Web crawler design.

October 17, 2019

Is it blessing in disguise?

First things first, Today I did finish Facebook timeline design and Yelp design.

It’s certain (almost) that Google has blacklisted and I can’t help but feel in despair and lost. But can it be a blessing in disguise? Yes, I am hopelessly optimistic at times. Google is not my long term goal, it was just a milestone on the path. Today, I skimmed through the linkedin profiles of many successful startup founders, be it Uber, Ola, Swiggy, Zomato, Flipkart and guess what None of them is a Googler :p

In fact, Hardly any of them has worked woth some Big Brand. Last but not the least, Elon Musk never worked for any company (except the ones he founded).

So, I read Wikipedia profile of Elon Musk to feel at peace.

October 18, 2019

Should I even continue this?

I’ve already completed 15 design problems so I’d do another 5 to meet my target. But now I’m thinking about other things. How about making a bot who can flirt? Or a startup that makes defense equipment? I mean really. What am I waiting for? Why not work on things where I can work incessantly without getting tired, without getting paid drawing raw motivation from inside me?

By the way, Today I did Uber backend and Bookmyshow design.

October 19, 2019

Reunion time

I flew from Hyderabad to Delhi today and learnt a life lesson that Indigo sucks. They lost my checked in bag and I spent almost one hour at Delhi Airport asking for its whereabouts.

It was time to reunite my old college friends and talk about good old days and it lasted through night. But that didn’t stop me from solving a design problem.

October 20, 2019

Startup talks

We spend a considerable amount of our times talking about businesses and startups, A friend of mine offered me to join a startup of theirs as CTO. While I’m still weighing my options, I’d like to finish this challenge first.

After that I went to party with other friends. So the time went commuting in Delhi and then to Noida.

October 21, 2019

And it’s complete

Today I went to my last company to meet old friends and then we had lunch together. Today I had to take a bus from Delhi to Hisar and I had good 3-4 hours which I could utilize and that’s what I did.

Today I finished 5 system design problems and total number of problem solved now stands at 21. I’ve overshot my aim which was to finish 20 instead.

What’s next? I’m gonna figure out soon. But I’m gonna make next challenges more interesting and fun.

This post is part of accelerated learning project, Outpacing the fast-paced world.

If you want to follow along with my daily posts, make sure to follow this Medium account.

--

--