NodeJS Interview Guide 100+ Questions & Answers

Node.js architecture, file system API, http, Express.js, databases, REST, GraphQL, microservices, system design and more

  • 0.0 (0 Reviews)
  • 0 Students
  • 111 Lessons
  • Kamil Kulik • Software Engineer

Course Overview

Interviews can be quite stressful. For some reason, you often freeze or struggle to verbalise the concepts with which you work on the daily basis. Although you have enough coding and design knowledge, you might not be as efficient presenting this knowledge as using it in your projects.


Preparation is the best type of effort you can put in, to put your best foot forward in an interview setting. Apart from coding skills, you also need to be able to verbalise the concepts you work with and be able to clearly articulate how they work and what problems they address.


This is where this course comes in. I gathered 100+ actual Node.js interview questions either I personally received or my colleagues did. Although I wouldn't do bad answering those in the actual interview, I often left out important details. Especially when asked about intimate knowledge of how Node.js operates and what makes it so good for the web, database related questions and some good practices around working with them and many more. Here's a glimpse of some of the more important topics covered in this course:

  • Node.js event loop

  • Cluster mode (+ PM2), Child Process and Worker Threads

  • NPM dependencies

  • stubbing, spying and mocking in testing

  • Buffer & Stream for working with data

  • pitfalls of streams when working with a lot of data

  • data streaming in Node.js

  • designing data contracts and http responses

  • REST v GraphQL

  • CommonJS v ES Modules

  • webserver building blocks - middleware, interceptor, router, controller, service

  • relational v non-relational databases

  • database migrations

  • SQL anti-patterns

  • multi-stage Dockerfiles

  • managing tasks in distributed multi-pod microservice

  • how to mitigate risk of SQL injection

  • and MUCH more!


This course is meant to prepare you for such questions by going as deep as needed into each concept, understanding the context of questions, understanding the underlying technology used to address the problem asked by the interviewer and providing clear recommendations. In the end, there are no perfect solutions, there are just trade-offs. To find the right solution, you need to understand those trade-offs.


I know I will be using this course to prepare for my Node.js interviews. I also plan on adding new questions from my own interviews and others’. I would love to add yours too!


Another valuable resource is course repository with running code examples for a lot of questions. That’s the playground where theory meets practice. Each example is a standalone recipe on how to use a component or pattern in practice.


I am not saying this course is going to make you a Node.js expert. But I'm also not saying it won't.

See more

FAQ

FAQ area empty

Course curriculum

16 chương 111 bài học 11 giờ 12 phút 7 bài học thử miễn phí
Chương 1 How to follow this course
Chương 2 NodeJS architecture and Event Loop
Chương 3 Concurrency and parallelism in NodeJS
  • Is NodeJS capable of both concurrency and parallelism? Học thử 5:27
  • How do you leverage libuv do achieve a level of parallelism? 4:00
  • How does the promise work under the hood? 2:50
  • What's the difference between Cluster and PM2? pt. 1 12:39
  • What's the difference between Cluster and PM2? pt. 2 11:43
  • Pros and Cons of PM2 3:25
  • How Cluster mode compares to Worker Threads, what are their use cases? 8:37
  • What problem do Worker Threads solve? What are their pros and cons? 3:30
  • How Worker Threads compare to Child Processes? 7:10
Chương 4 NPM
  • NPM: What files are used when working with NPM? 6:22
  • NPM: It is possible or advisable to effectively update package-lock.json? 3:02
  • NPM: How does NPM resolve dependencies? 2:22
  • What are peer dependencies? 5:41
  • What is semantic versioning? How to understand changes between versions? 2:24
  • Best practices when updating project dependencies? 2:53
Chương 5 Error handling in NodeJS applications
  • Give some examples of exit codes in NodeJS 4:54
  • How to handle errors in NodeJS applications? 14:30
  • How to create custom errors in NodeJS applications? 4:29
Chương 6 Testing NodeJS applications
  • Describe test pyramid. 3:37
  • How to benchmark NodeJS applications? 3:18
  • What's the difference between mocking, spying and stubs? How to use each. pt. 1 5:16
  • What's the difference between mocking, spying and stubs? How to use each. pt. 2 10:33
  • What are unit testing best practices? 3:10
  • What are integration testing best practices? 5:52
Chương 7 Working with data in NodeJS applications
  • What is the difference between readFile and createReadStream in NodeJS? 10:00
  • What is a Buffer and how is it used? 13:40
  • What is a Stream and how is it used in NodeJS? 4:11
  • What types of streams does NodeJS support? 7:39
  • How are streams optimising I/O performance? 6:21
  • What is High Watermark in streams? 5:20
  • List and explain readable stream events 2:15
  • List and explain writable stream events 2:07
  • How can using streams lead to performance issues? 7:44
  • Explain backpressure in the context of NodeJS streams 8:58
  • How to correctly copy enormous files with NodeJS using streams? 5:34
  • How to stream data in NodeJS? 10:42
  • What is piping or stream chaining? 1:11
  • Why you shouldn't use .pipe() API in production? 2:25
  • What is and what's the purpose of a Pipeline in NodeJS Streams? 7:23
  • How to implement a custom stream in NodeJS? 7:43
  • A review would be much appreciated!
Chương 8 HTTP requests and Responses
  • Describe main HTTP methods are their most popular use cases. 4:12
  • What does it mean an HTTP method is idempotent or safe? 4:49
  • Describe HTTP response status code classes and common http codes. 7:09
  • What information can be included in an HTTP request? 3:17
  • What is a data contract and what are some good practices around it? 5:37
  • What are good practices when constructing responses? 3:54
  • How do HTTP headers control the HTTP protocol? 2:53
  • Provide an example of a useful HTTP header. 2:55
Chương 9 REST
  • What is and what problems does REST solve? 2:40
  • How do you design RESTful endpoints? 2:51
Chương 10 GraphQL
  • What is GraphQL and what problem does it solve? 3:03
  • Cons of a GraphQL API? 2:41
  • What is a GraphQL resolver? 7:56
  • GraphQl and REST. When to use which? 4:13
Chương 11 Application Construction
  • What's the difference between CommonJS and ES Modules? 5:45
  • What is middleware? 7:25
  • What is an interceptor? 5:15
  • What is a router? 5:40
  • What is a controller? 6:31
  • What is a service? 5:43
  • What is a utility? 1:12
  • Best practices when debugging NodeJS applications? 3:54
Chương 12 Databases
  • What’s the difference between relational and non-relational databases? 10:28
  • What are best practices when designing a relational data structure? 6:10
  • Inner Join vs Left Join vs Right Join 10:36
  • What's a database migration? pt. 1 10:36
  • What's a database migration? pt. 2 13:15
  • What's a database transaction and what problem does it solve? 3:40
  • What's ACID in the context of a database? 2:40
  • What are database indexes and how do they work? 10:57
  • How do you normalize data for use in relational database? 5:43
  • How do you optimise performance of SQL queries? 6:11
  • What are some SQL antipatterns? 6:50
  • What is database server side programming and its use cases? pt. 1 8:38
  • What is database server side programming and its use cases? pt. 2 12:30
Chương 13 Deployment
  • Explain the difference between npm i and npm ci, and when you would you use each 5:23
  • What is a multi-stage Dockerfil and why use it? 9:03
  • What's the difference between a [Docker] image and container? 3:28
Chương 14 Microservices
  • What are pros and cons of microservices? 6:14
  • What are some good practices for error handling in microservices architecture? 3:23
  • What problem does asynchronous communication between microservices solve? 8:39
  • What are some best practices for databases with microservices? 2:53
  • How do you manage tasks that need to be performed once in a multi-pod cluster? 9:40
Chương 15 System design
  • What is a monolithic architecture? 3:59
  • Describe client server architecture. 6:58
  • Describe server-less architecture. 6:21
  • Describe main quality attributes of a distributed system. 15:42
  • What is a cache and how do you control it? 5:51
  • What caching strategies do you know? 16:20
  • What types of proxies do you know? 5:02
  • What are queues, why do we use them? 9:47
  • What is load balancer? 6:36
Chương 16 Security
  • How to mitigate risk of sql injection? 3:49
  • What are some strategies to ensure security of NodeJS applications? 6:44
  • What security headers could be used to improve security and how? 5:18
  • A review would be much appreciated!

Requirment

  • JavaScript & TypeScript

  • Basic understanding of how backend applications are built

  • Basic understanding of NodeJS

Outcomes

  • You will be able to describe about NodeJS architecture (Event Loop, Event Queue, Libuv workers)

  • You will be able to solve "In which order these console logs will appear" questions, based on intricate knowledge of event loop phases and microqueues

  • You will learn how to answer questions about how production grade applications are built

  • You will learn to answer questions about databases including database design, data normalisation, server side programming and query optimisation practices

  • You will learn fundamentals of system design - client-server model, caches, proxies, load balancing etc

  • You will learn how to work with data in NodeJS, including important pitfalls of various APIs

  • You will learn to answer questions about practices including examples of mocking, stubbing and spying

Instructor

...
Kamil Kulik • Software Engineer

0.0

  • ... 0 Student
  • ... 1 Course
  • ... 0 review

View Details

Reviews

Rate this course :

Remove all