Video in progress
What is the difference between functional and non-functional requirements? Give an example.
A functional requirement says what the system does (a user sends a message, places an order). A non-functional requirement says how well it does it: speed, availability, security, how much load it can take.
📖 Answer
Say you are asked to design a URL shortener.
Functional:
- given a long URL, it returns a short link;
- opening the short link redirects to the original address;
- you can set an expiry time for a link.
Non-functional:
- a redirect takes under 50 ms;
- the service is up 99.9% of the year;
- it handles 100 million redirects a day;
- the short code can't be guessed.
In practice it is the non-functional requirements that shape the architecture. You can implement "send a message" for a 100-person chat and for a 100-million-user messenger — the difference is load and reliability. So in the first 5 minutes of an interview, ask for both lists.
Sign up to mark studied questions and save your progress.