Distributed Computing Junior

1 / 10

What are the Fallacies of Distributed Computing? Name at least three and explain how ignoring them leads to system failure.

Select the correct answer

1

Assuming servers are stateless, caches are warm, and queues are unbounded.

2

Assuming clocks are synchronized, retries are free, and nodes never crash.

3

Assuming the network is reliable, latency is zero, and bandwidth is infinite.

4

Assuming data is consistent, writes are atomic, and every read is cheap.

Explain the difference between 'Horizontal Scaling' and 'Vertical Scaling' from a state-management perspective.

Select the correct answer

1

Vertical scaling keeps state on one machine; horizontal scaling requires distributing or externalizing state.

2

Vertical scaling externalizes state to a store; horizontal scaling keeps state local to each node.

3

Vertical scaling partitions state by key; horizontal scaling stores all of the state in memory.

4

Vertical scaling replicates state across nodes; horizontal scaling keeps a single shared local copy.

What is an RPC, and what challenges arise from treating a remote call like a local function call?

Select the correct answer

1

It invokes a procedure via shared memory; unlike sockets it avoids latency, retries, and any serialization.

2

It invokes a procedure on a remote machine; unlike local calls it faces latency, partial failure, and serialization.

3

It invokes a procedure inside the same process; unlike threads it avoids locks, deadlocks, and shared memory.

4

It invokes a procedure on a remote machine; like local calls it is instant, reliable, and always succeeds.

What is the difference between the request/response and publish/subscribe coordination paradigms?

Select the correct answer

1

Request/response broadcasts to all listeners; pub/sub sends one targeted message and waits for a single acknowledgment.

2

Request/response uses a message broker for buffering; pub/sub connects sender and receiver directly for each reply.

3

Request/response is direct and one-to-one; pub/sub is decoupled and one-to-many via a broker without known receivers.

4

Request/response is decoupled and one-to-many; pub/sub is direct one-to-one requiring the sender to await a reply.

Why do we build distributed systems in the first place: what problems do scalability, fault tolerance, low latency, and geographic distribution solve?

Select the correct answer

1

To simplify deployment, reduce total code, and remove the need for monitoring or coordination across nodes.

2

To exceed a single machine's limits, survive component failures, and serve users nearer to their location.

3

To lower hardware cost, avoid concurrency issues, and ensure every request is processed on one central server.

4

To eliminate network overhead, guarantee strong consistency, and remove the need for any data replication.

What is partial failure, and why does it make distributed systems fundamentally harder to reason about than single-machine programs?

Select the correct answer

1

Some components fail while others keep running, and a caller often cannot tell whether a remote call succeeded, failed, or was merely delayed.

2

A running program crashes completely, forcing every node in the cluster to restart together so that they can regain a consistent state.

3

Data gets written only partly to disk, so each node must keep a write-ahead log to recover the missing portion after a reboot occurs.

4

Individual CPU cores fail on their own, so a single machine has to include redundant processors to keep executing the current workload.

What is the difference between Strong Consistency and Eventual Consistency? When would you choose one over the other?

Select the correct answer

1

Strong: reads always return the latest write; eventual: replicas converge later and reads can be stale; pick strong for critical data, eventual for scale.

2

Strong: writes are ordered per client only; eventual: writes are globally ordered; pick strong for availability needs, eventual for strict correctness needs.

3

Strong and eventual both guarantee latest reads but differ in latency; pick strong when latency matters, eventual when throughput matters more overall.

4

Strong: replicas converge over time and reads may be stale; eventual: reads always return the latest write; pick strong for scale, eventual for critical data.

What is redundancy, and how does replication contribute to availability versus consistency?

Select the correct answer

1

Redundancy means compressing repeated data; replication improves both availability and consistency automatically with no coordination overhead at all.

2

Redundancy means splitting data across nodes; replication raises consistency but reduces availability because every read must contact all replicas.

3

Redundancy means deleting duplicate copies; replication lowers availability but guarantees strong consistency because only one copy is ever writable.

4

Redundancy means keeping multiple copies; replication raises availability and durability but creates consistency challenges since copies may diverge.

What is the difference between 'Batch Processing' and 'Stream Processing' at a conceptual level?

Select the correct answer

1

Batch processes each record the instant it arrives; stream collects records into fixed windows that run only on a nightly schedule for reports.

2

Batch processes bounded, stored datasets in scheduled runs; stream processes unbounded data continuously as records arrive with low latency.

3

Batch runs only on a single machine at a time; stream always distributes its work across many machines to guarantee sub-millisecond latency.

4

Batch keeps results in memory without durability; stream writes every intermediate result to disk first to survive failures in long jobs.

How does load balancing work as a distributed-systems building block, and what are common strategies for distributing requests across nodes?

Select the correct answer

1

A balancer replicates each request to all backend nodes at once using strategies like broadcast fanout, gossip flooding, or leader election.

2

A balancer distributes incoming requests across backend nodes using strategies like round-robin, least-connections, or consistent hashing.

3

A balancer schedules background jobs onto idle backend nodes using strategies like priority queues, fair sharing, or deadline preemption.

4

A balancer merges responses from every backend node into one reply using strategies like quorum voting, majority merge, or weighted averaging.