Skip to content

mohllal/back-end-interview-topics

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

28 Commits
 
 
 
 
 
 

Repository files navigation

Back-End Interview Topics

This repository contains a list of Back-End interview topics that I had to review, or want to deepen.

Feel free to contribute, it would be highly appreciated!

Table of Contents

Programming Languages

JavaScript

Resources

[⬆] return to TOC

Frameworks

Node.js

  • Is everything that’s asynchronous in Node.js handled by the libuv's Worker Pool?

  • What are the phases of the Event Loop?

  • What do you know about Worker Threads module in Node.js?

  • What is the difference between process.nextTick(), setTimeout(), setInterval(), and setImmediate()?

  • What are the Timers functions of Node.js?

  • What can be done if a Timeout or Immediate object needs to be cancelled?

  • What will printed by running the following code:

    const fs = require('fs');
    
    fs.readFile(__filename, () => {
      setTimeout(() => {
          console.log('timeout');
      }, 0);
      setImmediate(() => {
          console.log('immediate');
      });
      process.nextTick(() => {
          console.log('nextTick');
      });
    });
  • Explain what is Reactor Pattern in Node.js?

  • Rewrite the code sample without try/catch block:

    async function check(req, res) {
      try {
          const a = await someOtherFunction();
          const b = await somethingElseFunction();
          res.send("result")
      } catch (error) {
          res.send(error.stack);
      }
    }
  • What is Globals in Node.js? (explain global, process, and buffer)

  • What is the use of Underscore (_) in Node.js?

  • What are Error First Callbacks in Node.js?

  • How to gracefully shutdown/kill Node.js process? (explain process.kill())

  • What is the difference between readFile() vs createReadStream()?

  • What is the EventEmitter in Node.js?

  • How many types of Streams are present in Node.js?

  • How to solve Process out of Memory Exception in Node.js?

  • What is the use of DNS module in Node.js?

  • What's wrong with the following code snippet? (explain timing attacks)

    function checkApiKey (apiKeyFromDb, apiKeyReceived) {
      if (apiKeyFromDb === apiKeyReceived) {
          return true
      }
      return false
    }
  • How does Node.js support multi-processor platforms, and does it fully utilize all processor resources? (explain Cluster module)

  • Consider the following code snippet:

    {
      console.time("loop");
      for (var i = 0; i < 1000000; i += 1){
          // Do nothing
      }
      console.timeEnd("loop");
    }

Resources

[⬆] return to TOC

Object Oriented Programming

  • What are the pros and cons of functional programming vs object-oriented programming?
  • What are the four pillars of OOP? (A brief description for each one)
  • What is dynamic or run time polymorphism?
  • What is static/early binding and dynamic/late binding?
  • When is classical inheritance an appropriate choice?
  • When is prototypal inheritance an appropriate choice?
  • What does “favor object composition over class inheritance” mean? When should we choose inheritance over composition?
  • When it is more appropriate to use a structure (struct) instead of a class?
  • What are abstract classes? What are the distinct characteristics of an abstract class?
  • How is method overriding different from method overloading?
  • What is the difference between cohesion and coupling?
  • Why should we strive for "high cohesion, and low coupling" in designing a system?
  • Explain the concept of destructor/deinitializer?
  • What is LSP (Liskov Substitution Principle) and what are some examples of its use?
  • What is the difference between association, aggregation and composition?

[⬆] return to TOC

Architectures

Microservices

  • What is the Microservices architecture? And what are its pros and cons?
  • What are the differences between Monolithic, SOA and Microservices?
  • What is the API Gateway pattern?
  • What are the decomposition patterns used in Microservices? (briefly describe decomposition by business capability, decomposition by subdomain, and self-contained services)
  • What are the deployment strategies used in Microservices?
  • What are the challenges faced while working with Microservices?
  • What is Domain Driven Design (DDD)?
  • What is Ubiquitous Language (UL) and what is its uses in DDD?
  • What is the Distributed Transaction pattern?
  • What is the Bounded Context pattern?
  • What do you understand by Contract Testing?
  • What is End to End Testing in Microservices?
  • What are Reactive Extensions in Microservices?

[⬆] return to TOC

Design Patterns

[⬆] return to TOC

Security

  • What is JSON Web Token? And when to use it?
  • What is the JSON Web Token structure? And How does it work?
  • What is OAuth 2.0? What are its roles?
  • What are the five grants for acquiring an access token in OAuth 2.0?

[⬆] return to TOC

Databases

MySQL

  • Suppose we have two tables tbl1 and tbl2; Each of these tables contains one column on which join condition has been defined. The table tbl1 contains the column col1 and the table tbl2 contains the column col2.

    • What will the outcome of the following inner join query?
      • Join columns having unique values.
      • Join columns having duplicate values.
      • One Join table contains Null value.
      • Both tables containing Null values.
    SELECT a.col1, b.col2
    FROM tbl1 a INNER JOIN tbl2 b
    ON a.col1 = b.col2
    • What will the outcome of the following left outer join query?
      • Join columns having unique values.
      • Join columns having duplicate values.
      • One Join table contains Null value.
      • Both tables containing Null values.
    SELECT a.col1, b.col2
    FROM tbl1 a LEFT OUTER JOIN tbl2 b
    ON a.col1 = b.col2
    • What will the outcome of the following right outer join query?
      • Join columns having unique values.
      • Join columns having duplicate values.
      • One Join table contains Null value.
      • Both tables containing Null values.
    SELECT a.col1, b.col2
    FROM tbl1 a RIGHT OUTER JOIN tbl2 b
    ON a.col1 = b.col2
    • What will the outcome of the following full outer join query?
      • Join columns having unique values.
      • Join columns having duplicate values.
      • One Join table contains Null value.
      • Both tables containing Null values.
    SELECT a.col1, b.col2
    FROM tbl1 a FULL OUTER JOIN tbl2 b
    ON a.col1 = b.col2
  • Consider the following staffs table:

    id first_name last_name manager_id
    1 Genna Jakson NULL
    2 Adam Ahmed 1
    3 Kali Boyer 2
    4 Layla David 2
    5 Ali Mohamed 3

    The staffs table stores the staff information such as id, first_name, and last_name. It also has a column named manager_id that specifies the direct manager.

    Use self join and recursive common table expression (CTE) to get who reports to whom?

  • Describe and give an example of the cross join?

[⬆] return to TOC

MongoDB

[⬆] return to TOC

Redis

[⬆] return to TOC

Kafka

[⬆] return to TOC

Networking

  • What does the term network topology refer to? What are the different types of network topology? What are the pros and cons of each one?
    • Star Topology
    • Bus Topology
    • Ring Topology
    • Tree Topology
    • Mesh Topology
    • Hybrid Topology
  • What are the layers of the OSI model? (A brief description for each layer)
    1. Physical Layer
    2. Data Link Layer
    3. Network Layer
    4. Transport Layer
    5. Session Layer
    6. Presentation Layer
    7. Application Layer
  • What are the layers of the TCP/IP model? (A brief description for each layer)
    1. Physical Layer
    2. Data Link Layer
    3. Internet Layer
    4. Transport Layer
    5. Application Layer
  • What are the differences between IPv4 and IPv6?
  • What are the differences between TCP and UDP?
  • What are DNS, DHCP, and NAT?
  • What is the difference between DNAT (Destination Network Address Translation) and SNAT (Source Network Address Translation) ?
  • What is a virtual private cloud (VPC)?
  • How does tracert or traceroute tool work?
  • How do content delivery networks (CDNs) work?
  • What are the differences between reverse proxies and forward proxies?
  • How does failover work for Application Load Balancer?
  • What does the term AAA mean in network security?
  • What is DoS/DDoS attack? How can protect servers from it?
  • What is a TLS handshake?
  • How does HTTPS work?
  • What is the difference between HTTP/1.1 and HTTP/2?
  • How does HTTP/2 Server Push work?
  • The age-old question: What happens when you type google.com into your browser and press enter?
  • What is the SPDY protocol?
  • What is the QUIC protocol and how does it work?
  • What is the difference between Polling, SSE, and WebSocket?

Resources

[⬆] return to TOC

Infrastructure

Docker

  • What is Docker? What is the difference between Docker and VM (Virtual Machine)?
  • What is the advantage of Docker over Hypervisors? (briefly describe What is the main difference between the approaches of Docker and standard hypervisor virtualization?)
  • What is Docker Image and Container?
  • How do Docker containers make use of kernel cgroups and namespaces?
  • What is the default Docker network driver, and how can we change it when running a Docker image?
  • What are the four different restart policies in Docker?
  • What is Docker Compose? What can it be used for?
  • What is Docker Hub and what is the other type of Docker Image Registry?
  • What are the possible ways of using insecure Docker image registries?
  • What is Docker Swarm? What can it be used for?
  • What is Dockerfile? What can it be used for?
  • Is there any data loss when the Docker container exits?
  • Why docker-compose down may take 10 seconds to recreate or stop? (briefly describe SIGTERM and SIGKILL)
  • What is the difference between docker-compose up, docker-compose run, and docker-compose start?
  • What is the difference between COPY and ADD in a Dockerfile?
  • What is the difference between Docker ADD command and VOLUME flag?
  • What is the difference between the docker run and the docker create?
  • What are the various states that a Docker container can be in at any given point in time?
  • What is the preferred way of removing containers - docker rm -f or docker stop then followed by a docker rm?
  • What does the volume parameter -v do in a docker run command?
  • What is the use of the docker save and docker load commands?
  • Is there any problem with just using the latest tag in a container orchestration environment? What is considered best practice for image tagging?

Resources

[⬆] return to TOC

Nginx

  • What is nginx?
  • What is C10K problem?
  • Explain how Nginx can handle multiple connections within a single process?
  • Does Nginx support compress the request to the upstream?

Resources

[⬆] return to TOC

Kubernetes

[⬆] return to TOC

Deployment

  • What are the differences between continuous integration, continuous delivery, and continuous deployment?
  • What is the difference between a Blue/Green deployment and a rolling deployment?
  • What is the Canary deployment strategy?
  • Explain how DevSecOps impacts on the CD pipeline?
  • What is pipeline as code?

Resources

[⬆] return to TOC

Git

Resources

[⬆] return to TOC

Testing

Resources

[⬆] return to TOC

Data Structures and Algorithms

  • What is the difference between static array and dynamic array?
  • Compare the time complexity and space complexity of searching, insertion, and deletion for the following data structures:
    • Dynamic Array
    • Linked List
    • Hash Table (Hash Map)
    • Binary Search Tree (BST)
    • Heap (Max Heap/Min Heap)
    • Red-Black Tree
    • AVL Tree
  • Compare the time complexity and space complexity for the following sorting algorithms:
    • Bubble Sort
    • Insertion Sort
    • Selection Sort
    • Merge Sort
    • Heap Sort
    • Quick Sort
    • Counting Sort
  • What is the difference between inorder, preorder, and postorder tree traversal algorithms?
  • What is the difference between breadth-first-search (BFS) and depth-first-search (DFS)?

[⬆] return to TOC

Agile

  • What is the Agile Software Development standing for? And why we should use it!
  • What is the difference between the Agile and Waterfall software development models?
  • What is the four main principles of the Agile Software Development? (Agile Manifesto)
  • How does Agile work?
  • List some Agile software development (or system development) methodologies?
  • What is the difference between Kanban and Scrum Agile frameworks?
  • What is the duration of a Scrum sprint?
  • What is the Scrum of Scrums?
  • What is the term increment standing for, in Scrum context?
  • Explain the scrum poker/planning poker technique?
  • What is the Release candidate?
  • What is a story point in the Scrum?
  • What are the main roles in the Scrum?
  • What are the Sprint Planning meeting, Stand-up meeting, Definition of Done (DoD) meeting, and Sprint Retrospective meeting?

[⬆] return to TOC

About

A list of helpful Back-End related interview topics.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published