If a system is fault tolerant, then it is also highly available.
A fault tolerant system aims 0 downtime.
A fault tolerant system is designed to continue to operate even if one of its connecting components fails.
eg. An airplane is a fault tolerant system, even if one engine fails, the other engine resumes immediately, and the system continues to operate.
๐ญ.๐ฏ ๐ฅ๐ฒ๐๐ถ๐น๐ถ๐ฒ๐ป๐ฐ๐ฒ
A resilience system is almost the same as a fault tolerant system, one extra thing is,
a resilient system is designed to be periodically tested for fault tolerance.
A resilient system has a practice of periodically testing the system for faults by deliberately generating faults. Done using caos engineering, game day engineering etc
You may have a highly available system, but it might still suffer with frequent data corruption, and returns incorrect results.
Or the system is too slow and response is no longer useful.
Although we have availability, we donโt have reliability.
Fault tolerant, resilience, and reliability relate to the same concept, availability.
When your interviewer asks you to design a fault-tolerant or resilient or reliable system, apply the same set of principles and best practices that is used for availability.
Elasticity is similar to scalability but it's for short term, tactical needs.
If our system is elastic, we can start with N machines at the start of the day, and keep adding machines throughout the day as the load increases. After the peak load has passed, we gradually decrease the number of machines.
A highly performance system is quick with its request and response processing.
If your interviewer asked you to design a performant system, think in terms of latency and throughput.
๐ฐ. ๐๐๐ฟ๐ฎ๐ฏ๐ถ๐น๐ถ๐๐
In a durable system, once data is successfully submitted, it can not be lost.
You can achieve durability using
- Backup
- Raid
- Replication
๐ฑ. ๐๐ผ๐ป๐๐ถ๐๐๐ฒ๐ป๐ฐ๐
Consistency guarantees that your data is consistent across all distributed copies.
In a large distributed system consistency is hard to achieve.
Cap theorem tells that in case of a network partition, you can choose either consistent or availability.
๐ฒ. ๐ ๐ฎ๐ถ๐ป๐๐ฎ๐ถ๐ป๐ฎ๐ฏ๐ถ๐น๐ถ๐๐
Maintainability is the ability of the system to go through repairs/modifications while it is up and running.
Once a fault is detected, it is desirable to be able to apply the necessary improvements asap, without having to shut down the system.
๐ณ. ๐ฆ๐ฒ๐ฐ๐๐ฟ๐ถ๐๐
Security assures that all data within the system or its part is protected against any malware attacks/unauthorized access.
Security system include three fundamentals attributes, often referred to as the CIA triad
- Confidentiality
- Integrity
- availability
8. Cost
Cost non-functional requirement can be classified into - Development cost
- Maintenance cost
- Resource cost
Closing this thread now.
These are important system design concepts, and each non-functional requirement deserves a detailed post of its own.
More on that later.
Retweet and follow @happydecoder โค๏ธ
โข โข โข
Missing some Tweet in this thread? You can try to
force a refresh
This one thread will teach you everything that you need to know about ๐๐ก๐ฆ ( ๐๐ผ๐บ๐ฎ๐ถ๐ป ๐ก๐ฎ๐บ๐ฒ ๐ฆ๐๐๐๐ฒ๐บ ) ๐
๐งต
We use IP addresses to visit websites on the internet.
Since humans cannot easily remember IP addresses to visit a website(domain name),
A global phone book was created.
The phone book maintains mappings of all domain names to IP addresses.
Client remembers the domain name.
It forwards the request with the domain name to the DNS server.
And DNS servers reply with the actual IP address associated with that domain name.
Clients move on to forward the request to that IP address.
Idempotence is a property of certain operations/API.
An idempotent api can be repeated an arbitrary number of times.
And the result will be the same as if it had been done only once.
e.g. Sorting a list is idempotent, as repeated sorting has no effect
Idempotent operations are often used in the design of APIs, where a request to perform an operation is guaranteed to happen at least once, but might also happen more than once.
If the operation is idempotent, then there is no harm in performing the operation two or more times.
Let's take a look at an idempotent API for payments deduct implemented using idempotency key.
An idempotency key is a unique string generated by the client.
For example, base64 ASCII characters.
The client sends the idempotency key with each request.