Infrastructure Improvements

We’ve had a few outages these past few days, so just wanted to say (1) I’m sorry if you were affected by them, and more importantly, (2) I’ve addressed the underlying issue.

I’ve doubled the capacity of our underlying server, as it was just running out of memory. We’ve been seeing a lot more traffic lately, and it just couldn’t handle it. A good problem to have, I suppose!

Let’s turn this into an educational moment though, because that is what I do 🙂

Although I teach complex system designs and the use of web services, a site like this can often make do with a single monolithic server. Our current level of traffic doesn’t require anything more, and you should always opt for the simplest solution that meets your needs. This site runs on an Amazon Lightsail instance, running WordPress with Bitnami. The issue wasn’t with that architectural choice, it was just in choosing an instance type that didn’t keep up with our growth in an attempt to minimize costs.

But, I have automated alerts set up when the site becomes unresponsive – so as long as it happens while I’m awake, I can respond quickly. And I have automated snapshots of the site stored daily, so recovering from a hardware failure or something can be done quickly.

In this case, a few brief outages that fixed themselves after a few minutes were a warning sign I should have paid more attention to. I assumed it was some transient hacking attempt that was quickly thwarted by the security software this site runs. But a couple of days ago, the site went down, and stayed down. When I saw the alert, I examined the apache error logs which plainly pointed to PHP running out of memory. The memory limit in php.ini didn’t appear to be the problem, but running “top” on the server showed that free memory on our virtual machine was perilously low. A simple reboot freed up some resources, and bought me some time to pursue a longer-term solution.

Fortunately, in Lightsail it’s pretty easy to upgrade a server. I just restored our most recent snapshot to a new, larger instance type, and switched over our DNS entry. Done.

There are still a couple of larger instance types to choose from before we need to think about a more complex architecture, but if that day does come, Lightsail does offer a scheme for using a load balancer in front of multiple servers. We’d have to move off our underlying database to something centralized at the same time, but that’s not that hard either.

Surviving a Layoff in Tech

Sometimes it seems like the tech industry lives in an alternate universe. Despite headlines about how great the economy is doing and how many jobs are being added to it, the tech industry continues to undergo wave after wave of layoffs – mainly driven by investors demanding profitability by any means. A lot of smart, driven, talented people are finding themselves without a job, and it’s hard to imagine a more stressful situation to be in.

If you’re one of those people, I want to help. The most important thing in a job search these days is who you know. I don’t know if my own network on LinkedIn might expose you to new connections, but feel free to connect with my own network there. I’m also in some discussions with recruiting firms who are interested in tapping into my network of past students, as you have skills that are still in demand. More on that as things solidify.

Upskilling and interview preparation are of course important. Here are some courses that might prove especially helpful:

If the jobs you are applying for require AWS certification, we can help you prepare for that as well:

If you are affected by the ongoing wave of tech layoffs, I wish you prosperity and finding a new employer that’s better than the one you left – or maybe this will lead to your own endeavors taking off. Make the best use of the time you have!

New Course: AWS Certified Data Engineer Associate 2023 – Hands On!

The AWS Certified Data Engineer Associate Exam is one of the most challenging associate-level certification exams you can take from Amazon, and even among the most challenging overall. 

Passing it tells employers in no uncertain terms that your knowledge of data pipelines is wide and deep. But, even experienced technologists need to prepare heavily for this exam. 

This course will set you up for success, by covering all of the data ingestion, transformation, and orchestration technologies on the exam and how they fit together.

Enroll today for just $9.99 and save with our launch sale!

For this course, I’ve teamed up with a fellow best-selling Udemy instructor, StĂ©phane Maarek to deliver the most comprehensive and hands-on prep course we’ve seen. Together, we’ve taught over 2 million people around the world. 

This course combines StĂ©phane’s depth on AWS with Frank’s experience in wrangling massive data sets, gleaned during his 9-year career at Amazon itself.

Throughout the course, you’ll have lots of opportunities to reinforce your learning with hands-on exercises and quizzes.  We’ll also arm you with some valuable test-taking tips and strategies along the way.

Although this is an associate-level exam, it is one of the more challenging ones. AWS recommends having a few years of both data engineering experience and AWS experience before tackling it. This exam is not intended for AWS beginners.

You want to go into the AWS Certified Data Engineer Associate Exam with confidence, and that’s what this course delivers. Sign up today– we’re excited to see you in the course…and ultimately to see you get your certification! 

Enroll today for just $9.99! These special prices won’t last long!

As always thank you for having me along on your learning journey.

– Frank Kane

CEO, Sundog Education

The Importance of Communication Skills in the Tech Industry

By Frank Kane 

This article is an excerpt from our â€śBreaking into Technology with a Non-Traditional Background” course. For this section, we will take a deeper dive into the importance of communication skills. 

Communication skills are important to employers. It may not jive with your ideas about meritocracy, but the reality is the world cares about more than just your coding skills.

It takes more than coding skills to be successful in business, you have to play nice with others and be an active part of a team. You have to be able to collaborate with people and communicate your ideas effectively, not only to other engineers but also to your manager and people who are outside of your discipline entirely. 

So if you’re light on technical skills, learning to effectively communicate with your team could become your unique advantage.

Communication in Interviews 

Let’s start with the interview, where it all begins. Your ability to communicate plays a large role in how your interviews go. So if you’re just sitting there looking depressed and mumbling and people can’t understand what you’re saying, and you can’t convey your thoughts and talk about how you’re thinking through the problems you’re being asked, that interview is not going to go well no matter how smart you are.

But if you can sit there and effectively convey what you’re thinking, your thought process, where you’re going as you’re answering these questions and do that in an articulate manner, people will say, “Hey, I like this person. I want to work with this person. This person can work well in a larger organization.” That’s important too.

How you present yourself in interviews is going to make a big difference. How you communicate on the job impacts your career in the long term. You need to be able to express your ideas clearly to other engineers and your management. It’s a hard thing to teach, but practice does help.

Find Speaking Opportunities

One way to start practicing your communication skills is through public speaking. Looking for opportunities to speak publicly even if it’s not technical related. Join local clubs and give presentations to them. I hone my skills by hosting meetings for my local astronomy club, and I’ve also worked as a DJ on the side.

Thankfully, I was born with a voice that’s okay to listen to. That is sort of an unfair advantage that I had, but it took practice for me to become a good public speaker because, as you might be, I’m a pretty hardcore introvert. I get a lot of stage fright. 

It’s hard for me to get in front of a group and sound confident, but that comes with practice. Find opportunities to speak in front of a group. It doesn’t have to be in person, but just getting in front of a microphone and talking about stuff for a while will help you hone your communication skills and minimize your use of filler words.

So practice, practice, practice. Communication is important.

Communication Essentials 

Next is learning the communication essentials. These include: Speaking clearly, enunciating, and making sure that you’re pronouncing all of your consonants and syllables. 

Move your mouth more. Don’t just mumble. Don’t just keep your jaw locked and just move your lips. You want to move your jaw as well. The more mouth movement, the more clarity you have as you’re speaking.

Use proper grammar, especially when you’re dealing with management. A lot of people these days do most of their communication via text and the grammar there is pretty fast and loose. But in a professional setting, you might be dealing with people from an older generation, and that’s not going to fly. So do learn how to communicate using proper English grammar.

Take a course on that if you need to. If you’re not a native English speaker, that can be especially challenging. However, it is important to use complete sentences and complete grammar.

When you’re communicating in written form with management, be concise, and don’t blather on about the same thing over and over again. Get to the point. People in business don’t have a lot of time. They appreciate people who can be direct, and say, “Hey, this is the problem, this is how we’re going to fix it. What do you think?” 

Don’t mince words. Avoid filler words. The ums, the ahs, and the filler words can be distracting. The more you can learn to eliminate that, the better. Try to get that filter between your brain and your mouth working as efficiently as possible. 

Avoiding Jargon 

Next, work to avoid using jargon when you’re talking to people who are not engineers, if you’re talking to management, artists, designers, program directors, or project managers, you can’t get into the nitty-gritty of how your code works with them.

There is a learned skill in communicating complex technical concepts to people who are not technical. Maybe you could do an online course about some sort of technology. It just takes practice. It’s a learned skill. 

The more you can communicate with people outside of your discipline, the more that will open up more career paths for you going forward. And it makes it easier to communicate with people in your interview loop when you’re looking for a job because not everybody who’s interviewing you is going to be a fellow engineer. You’re going to be interviewing with your manager, you’re going to be interviewing with someone outside the team (potentially) who’s evaluating you on soft skills. You might be talking to a project manager who works with your team, so you need to learn how to communicate with people who are not engineers. 

As I said, the best way to hone your communication skills is to communicate more. Join a local club, do some public speaking, give talks online, whatever it is, the more you’re in front of a microphone, a camera talking to people, or in front of a live audience, the better you’re going to get at this.

So here are the key takeaways: 

  • Communication is essential.
  • Use proper grammar in professional settings. 
  • Avoid using technical jargon with non-technical people. 
  • Practice makes perfect. 

If you’re interested in learning more – check out our full course, Breaking Into Technology with a Non-Traditional Background. 

Or get access to our top courses in our 10-Course Mega Bundle for only $50! Click here to learn more.

3 Tips to Ace Your Next Tech Interview

By Frank Kane 

This article is an excerpt from our “Mastering the System Design Interview” course. For this section, we will take a deeper dive into how to prepare for your technical interview. 

What are technical hiring managers looking for? It’s more than just your technical skills, they are looking for perseverance and self-motivation. Additionally, you should be researching the companies you want to work for and prepare for your interview by practicing coding, preparing questions, and thinking big! 

1. Hiring Managers are looking for perseverance and self-motivation.  

Hiring managers want to see evidence of independent thought. Can you research solutions to new problems on your own? Can you invent things? Can you come up with new, novel solutions to new problems that nobody’s ever seen before?

Can you learn things independently? There is nothing more annoying than a new hire who demands help on everything that they’re asked to do when they could just look it up on the internet. Have some evidence of where you were faced with new technology and you just dove in and learned how to do it, and how you applied that knowledge to build something. 

Do you have the grit to see challenging problems through to completion? They would love to hear stories about how you were faced with learning a new technology and solving a new problem. 

Also, interviewers will be looking for evidence that you are self-motivated. If you don’t have specific instructions for what to do today, you should be asking your project manager or your manager, “What should I be doing today?” And if they don’t have an answer, then you should come up with something new to do on your own that will bring value to the company. 

Experiment with some new idea you have, make it happen, and see how it performs. Those are great stories to have: stories of pure initiative, where you had an idea of your own, and in your own spare time, you made a prototype and experimented with it to see how it worked. 

Hiring managers love that sort of thing. 

2. Understand the company’s values and principles before the interview. 

Big tech companies take their values seriously. They will evaluate you on how well you might embody those values. This is your cheat sheet of what sorts of stories you should have ready to tell. Demonstrate that you understand those values and that you embody them. Have stories ready to prove that to your interviewer.

They are not just looking for your technical skills, they want to make sure that you embody the company’s values. That is just as important. I’ve very often hired someone who didn’t do so well on the technical side of things, but really, really aligned well with the company’s values. And they ended up as good hires. 

3. Practice coding, be well rested, prepare questions, and think big before your interview. 

Practice coding and designing at the whiteboard or some virtual whiteboard, ahead of time. Writing code on a whiteboard is much harder, and it takes practice. So, get some practice. Find a friend, or find a family member, and just make them watch you while you solve technical problems on the board to make sure that you’re not thrown off kilter just by the stress of being asked to do this while somebody is watching.

If you had to fly out for an in-person interview, halfway across the world, don’t put yourself in a situation where you’re fighting jet lag at the same point where you’re trying to go through the most grueling, mentally challenging experience of your life. 

Think about your questions for them ahead of time. Usually, an interview will end with, “do you have any questions for me?” And if you just say, “Nope, can’t think of anything”, you just blew an opportunity to make a good last impression on that interviewer. So, display some curiosity. Think about some questions ahead of time that you might want to ask.

Another tip is always to think big. If you’re interviewing at a big technical company, everything you do has to be on a massive scale, with massive amounts of data, and huge requirements. Make sure you’re thinking about the business and not just the technology.

So here are the key takeaways: 

  • Perseverance and self-motivation are just as important as your technical skills. 
  • Research the company and understand its values and principles. 
  • Before your interview, practice coding, prepare questions to ask them, and think big! 

If you’re interested in learning more on how to nail your next tech interview – check out our full course, Mastering the Systems Design Interview, click here.

Or get access to our top courses (this one included) in our 10-Course Mega Bundle for only $50! Click here to learn more.

3 Tips to Ace Your Next Tech Interview

3 Tips to Ace Your Next Tech Interview

By Frank Kane 

This article is an excerpt from our â€śMastering the System Design Interview” course. For this section, we will dive into a few tips and tricks to help you ace your tech interview. 

What are our hiring managers looking for? It’s more than just your technical skills. They want to see you have developed your soft skills as well. 

They want to see that you have determination, grit, perseverance-whatever you want to call it. They want to make sure that you have the internal drive and motivation to solve new problems and find new solutions on your own. 

1. Tech skills don’t matter as much as you think. 

You’re not going to be given recipes for how to solve the problems you’re given. You need to have the determination to figure these things out-collaboratively, of course, when appropriate-but, you’ve got to have the determination to get things done with minimal guidance. You shouldn’t need to have someone pushing you forward all the time. You need to be curious enough and driven enough to solve new problems that haven’t been solved before.

That’s what they want. Why? Because technology changes quickly. 

The technology they are quizzing you on from a technological standpoint might be obsolete a year from now. 

We talked about things like Apache Spark and Hadoop, for example. Hadoop’s already on the decline. The value of testing your knowledge on specific technologies really isn’t that high. But your ability to adapt to new technologies as they come out, your ability to self-learn, and continue to drive yourself forward, that’s what’s hard to find. That’s what they really want to see. 

Your determination to learn new technologies, or changes to technologies as they come out going forward, is what people want in the long term. You still need to prove you can code. That won’t go away anytime soon. You’ll still have to code on the whiteboard and show that you can think in code. You will be expected to code and assemble technical solutions from discreet components on a whiteboard or its digital equivalent. 

2. Demonstrate your coding skills and technical knowledge

Your tech skills still matter, but they’re just table stakes. Tech skills are what get your foot in the door. The first thing you’ll be asked is some simple coding questions. That’s to weed out the people who just can’t function, and there are a shockingly large number of them. But once you get past that initial hurdle of technology, what they’re really looking for is your perseverance and the inner qualities that will make you a good, long-term hire that can adapt to new, changing technologies. 

So how do you demonstrate perseverance? That’s a hard thing to show in the limited time of an interview. Interviewers have their ways of drawing it out of you, but a good way to approach this from your side is by telling them a story. 

Hiring managers are usually trained to do something called behavioral interviewing. They’re not going to ask you, “Did you do X?” and allow you to lie about it and say, “Yeah, I did X! I’m great at whatever that is!” They want to hear stories that they can dig into about how you demonstrated whatever skill they’re trying to find out about.

3. Tell real-life scenarios highlighting your skills 

So, make sure you have those stories ready. If they want a story about how you handled a very tough technical problem, how you handled some conflict within your team, or how you handled convincing your manager to do something the right way, have those stories in your back pocket. Those are things you can talk about to prove that you’ve dealt with these situations before, and how you dealt with them.

Expect the interviewer to dig into the details of your story. That’s the whole idea behind behavioral interviewing. They say, “Give me an example of when you did this,” and you say, “I did this, this way!”They will dig into details like, “Okay, tell me more about this aspect of it.”That’s their way of confirming that you really did what you said you did. 

Come prepared with those stories about how you solved challenging problems in the past. It could be stories from your past employers, from the world of academia, or even in a self-taught environment. You could talk about some Kaggle challenge you had trouble with.

Have a story about where and when you demonstrated perseverance in the real world. And there’s no better proof that you can do things than to say, “Hey, I’ve already done this before. I can tell you all about it.” 

Practice, practice, practice. It’s just like anything else. The more you practice, the better you get at it. The same is true of getting through an interview loop with a big technical company. 

So here are the key takeaways: 

  • Your tech skills don’t matter as much as your determination and perseverance. 
  • Be able to demonstrate your coding skills and technical knowledge. 
  • Have stories and real-life scenarios highlighting your skills prepared. 

If you’re interested in learning more on how to nail your Tech Interview – check out our full course, Mastering the Systems Design Interview: click here.

Or get all of them in our 10-Course Mega Bundle for only $50! Click here to learn more.

Machine Learning / Data Science Course Updated with GPT, ChatGPT, and Generative AI

We’ve just added over two hours of videos and hands-on learning exercises in our Machine Learning, Data Science, and Generative AI course! If you’re already enrolled in this course or through our Sundog Mega-Bundle, you have access to two new sections now: Generative AI and the OpenAI API.

We go in-depth on how GPT works, which is pretty exciting if you’re curious about exactly how ChatGPT sounds so much like an all-knowing real person. It’s not magic; you’ll learn how the Transformer architecture works, and how multi-headed self attention unlocked the key to training systems like GPT in parallel on massive amounts of training data.

You’ll also practice using the OpenAI API, allowing you to use GPT, ChatGPT, and DALL-E’s capabilities within your own applications.

These new lessons are chock-full of professionally designed illustrations, and new hands-on activities using Google CoLab, HuggingFace, and lots of our own code. There are a couple of really fun activities – we’ll fine-tune GPT using real IMDb movie reviews, and create a system capable of talking in depth about movies. And even more fun, we’ll create our own version of Data from Star Trek by fine tuning OpenAI’s Davinci model with all of the scripts from Star Trek: The Next Generation. Just imagine: we’re creating a real AI that mimics a fictional one from the 80’s!

These are exciting times in the world of AI, and understanding how the latest AI systems work will really make you stand out with your employers. Enroll now if you haven’t already.



By Frank Kane 

This article is an excerpt from our “Mastering the System Design Interview” course. For this section we will dive into a brief review of the various cloud computing technologies out there, and how they connect to the system design interview.  

One thing that’s changed in system design interviews is that it’s not always necessary to design things from scratch. We don’t always have to assume that you’re going to be designing your own layout of servers in your own data center. Oftentimes, you can just use an existing technology within one of those cloud service providers like Amazon Web Services or Google Cloud, or Microsoft Azure. And sometimes, that might be a perfectly appropriate thing to invoke, and it can save you some time and trouble. So, let’s get started!

Again, these are just tools in your toolbox that you can draw on during a given system design problem. I’m not going into a lot of depth here; I could spend hundreds of hours talking about each one of these services if I wanted to. The objective here is to know these services exist and you can call upon them as needed as part of your design. 

I’ve made three columns in the chart above, one for Amazon Web Services, one for Google Cloud, and one for Microsoft Azure. They all have their own offerings for these basic general classes of services. 

Let’s start with storage. You have to put your raw data somewhere, right? If you’re being asked to process a massive amount of data, that must start in some location. These storage services can store pretty much anything (technically they are “object stores”.) Unlike a database, they are not limited to structured data. 

AWS’s storage solution is S3, the Simple Storage Service. S3 is just a place where you can store objects across the cloud within AWS. You pay based on usage and the prices are cheap. If you need to store a massive dataset, you can throw it in S3 and then use additional AWS services to process that data and impart structure to it. 

Google Cloud offers cloud storage of its own, and Azure has different flavors of storage services. You can ask it for disk, blob, or data lake Storage, depending on what you’re trying to do. There’s that “data lake” term again. That is the concept of storing a massive amount of unstructured data somewhere, imparting structure to that data, and querying it as if it were structured. A data lake needs a massive storage solution like S3, Google Cloud Storage, or Microsoft Azure Data Lake Storage to store that data in the first place. 

Let’s also talk about compute resources. If you need to provision individual servers and you want to have complete control over what those servers are doing, they all have solutions for that as well. Amazon offers EC2 which allows you to rent virtual machines as small or large as you want. That can even include different flavors of boxes that might focus more on GPUs than CPUs or might focus more on memory or storage speed. Whatever it is you need to optimize for, they have a specific server type you can choose from. If you’re doing deep learning, you might want to choose one of their big GPU instances to throw the most muscle you can at a big deep learning problem (they won’t be cheap, though). 

Similarly, Google has Compute Engine, which is the same idea. And Microsoft Azure just calls their offering virtual machines. Every cloud provider has a solution for renting virtual machines on an as-needed basis and being charged by the hour for how much you’re using them. 

If you need a big NoSQL distributed database, we can do that too. DynamoDB is the go-to solution for that on AWS. Google Cloud still calls it BigTable, and they have some more specific services for more refined use cases. Azure has something called CosmosDB or Table Storage. All three providers offer a distributed NoSQL data store that will allow massive scaling of key/value lookups. 

Containers are also a big deal. If you want to deploy code to the outside world, putting that within a container is a modern operational practice. These days, Kubernetes is winning the battle versus Docker for what’s popular on the cloud services. All three services offer some sort of Kubernetes service. On AWS, they call that Kubernetes on ECR or ECS. Google Cloud also offers Kubernetes, and Azure as well. 

They each offer solutions for data streaming as well. You can always just run Kafka or Spark Streaming on a compute instance or on Amazon’s Elastic MapReduce (EMR) service. But there are also managed, purpose-built services for streaming. AWS has something called Kinesis that’s used for data streaming, which integrates tightly with other AWS services. That’s just used for getting data from one place to another, and maybe transforming it and analyzing it along the way. Google Cloud calls the same thing DataFlow, and Microsoft Azure offers Stream Analytics. 

We can also briefly discuss Spark and Hadoop. How would I deploy them in the public cloud? On AWS, they have something called EMR, which stands for Elastic MapReduce. The name is a bit of an anachronism because you can use it for much more than MapReduce these days. Specifically, you can also deploy Apache Spark on it, as well as other streaming technologies and analytics technologies. But the nice thing about EMR is that it manages the cluster for you. You just say, “Hey, I want a Spark cluster with this many nodes. Go create it for me”. And EMR says, “Yup, here you go. Here’s your master node. Go run your driver script here. And it’s all set up and ready for you.” EMR saves you a ton of hassle in provisioning and configuring those servers. You just get a Spark cluster that’s ready to go. 

Similarly, Google Cloud has something called Dataproc, and on Azure, they have an implementation of Databricks. Databricks is a very influential company in the world of Apache Spark and a big contributor to Spark itself. If you’re a fan of Databricks, Microsoft Azure might be your platform of choice. 

For larger-scale data warehousing, they all offer solutions for that as well. On AWS, we have something called Redshift. Again, you just tell it, “I want to provision a data warehouse that has this much storage capacity,” and it says, “Okay, here you go, go to town.” It also has a variant called Redshift Spectrum, which can sit on top of an S3 data lake and issue queries on unstructured data as well. Google Cloud still offers BigQuery, its original technology for distributing SQL queries or queries in general, across a massive dataset. And on Azure, we have Azure SQL or Azure Database. 

Finally, let’s talk about caching. On AWS, we have something called ElastiCache, which is just a wrapper on top of Redis. And on Google Cloud, they call it Memorystore, which can be Redis or Memcached under the hood. Azure offers a Redis solution as well. It seems like Redis is winning the battle against Memcached in the public cloud. All three platforms allow you to deploy your own Redis server fleet and manage it for you.

No matter the system the goal is always the same. If you’d like to learn more about any of these cloud computing platforms before you’re systems design interview. Enroll in our courses at 

Or get all of them in our 10-Course Mega Bundle for only $50! Click here to learn more. 

The Secret to Nailing Your System Design Interview 

The Secret to Nailing Your System Design Interview 

By Frank Kane 

This article is an excerpt from our course, Mastering the System Design Interview. We hope you find these tips useful in your next interview. 

So what is the secret to nailing your system design interview? Well, it might be simpler than you think. One of the top ways to nail your System Design Interview is to simply THINK OUT LOUD!

Yes, you read that right: think out loud during your interview. Don’t just clam up for 10 minutes while you think about things. For all you know, you only have 15 minutes for this question, and you don’t want to spend 10 minutes of it just sitting there in silence while your interviewer wonders what you’re thinking. Do yourself a favor, and do NOT do that. 

Think out loud. Use that time to clarify requirements, define the constraints of what you need to build, and then think out loud about the high-level solutions you’re considering to meet those requirements. Say what you’re thinking. “Okay, well, I think we need a CDN, and maybe we need to use Apache Spark to process the data down here, and maybe Kinesis to stream stuff over here, and maybe DynamoDB over here to store that data.” Just talk and think, and let the interviewer see how you’re approaching this problem from a technical standpoint. 

Thinking out loud is important because it gives the interviewer not only a chance to see how you think but also to steer you in the right direction and see how you respond to that guidance. Part of what they’re trying to evaluate is what it will be like to work with you every single day. So, work with them. Show that you can work with them. Think out loud. Let them work collaboratively with you. Show that you can take feedback. Show that you can modify your design in response to that feedback, and not get defensive about it. That’s a much better use of that 10 minutes than just sitting there in silence. 

Again, you don’t know how much time you have for a given system design problem. Very often, it’s only about 20 minutes. If you spend half of it just sitting there in silence, you’ve wasted that time. You’ve wasted that opportunity to show your interviewer how you think.

So here’s the key takeaways: 

  • Don’t just clam up for 10 mins while you think about things. 
  • Clarify requirements, and define the constraints of what you need to build. 
  • Think out loud about the solutions you’re considering to meet those requirements.
  • Give the interviewer a chance to steer you in a different direction before you start diving into details. 
  • You don’t know how much time you have for this part of the interview, so make every minute count. 

If you’re interested in learning more strategies on how to Master your System Design Interview today with our Mastering the Systems Design Interview Course.

Click here to enroll today! 

Mock Interview: Real-World System-Design Interview Questions

Mock Interview: Real-World System-Design Interview Questions

By Frank Kane 

This article is an excerpt from our course, Mastering the Systems Design Interview. 

One of the best ways to prepare for an interview is with mock questions. Having thought through potential interview questions will help you to better articulate and position your answers. 

In this article, I will walk through mock interview questions that are often asked in the Systems Design Interview to help you prepare your answers before the interview. 

This set of mock interviews features questions I’ve asked as an interviewer, questions I’ve seen other interviewers ask, and questions I’ve been asked while interviewing at big tech companies myself. For each one, we’ll show you the right questions to ask before you dive into a solution and give you a chance to sketch out your own system design. 

Then, we’ll present a transcript of how a real interview might go and show you what a good interview for this question looks like. Finally, we’ll debrief after each mock interview and talk about what made that interview successful, and what you should learn from it. 

These are also opportunities to gain experience in how the various technologies we’ve discussed earlier in the course fit together. Practice makes perfect, and that applies to interviewing as well!

Mock Interview: Example #1

Question: Design a URL shortening service. 

CANDIDATE: OK, so we’re talking about something like, right? A service where anyone can enter a URL, get a shorter URL to use in its place, and we manage to redirect them?

INTERVIEWER: Yup, at a very high level, that’s the idea.

CANDIDATE: What sort of scale are we talking about?

INTERVIEWER: A lot. Say millions of redirects every day. And we don’t want to

make any design decisions that might limit us later, so assume millions of URL’s as well.

CANDIDATE: Any restrictions on the characters we use? Symbols might be a little too hard for people to remember or type…

INTERVIEWER: It’s good that you’re thinking about usability and the customer experience. Yeah, symbols would be a pain, as would be remembering the capitalization of characters and stuff. But, would that limit you too much? Does that give you enough characters to work with?

CANDIDATE: Well, how short is short?

INTERVIEWER: The shorter, the better. How many characters do you figure you’d need?

CANDIDATE: Well, if we use nothing but lowercase letters and numbers to make them easy to remember… that’s 36 characters, right? So we basically have a base-36 system here. Personally, all I can remember would be 6 characters, so how many URLs could that represent? Whatever 36 to the 6th power is… mind if I use the calculator on my phone for that?

INTERVIEWER: Sure, I can’t do that in my head either.

CANDIDATE: Let’s see… oh wow, that’s over 2 billion. So yeah, 6 characters should be plenty for the foreseeable future.

INTERVIEWER: Sure, sounds good. Any more questions?

CANDIDATE: How about vanity URL’s? Can people specify their own URL if it’s available? 

INTERVIEWER: Yeah, that would be nice to have. Might be something only registered users or paid users get. 

CANDIDATE: Do we let them edit and delete short URL’s once created? 

INTERVIEWER: If they have an account, sure. We don’t want people editing or deleting other peoples’ URLs. 

CANDIDATE: How long do shortened URL’s last? 

INTERVIEWER: Well, forever. We don’t want a bunch of dead links out there 5 years from now. Good thing you’ve got room for 2 billion URL’s! 

CANDIDATE: Let’s start by thinking about the API’s to this system.

We’ve asked some clarifying questions here, and you have enough to get started. So, before we go into the actual mock interview and see how that goes down, try it yourself. Get a piece of paper, and sketch out some designs.

Here are some questions to ask: 

  1. How would you implement the system? 
  2. What API’s do you think will be needed? 
  3. How will you work backward from those API’s to develop a system that can work at this massive scale, and handle both the storage of those mappings and the redirects?

Go give it a shot. 

Mock Interview: Example #2

Question: Design a Restaurant Reservation System 

CANDIDATE: Ok, you want me to design a restaurant reservation system. Is this just for one restaurant, or for any number of restaurants like OpenTable or something?

INTERVIEWER: It’s like OpenTable, so it can cover many restaurants.

CANDIDATE: All right, let’s think about the user experience first. A user will want to select a restaurant, enter their party size, find a list of available times near the time they want, lock in their reservation, and get some sort of confirmation via SMS or something. They’ll also need some way to change or cancel reservations.

INTERVIEWER: Yes, that’s good. There are some nuances we could talk about, but you’ve got the main operations we need to support there.

CANDIDATE: So there are probably thousands of restaurants out there that might be a part of this system, and tens or hundreds of thousands of diners. They’ll expect this system to be fast and reliable. Am I right in thinking we should optimize for performance and reliability over cost?

INTERVIEWER: Yes, I want you to design a system that is both scalable and reliable, and with fast load times. Assume some investor gave us millions of dollars, and money isn’t really a problem.

CANDIDATE: I suppose the restaurant is also a customer…what would they need? Reporting, analytics, a way to set up how many tables and their configurations, how many tables to hold aside for walk-ins, a way to contact reservation holders…

INTERVIEWER: Yes, good thinking there. In the interest of time though, let’s just concern ourselves with the diners, and what we need to build in order for them to successfully schedule a reservation at their favorite restaurant.

Again, it’s time to try it yourself before I walk you through the mock interview. 

Here are some questions to ask yourself: 

  1. How would you organize the data that’s needed for this system? 
  2. How would you structure that data? 
  3. How would you store it? 
  4. How would you distribute that storage, and how do you design a system, more generally, that would scale to thousands of restaurants and hundreds of thousands of users? 

Take a stab at that yourself on a piece of paper somewhere, or your own whiteboard or virtual whiteboard. And when you’re ready, come back, and we’ll see how our interviewee here actually handled the problem.

CANDIDATE: Let me sketch some thoughts on the data we’ll need while I’m thinking of it…So we’ll need a customer table, and a restaurant table for sure. We’ll need to tie them together so each customer and restaurant will need some unique ID associated with them. What might we need to know about a customer…certainly their name, contact info, and maybe some information to help them find their favorite restaurants or restaurants close to them. So we’ll need their location as well, and maybe a list of their preferences, like their favorite restaurants. We’ll also need to store their login credentials, but this would probably be stored in a more secure system or using some single sign-on system, and not here.

For the restaurant, we also need its name, address, and contact info. We also need to know its layout so we can match up reservation requests to available tables. The application we build will have to have some fairly complex logic for assigning reservations to tables; maybe even taking into account the possibility of moving tables together to accommodate large groups. We also need to make some assumptions about how long it takes for a dining party to finish their meal and clear the table for the next reservation, so that’s something the restaurant will probably want to be able to control – the length of time a reservation lasts. Maybe that ends up being a function of the party size as well or the time of day; we’d have to interview real restaurant owners to understand how to best model that. I assume they’ll also want to keep some tables aside to handle walk-in customers, so we should at least let the restaurant specify how much capacity they want to hold back for walk-ins.

INTERVIEWER: That’s great; you’re really thinking of the customers here and what they will need.

CANDIDATE: So, finally, we’ll need a reservation table that ties it all together. The app will have to use its own logic to assign reservation requests for a given customer, restaurant, and time. So somewhere, we will have a table of reservations, partitioned by restaurant ID so we can quickly look up reservations for a given restaurant. I imagine we’d further partition by date to make it quick to look up existing reservations for a given date at a given restaurant, which the algorithm will need to try and find an opening.

INTERVIEWER: Great that you’re thinking about how the data is stored for optimal performance. So, is there a reason you’re going with a normalized data representation instead of a denormalized one?

CANDIDATE: Well, thinking about the operations we’ll likely need to do…let’s see…you’ll probably already have the customer ID and restaurant ID on the client by the time you navigate to the point where you want to create a new reservation, right? I think it’s simpler to just retrieve information on restaurants and clients as needed via their own hits to the database, or the cache in front of the database. That way we don’t waste space, and we don’t have to deal with the problem of updating everything in some huge denormalized table whenever a customer changes their phone number or something. If, while testing, we find that there is some complex join operation that we’re doing over and over again and it is a performance bottleneck, we could revisit that, but my instinct here is to start simple and only add the complexity of denormalization when needed.

INTERVIEWER: Makes sense to me. Keep going.

CANDIDATE: What information is associated with a reservation…obviously the customer and restaurant it is for, the party size, and the time. We might also want a space for notes to the restaurant, like any special occasions or dietary restrictions they might want to know ahead of time.

INTERVIEWER: OK, that’s all good. Let’s move on to designing the larger system here.

CANDIDATE: So I think the design is pretty straightforward. We have a bunch of clients that represent our diners, running an app or something that needs to issue service requests over HTTP somehow over the internet.

Since we can have a large number of diners, we will need to horizontally scale the servers that process these requests. The act of placing a reservation or retrieving information about a diner or a restaurant seems atomic and stateless, so that shouldn’t really pose a problem. We just have API’s for requesting a reservation and retrieving metadata to display about users and restaurants. There also needs to be some API for securely logging in, creating an account, and stuff like that… but let’s assume we’re using some secure, external system for user management which is outside of what we’re building. Ideally, these servers would be hosted across different racks, data centers, and regions, and geo-routed whenever possible. That would maximize availability, assuming we build in sufficient capacity to handle an outage of an entire region.

And I’m going to draw a hand-wavy, big “NoSQL” database here that stores our customers, restaurants, and reservations tables. The application logic for assigning reservations to time slots will live in the servers that talk to this database. Although I’m drawing it as a single, giant bottleneck, this is really some sort of horizontally scaled database system to ensure it can handle high loads and high availability.

We’ll probably also want to send text messages to people reminding them of their reservations, so we’ll have some application server off on the side querying the same database and firing off SMS messages as appropriate. I’m drawing this as a single server as that probably would be sufficient, but of course, we’d have some sort of failover set up on that as well, maybe with just a cold standby ready to go. This seems like sort of a nice-to-have feature, but if it is deemed critical we could also put it behind a load balancer just to ensure we have redundancy all the time.

INTERVIEWER: I mean, is there really any reason not to do that?

CANDIDATE: No, I suppose not. So, let’s imagine another load balancer and at least a couple of servers in different data centers handling the SMS part.

INTERVIEWER: Tell me more about your big hand-wavy NoSQL database. How would you go about choosing a specific technology for that?

CANDIDATE: Well, part of it would come down to what tools your staff is already familiar with. If you’re an AWS shop, then I would think DynamoDB would fit the bill nicely. But, let’s think about the CAP theorem. You said earlier we care about availability and speed, which implies partition tolerance. So that means we can maybe give up a little on consistency. So, something like Cassandra that has eventual consistency in exchange for not having a single master server might be a reasonable choice. But I think I would push back on those requirements; consistency is probably important for this application, it just isn’t something we talked about yet. We definitely don’t want two customers ending up with the same reservation slot. I mean, in practice, even the databases that trade-off availability are still highly available if you throw enough secondary servers and backup master servers at them. So the usual suspects like MongoDB or DynamoDB, or its equivalent in Google Cloud or Azure, is probably a fine choice.

INTERVIEWER: Yeah, that’s good. Business owners don’t always think about these things, and part of your job is to help them think about these sorts of requirements and the tradeoffs involved. Now, the data you sketched out earlier is relational in nature – we’ve got customers and restaurants referenced in each reservation. Do we need a traditional relational database like Oracle or MySQL to handle that?

CANDIDATE: No, the application servers can query the individual tables and join them internally as needed. We’re not doing anything complicated where that would be a real performance concern. Modern distributed databases can just do the join for us efficiently on their own anyhow. Let’s go with “NoSQL” meaning “Not Only SQL”.

INTERVIEWER: OK, we just have a few minutes left before I have to move on. One last question: What about caching? Do we need it? How can we further improve the performance of this system?

CANDIDATE: Hm, well, we don’t really have a lot of static content in this system, so something like a CDN probably wouldn’t do a whole lot of good. If the client applications are just web pages, though, we’d probably want a CDN for fast hosting of the CSS, Javascript, and images needed on the client side. We talked about hosting the app servers across different regions and geo-routing to them, so at least that will cut down on some latency. We probably would want to have some sort of cache for the database queries, though. The customer and restaurant data isn’t likely to change often, so that can certainly be cached. Let’s assume we have something like Memcached or Redis sitting on top of those queries inside the app servers. Maybe Memcached because it’s simpler and we don’t need anything fancy here. That gives us a little more flexibility in how the database is distributed across regions as well. It doesn’t do much good to geo-route to servers if those servers all have to talk to one region for its data.

INTERVIEWER: Cool. Obviously, there’s a lot more to talk about if we were to build this for real, but you hit on all of the main concerns. Let’s move on.

Mock Interview: Example #3

Question: Design a Web Crawler 

CANDIDATE: We’re designing a web crawler. Like, the entire web – or just a few sites?

INTERVIEWER: Yup, the entire web.

CANDIDATE: I thought you might say that. So we’re talking, like, billions of web pages. Crawled how often?

INTERVIEWER: Let’s say the whole thing should be updated every week.

CANDIDATE: And, we need to check pages we’ve crawled before to see if they have been updated, right?

INTERVIEWER: That’s right.

CANDIDATE: OK, do we need to store a copy of every page as we go? Does that include images?

INTERVIEWER: Yes, we need to store the HTML at least. For now, I don’t care about images, but it would be nice if your design could be extended to handle them later.

CANDIDATE: What about dynamic content? Stuff that’s rendered client-side?

INTERVIEWER: That’s a good thing to ask about. Again let’s set that problem aside for now, but if your design can be extended for it and we have time to talk about it, we can go there later. 

CANDIDATE: What’s the main purpose of this crawler? I should’ve asked that first, really.

INTERVIEWER: We’re building a search engine. That’s why I’m mainly concerned with just storing text for now. Now that we’ve answered some clarifying questions and defined our requirements, it’s time for you to try it yourself once again. How would you distribute this crawler to handle the massive scale required? We’re talking about the entire internet here. That’s crazy. What algorithms will you use to crawl the entire web? We need to bring back what we learned about algorithms and data structures. What problems and failure modes can you anticipate and address in your design? Give it a shot on your own and when you come back, we’ll go through a mock interview showing one approach to the problem.

CANDIDATE: OK, let me start by thinking about it from an algorithmic standpoint. Basically, web pages are vertices on a directed graph, right? And the links between them are the edges of the graph. So fundamentally, this is a graph traversal problem.

INTERVIEWER: Right. So, what kind of traversal would you do here?

CANDIDATE: Well, the choices are breadth-first-search or depth-first-search. Let me think about that for a second. The number of links on one page are pretty finite; that would represent breadth. But the depth of the Internet is pretty much infinite. I think that makes BFS the only real tractable solution here.

INTERVIEWER: Remind me how BFS works.

CANDIDATE: So, starting at some page, you’d go through every link on the page, and kick off the processing of each link to some other process in the name of scalability I’d think. Then each link on the child nodes are processed, working your way across this graph from left to right. As opposed to DFS, where we would follow one path all the way to the end, then back up and follow another path all the way to the end. The problem is that following any path to the end will take pretty much forever. BFS is usually the way to go, and this seems like no exception.

INTERVIEWER: OK, good. Let’s get to the hard part and make this scale to billions of web pages.

CANDIDATE: OK, let me start with something simple and high-level, and then we can start refining it.

INTERVIEWER: Yup, that makes sense.

CANDIDATE: So we need to start with a list of URL’s to crawl. We have to start somewhere. Way back at the beginning of the web, webmasters would submit their domains directly to search engines so they would be crawled, so I would guess that’s what seeded this, along with the sitemaps on those sites. Even today people can submit sites via Google webmaster tools right? So there is some process to directly add new URL’s that have no inbound links at all yet into this list of URL’s to crawl.

INTERVIEWER: That could be a pretty big list.

CANDIDATE: Yeah, it’s not going to fit in memory on a single host or anything like that. We’ll probably need to hash each URL as it comes in, and dispatch it to a list on one of many servers to scale that up.

INTERVIEWER: OK. We’ll dig into that more deeply if we have time. Staying high level for now.

CANDIDATE: So then we’ll have another distributed system of some sort that actually downloads all of those URL’s, and stores their contents into some truly massive distributed storage solution. I guess some sort of simple object store will do where the key is just the URL, and the value is the stuff that was downloaded. So something like Google Cloud storage should fit the bill, or if Amazon were getting into the search engine business Amazon S3 would do for that. Designing a distributed storage system is a whole other design problem, so again, I’ll stick with the high level here.

Next, we need to extract all of the links within that page and crawl them in turn. BFS as we said before. I imagine that’s easier said than done; there needs to be some way of normalizing those URL. There’s the whole http vs. https thing, relative links, trailing slashes, and all sorts of edge cases we’ll need to handle. But in the end, we need some canonical URL that we can resubmit to the crawler.

There are also links we might want to explicitly exclude; known malware sites, people hosting prohibited content, and stuff like that. So some sort of filtering will probably also be needed before we decide to crawl down any given rabbit hole on the Internet.

So, if a URL makes it all the way through this, it goes back into the distributed list of stuff that needs to be crawled. Specifically, that will be a first-in-first-out queue sort of thing; a big distributed linked list would do fine.

INTERVIEWER: Why a linked list and not an array?

CANDIDATE: Well, these URLs are strings, and we don’t really know ahead of time how much memory a certain number of URLs will take. Using arrays means we have to pre-allocate space, but we can’t know how many elements will fit on a given server.

INTERVIEWER: Well, you could have an array of pointers to strings, right?

CANDIDATE: That doesn’t really help; you still have to know how many strings you can fit in memory, and we don’t.

INTERVIEWER: Yeah, you’re right. So, is this list really just in memory? What happens when one of your servers goes up in flames? Do we just lose that part of the Internet?

CANDIDATE: Well, arguably, that might be OK – the next time we run the crawler it would pick it up. The simplicity and lower cost might be a reasonable trade-off there.

INTERVIEWER: Let’s say it isn’t; too many people will freak out if their new web page isn’t crawled quickly. How would you solve that?

CANDIDATE: Hm, we need some sort of distributed, persistent list. I guess you could back it on disk in a distributed database of some sort, but maybe you could just have hot standbys for each server that handles a given bucket in your URL hashing, so if one goes down you have another ready. As long as they are in different data centers, the risk should be low. Or you could do some hybrid thing between the two ideas.

INTERVIEWER: Good thinking. We don’t really have time to get into the details of that, but you’re on the right track. 

One thing we didn’t talk about is the problem of duplicate content. How would you avoid processing copies of the same page that are under different URLs?

CANDIDATE: Hm, well, we could compute some sort of hash or checksum or something on the content after it’s downloaded. Then store every hash value we’ve encountered somewhere. So, before we move from the downloader to the URL extractor, we see if that page’s hash value has been seen before. If not, we add it and move on. If so, we’d have to compare the two pages character by character to ensure it’s not just some random hash collision and they really are identical – so we’d also have to store the URL the hash value came from so we can retrieve it if need be.

We have a similar problem with duplicate URLs, don’t we? If many pages are linked to the same URL, we don’t want to crawl that URL every time it’s linked. Only once will do, right? So let’s also keep a database – distributed, of course – of URLs we’ve already processed in this run. The URL filter will also check against that to ensure we haven’t already submitted that URL to the crawler. Or maybe we could do something clever in the URL queue to ensure we don’t queue the same URL twice. That could include a hash map in addition to the queue to let us check against URLs that have been processed already. But that’s another big distributed system to bolt on there when an off-the-shelf NoSQL database sort of thing would also fit the bill. 

INTERVIEWER: Another thing we didn’t talk about yet is how to avoid bringing sites down by crawling them too fast. A lot of web servers can’t keep up with us if we just hit them with a request for every page on the site all at once. How would you deal with that?

CANDIDATE: Well, some sort of time delay has to be baked in between calls to any given site.

INTERVIEWER: Right, how would you do that?

CANDIDATE: We didn’t really go into detail on the “page downloader” block there, so let’s think that one through. Obviously, that’s going to be running on a huge fleet of servers, each running a bunch of threads to download pages, hash them, and store them. So maybe we hash URL’s to download to individual servers like we did for the queue. And we do this hashed on the domain name, so all the download requests for a given site end up on the same server. That server could then maintain a thread for each site that runs in parallel with the other sites it’s taking care of, with a time delay between each hit on a given site. This is all starting to seem a little overly complex. Maybe this whole thing could be combined with the queue somehow, so we don’t need two different systems. I don’t think we have time to go back and revisit that, though.

INTERVIEWER: No, not really. But you’re right; it is possible to just bake this logic into the queue. Then the page downloader, as you’re calling it, just has some fixed number of download threads, with a time delay between each hit, that the queue feeds requests into. The queue just makes sure requests from the same site end up in the same download thread. I like that you’re aiming for simplicity.

CANDIDATE: Wow, this is all more challenging than it seems at first.

INTERVIEWER: I know! That’s why it’s a good interview question. Let’s go back to your high-level design real quick. So real quick, we did talk about extending this system to store images or do client-side rendering. Where would that fit in potentially?

CANDIDATE: Well, we could extract images at the same time we do URL extraction. But really, we could just treat them like another URL to be crawled, that way, we benefit from all the other pieces of the system. So the “page downloader” just knows how to recognize an image URL, and how to retrieve and store images as well as HTML.

INTERVIEWER: And client-side rendering?

CANDIDATE: I think that would have to go into the URL extraction piece. So instead of just scanning HTML for URLs, we actually render the HTML in a browser and see if any new URLs are created in the process. That means building out a whole other fleet of page renderers and a way to queue them up. Wow, this gets really complicated really fast.

INTERVIEWER: That’s why Google is as big as it is. We didn’t even talk about dynamic content or sites that require you to log in, or malicious sites that try to trap crawlers in an infinite loop. There are all sorts of interesting edge cases. But you’ve done a good job of thinking through this problem in the time we have; let’s move on.

Now that you’ve walked through several mock interview questions, go practice on your own. How would you answer these questions?

Keep in mind the structure here, and the importance of asking clarifying questions, and explaining your thought process out loud so your interviewer can understand how you think and process information. 

If you’re interested in learning more strategies on how to Master your System Design Interview today with our Mastering the Systems Design Interview Course.

Click here to enroll today!