📝 Reliability in distributed system (8 MCQs)
Maintaining Service Despite Machine and Network Failures
Reliability in a distributed system concerns the ability of its components and services to perform correctly over time despite hardware faults, software defects, or communication problems. Multiple nodes can provide alternative service paths, replicated data, and recovery options. Distributed operating system mechanisms coordinate these resources so a failure in one component does not necessarily make the entire system unavailable.
Why Independent Components Create Failure Challenges
Every additional machine, network connection, and service introduces possible failure points. A computer may crash while others remain operational, or a network partition may prevent nodes from communicating. Distributed systems therefore need redundancy and failure handling rather than assuming that every component remains available continuously.
Replication, Monitoring and Failover Procedures
Systems monitor component health through heartbeats, timeouts, and service checks. Important data or services may be replicated across nodes. When a failure is detected, a coordinator or consensus-based mechanism may select an available replica or redirect requests. Recovery procedures restore failed components and reconcile state where necessary.
Example of Database Replica Failover
A primary database server handles application writes while a secondary replica receives updates. If the primary fails, a failover mechanism promotes the secondary according to the system's consistency and election rules. Applications reconnect to the available database service, although recent transactions may be affected by replication lag.
Availability, Consistency and Redundancy Trade-Offs
Redundant nodes and replicas can improve service availability and reduce recovery time. However, replication consumes resources and may introduce stale reads or conflicting updates. Network partitions complicate coordination, and correlated failures can disable several replicas together. Reliability therefore depends on independent failure domains, tested recovery plans, and correct consistency protocols.
Misconceptions About Distributed Reliability
'Replication guarantees that no data is lost' ignores asynchronous replication lag. 'A timeout proves a machine has crashed' is false because network delay can produce the same observation. 'Two replicas always make failover straightforward' overlooks split-brain risks and the need for coordination.
Exam Focus: Replication and Failure Recovery
Distinguish reliability, availability, and fault tolerance. Trace monitoring, failure detection, replica selection, and service restoration. Questions may ask why timeouts cannot prove a crash or compare synchronous and asynchronous replication, especially their effects on response time, consistency, and possible data loss.
Key Terms of Distributed Reliability
- Reliability - Correct operation over time.
- Replica - Copy of data or service.
- Failover - Switching service to an alternative node.
- Heartbeat - Periodic message indicating node activity.
- Split brain - Conflicting active system leaders.
📝 All Reliability in distributed system MCQs
Q1. What is the definition of reliability in a distributed system?
📖 Explanation: The correct answer is A because reliability is defined as the probability that a component or system performs its intended function without failure for a given time period. Options B, C, and D describe unrelated concepts such as throughput, resource sharing, and coupling, which do not measure failure avoidance. Understanding this definition helps students recognize that reliability quantifies uptime, a key metric when evaluating distributed systems in real‑world deployments.
Q2. Why does replicating a service on multiple nodes increase the reliability of a distributed system?
📖 Explanation: The correct answer is C because when a service is replicated on several nodes, the failure of a single node does not make the service unavailable; the remaining replicas can continue to handle requests. Option A is incorrect since replication does not primarily affect latency. Option B describes load balancing, which is a side effect but not the main reliability benefit. Option D is wrong because replication actually increases code complexity. Recognizing replication’s role in fault tolerance explains why designers use it to achieve higher reliability in production systems.
Q3. How does the concept of fault tolerance relate to reliability in distributed systems?
📖 Explanation: The correct answer is B because fault tolerance refers to a system’s ability to keep operating despite component failures, and this capability directly raises the overall reliability of a distributed system. Option A is false; fault tolerance is a major factor in reliability. Option C is inaccurate because fault tolerance deals with availability, not security. Option D is misleading; while replication is a fault‑tolerance technique, it does not eliminate the need for other mechanisms. Understanding that fault‑tolerant designs preserve service continuity helps explain why reliability improves as more failure‑handling strategies are added.
Q4. Which factor most directly reduces reliability when network latency increases significantly?
📖 Explanation: The correct answer is D because longer response times are a direct symptom of increased latency, and they can cause timeouts or user dissatisfaction, which lower the perceived reliability of the system. Option A describes higher bandwidth, which actually helps mitigate latency effects. Option B mentions more CPU cycles, which does not address network delay. Option C refers to larger storage capacity, unrelated to reliability. Recognizing that latency‑induced delays degrade reliability helps engineers prioritize low‑latency network design when building dependable distributed services.
Q5. A client at site A needs a file stored on a server at site B. If the server crashes, which mechanism should the system use to keep the service reliable?
📖 Explanation: The correct answer is C because a replica server at site C can take over the role of the failed server at site B, ensuring the client still obtains the needed file and the service remains reliable. Option A merely informs the user, which does not maintain service continuity. Option B redirects to a different application, which does not provide the same file. Option D caches the file locally, but caching may be outdated and does not address the immediate failure. Using failover to a replica illustrates a practical technique for preserving reliability in real‑world distributed environments.
Q6. In a system that stores data with a replication factor of 3, how many node failures can be tolerated without losing data?
📖 Explanation: The correct answer is B because with a replication factor of three the data is stored on three separate nodes, so the system can lose up to two nodes and still have at least one copy remaining, preserving data availability. Option A suggests no failures can be tolerated, which is false. Option C claims three failures can be tolerated, which would mean no copies left. Option D says only one failure is allowed, which underutilizes the redundancy. Knowing the tolerance level helps architects decide how many replicas are needed to meet reliability goals in fault‑prone environments.
Q7. A company can add either redundant network links or additional backup power supplies to improve reliability. Which choice directly addresses reliability due to hardware failures?
📖 Explanation: The correct answer is A because adding redundant network links creates alternative paths for data, so if one link fails the traffic can be rerouted, directly improving reliability against hardware failures. Option B, backup power supplies, helps with power outages but does not address failures of the network hardware itself. Option C, upgrading software, may improve performance but is not a hardware reliability measure. Option D, increasing user training, does not affect the physical durability of the system. Selecting redundant links illustrates a concrete step engineers take to keep distributed services operational despite component failures.
Q8. If each node has a reliability of per year and a service requires three independent nodes to operate, what is the overall reliability of the service?
📖 Explanation: The correct answer is B because the overall reliability of a service that requires three independent nodes is the product of the individual reliabilities: , which rounds to approximately 0.86. Option A gives the reliability of a single node, not the combined service. Option C (0.90) overestimates the product, and Option D (0.70) underestimates it. This calculation shows how combining multiple components reduces the probability of all of them functioning together, a key insight for designers who must balance redundancy with the diminishing returns on reliability in real‑world systems.)