📘 System Design - Concepts

Functional vs Non-Functional Requirements

What exactly should the system do, and how should the system behave? This is where Functional Requirements and Non-Functional Requirements come in.

S

Site Administrator

📅 Sep 26, 2026 🕒 6 min read 👁 33 views
☆ Save 𝕏 in f ✆
Functional vs Non-Functional Requirements

Before designing any software system, we need to understand one important thing:

What exactly should the system do, and how should the system behave?

This is where Functional Requirements and Non-Functional Requirements come in.

What Are Functional Requirements?

Functional Requirements describe what the system should do.

They represent the features and business operations that users expect from the application.

For example, in an online shopping application:

  • User can register.
  • User can login.
  • User can search products.
  • User can add products to cart.
  • User can place an order.
  • User can make payment.
  • User can view order history.

These are Functional Requirements because they describe actual functionality.

Real-World Example

Consider a banking application.

The business may say:

  • Customer can login.
  • Customer can check account balance.
  • Customer can transfer money.
  • Customer can view transactions.
  • Customer can download a statement.

These describe what the application must do.

flowchart LR
    User --> Login
    User --> Balance
    User --> Transfer
    User --> Transactions
    User --> Statement

What Are Non-Functional Requirements?

Non-Functional Requirements describe how the system should behave.

They usually describe qualities and constraints of the system.

For example:

  • The API should respond within 200 milliseconds.
  • The system should support 100,000 users.
  • The application should be available 24 hours a day.
  • User data must be encrypted.
  • The system should recover after a server failure.
  • The application should handle increased traffic.

These requirements don't describe a specific business feature. They describe the expected quality and behavior of the system.

Functional vs Non-Functional

Functional Requirement Non-Functional Requirement
What the system does How the system behaves
Business features System qualities
Login user Login should complete within 2 seconds
Transfer money Transfer must be secure and reliable
Search products Search should handle high traffic

Example: Login System

Suppose we are building a login API using ASP.NET Core.

The functional requirement could be:

"User should be able to login using email and password."

The API could look like this:

[HttpPost("login")]
public async Task Login(LoginRequest request)
{
    var user = await _context.Users
        .FirstOrDefaultAsync(x => x.Email == request.Email);

    if (user == null)
        return Unauthorized();

    if (!VerifyPassword(request.Password, user.PasswordHash))
        return Unauthorized();

    return Ok(new
    {
        message = "Login successful"
    });
}

This implements the functional requirement.

Now Think About Non-Functional Requirements

Imagine the business gives us these additional requirements:

  • Login API should support 10,000 requests per second.
  • Response time should normally be below 200 milliseconds.
  • Password must be stored securely.
  • The system should remain available if one application server fails.

These are Non-Functional Requirements.

Our architecture now needs to consider these requirements.

flowchart LR
    User --> LoadBalancer
    LoadBalancer --> API1
    LoadBalancer --> API2
    API1 --> Database
    API2 --> Database

Multiple API servers can help handle increased traffic and provide redundancy.

SQL Server Example

Suppose the functional requirement is:

"Customer can view order history."

We may have an Orders table:

CREATE TABLE Orders
(
    Id INT PRIMARY KEY IDENTITY,
    UserId INT NOT NULL,
    OrderDate DATETIME2 NOT NULL,
    TotalAmount DECIMAL(18,2) NOT NULL
);

The API can retrieve orders for a customer:

[HttpGet("users/{userId}/orders")]
public async Task GetOrders(int userId)
{
    var orders = await _context.Orders
        .Where(x => x.UserId == userId)
        .OrderByDescending(x => x.OrderDate)
        .ToListAsync();

    return Ok(orders);
}

The functional requirement is satisfied.

But what if the Orders table contains 500 million records?

Now we have a performance requirement to consider.

We may need appropriate indexes, pagination and database optimization.

CREATE INDEX IX_Orders_UserId_OrderDate
ON Orders(UserId, OrderDate DESC);

We can also use pagination instead of returning every order:

var orders = await _context.Orders
    .Where(x => x.UserId == userId)
    .OrderByDescending(x => x.OrderDate)
    .Skip((page - 1) * pageSize)
    .Take(pageSize)
    .ToListAsync();

Here, the feature itself is functional, while the performance and scalability requirements influence how we implement it.

One Requirement Can Have Both Parts

Consider this requirement:

"Users should be able to search products and the search should return results within 300 milliseconds."

There are actually two requirements here.

Functional: Users can search products.

Non-Functional: Search should respond within 300 milliseconds.

This distinction is very important during System Design.

Common Non-Functional Requirements

The most common Non-Functional Requirements in System Design interviews are:

  • Scalability – Can the system handle increasing traffic?
  • Availability – Is the system available when users need it?
  • Reliability – Does the system consistently perform correctly?
  • Performance – How efficiently does the system respond?
  • Security – Can we protect users and data?
  • Maintainability – Can developers easily modify the system?
  • Fault Tolerance – Can the system continue working when something fails?

Why Are These Requirements Important?

Imagine someone says:

"Build a payment system."

If we only think about functionality, we may design:

flowchart LR
    User --> API
    API --> Payment
    Payment --> Database

But a real payment system needs much more.

What happens if the payment server fails?

What happens if the database is unavailable?

What happens if the same request is received twice?

What happens if thousands of payments arrive at the same time?

What happens if the payment provider takes 10 seconds to respond?

These questions come from Non-Functional Requirements and system constraints.

How to Identify Them in an Interview

When the interviewer gives you a system design problem, first identify the functional requirements.

Ask:

  • What can the user do?
  • What are the main business operations?
  • What are the important APIs?

Then identify the non-functional requirements.

Ask:

  • How many users?
  • How many requests per second?
  • What response time is expected?
  • How much data will be stored?
  • What availability is required?
  • What happens when components fail?
flowchart TD
    Requirement --> Functional
    Requirement --> NonFunctional

    Functional --> Features
    NonFunctional --> Scalability
    NonFunctional --> Availability
    NonFunctional --> Performance
    NonFunctional --> Security

Key Takeaways

  • Functional Requirements describe what the system should do.
  • Non-Functional Requirements describe how the system should behave.
  • Login, payment and order creation are functional requirements.
  • Performance, scalability, availability and security are non-functional requirements.
  • A single business requirement can contain both functional and non-functional requirements.
  • Understanding these requirements is the first important step before designing the architecture.

Conclusion

A good System Design starts with understanding requirements.

Functional Requirements tell us what features we need to build. Non-Functional Requirements tell us how well those features must work.

For example, "users can place an order" is functional. "The system should support 10,000 orders per second with low response time" is non-functional.

Once we clearly understand both, we can start making the right architecture and technology decisions.

Comments & Ratings (0)

Log in or create a student account to comment and rate this article.

Be the first to comment on this article.

Never miss a new post 📬

Get an email whenever a new article, project, cheatsheet or video drops.

✅

ℹ️