# 1.4. Non-Functional Requirements in System Design

Non-functional requirements (NFRs) specify criteria that can be used to judge the operation of a system, rather than specific behaviors. They are critical for the success of a system as they ensure that the system not only does what it's supposed to do, but does it well.

Let's explore some key non-functional requirements:

### 1. Scalability

Scalability is the ability of a system to handle growth.

* **Vertical Scalability (Scaling Up)**: Adding more power to an existing machine.
* **Horizontal Scalability (Scaling Out)**: Adding more machines to a system.

Considerations:

* How does the system perform as the number of users increases?
* Can the system handle sudden spikes in traffic?
* How easy is it to add more resources to the system?

### 2. Reliability

Reliability is the ability of a system to perform its intended function consistently and without failure.

Key aspects:

* **Fault Tolerance**: The ability to continue operating in the event of a failure.
* **Recoverability**: The ability to restore data or service in case of a failure.

Considerations:

* What is the acceptable downtime for the system?
* How are failures detected and handled?
* What redundancy measures are in place?

### 3. Availability

Availability is the proportion of time a system is in a functioning condition. It's often measured in nines (e.g., 99.99% availability).

Calculation: Availability = (Total Time - Downtime) / Total Time

Considerations:

* What level of availability is required?
* How is the system designed to minimize downtime?
* Are there geographic or time-based availability requirements?

### 4. Maintainability

Maintainability is the ease with which a system can be modified to correct faults, improve performance, or adapt to a changed environment.

Key aspects:

* **Modularity**: How well is the system divided into independent components?
* **Readability**: How easy is it to understand the system's code and architecture?
* **Testability**: How easy is it to test changes to the system?

Considerations:

* How quickly can bugs be identified and fixed?
* How easily can new features be added?
* Is the system well-documented?

### 5. Extensibility

Extensibility is the ability to add new functionality or modify existing functionality easily.

Considerations:

* How easy is it to add new features without disrupting existing functionality?
* Can third-party developers extend the system?
* Is the system designed with future growth in mind?

### Other Important Non-Functional Requirements

* **Performance**: Response time, throughput, resource utilization.
* **Security**: Authentication, authorization, data protection, encryption.
* **Usability**: User interface design, accessibility, user experience.
* **Compatibility**: Ability to work with other systems or in different environments.
* **Portability**: Ease of moving the system to a different environment.
* **Compliance**: Adherence to standards, regulations, or legal requirements.

When designing a system, it's crucial to consider and balance these non-functional requirements. They often involve trade-offs, and the right balance depends on the specific needs of your project. Always document these requirements clearly and ensure that they are measurable and testable.
