InterviewPitch

Land the job you want — prepare
with Real interviews Q&A

Curated interview questions, company-wise guides and coding rounds. Practice mock interviews, improve with feedback, and track your progress.

Q&A
Top curated interview packs
Company-wise & role-wise packs, quality assured.
Mock interview
AI scoring
Coding rounds
Top 10 sets
Beginner
1. What is System Design?

System Design is the process of designing the architecture, components, modules, databases, APIs, and infrastructure of a software application.

It focuses on how large-scale applications handle millions of users, manage data efficiently, maintain performance, scalability, security, and reliability.

In interviews, System Design evaluates your ability to build scalable and production-ready systems like YouTube, WhatsApp, Netflix, Uber, Instagram, etc.

Main Goals of System Design
  • Scalability
  • High Availability
  • Reliability
  • Performance Optimization
  • Security
  • Fault Tolerance
Beginner
2. What is Scalability?

Scalability is the ability of a system to handle increasing traffic, users, or data without affecting performance.

A scalable system can grow efficiently when demand increases.

Types of Scalability
  1. Vertical Scaling (Scale Up)
  2. Horizontal Scaling (Scale Out)

Vertical scaling means increasing CPU, RAM, or storage in the same server.

Horizontal scaling means adding multiple servers to distribute the load.

Intermediate
3. What is Load Balancing?

Load Balancing is the process of distributing incoming network traffic across multiple servers to improve performance and availability.

A load balancer prevents a single server from becoming overloaded.

Benefits
  • Improves performance
  • Prevents server crashes
  • High availability
  • Fault tolerance
javascript
Client → Load Balancer → Multiple Servers

const servers = [
  "Server-1",
  "Server-2",
  "Server-3"
];

let index = 0;

function getServer() {
  const server = servers[index];
  index = (index + 1) % servers.length;
  return server;
}

console.log(getServer());
console.log(getServer());
console.log(getServer());
Intermediate
4. What is Caching?

Caching is the process of storing frequently accessed data in fast storage so that future requests can be served quickly.

Instead of repeatedly fetching data from the database, the system first checks the cache.

Advantages
  • Faster response time
  • Reduced database load
  • Improved performance
  • Better user experience
javascript
const cache = {};

function getUser(id) {

  // Check cache first
  if (cache[id]) {
    console.log("Data from cache");
    return cache[id];
  }

  // Simulate database call
  console.log("Data from database");

  const user = {
    id,
    name: "AK"
  };

  cache[id] = user;

  return user;
}

getUser(1);
getUser(1);
Intermediate
5. What is Rate Limiting?

Rate Limiting controls how many requests a user or client can make within a specific time period.

It protects systems from abuse, spam, brute-force attacks, and server overload.

Use Cases
  • Login APIs
  • Payment APIs
  • Public APIs
  • OTP systems
javascript
const requests = {};

function rateLimiter(ip) {
  const limit = 5;

  if (!requests[ip]) {
    requests[ip] = 1;
  } else {
    requests[ip]++;
  }

  if (requests[ip] > limit) {
    console.log("Too many requests");
    return false;
  }

  console.log("Request allowed");
  return true;
}

rateLimiter("192.168.1.1");
Advanced
6. What are Microservices?

Microservices architecture divides a large application into multiple small independent services.

Each service handles a specific business functionality and communicates through APIs.

Examples
  • User Service
  • Payment Service
  • Notification Service
  • Order Service
Advantages
  • Independent deployment
  • Easy scalability
  • Fault isolation
  • Technology flexibility
javascript
// User Service
app.get("/users/:id", (req, res) => {
  res.send({
    id: req.params.id,
    name: "AK"
  });
});

// Order Service
app.get("/orders/:id", (req, res) => {
  res.send({
    orderId: req.params.id,
    amount: 500
  });
});
Advanced
7. What is Database Sharding?

Database sharding is a technique used to split large databases into smaller parts called shards.

Each shard stores a portion of the data to improve scalability and performance.

Benefits
  • Faster queries
  • Reduced load
  • Better scalability
  • Distributed storage
javascript
Shard 1 → Users 1 - 1000
Shard 2 → Users 1001 - 2000
Shard 3 → Users 2001 - 3000

function getShard(userId) {

  if (userId <= 1000) {
    return "Shard 1";
  }

  if (userId <= 2000) {
    return "Shard 2";
  }

  return "Shard 3";
}

console.log(getShard(1500));
Advanced
8. What is WebSocket?

WebSocket is a communication protocol that provides full-duplex communication between client and server.

Unlike HTTP, WebSocket keeps the connection open for real-time data transfer.

Real-time Use Cases
  • Chat applications
  • Live notifications
  • Online gaming
  • Stock market updates
javascript
const socket = new WebSocket("ws://localhost:8080");

socket.onopen = () => {
  console.log("Connected");
};

socket.onmessage = (event) => {
  console.log("Message:", event.data);
};

socket.send("Hello Server");