0% found this document useful (0 votes)
27 views2 pages

Questions and Answers 5-10 Marks

Description is very good

Uploaded by

Sneha Gouda
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
27 views2 pages

Questions and Answers 5-10 Marks

Description is very good

Uploaded by

Sneha Gouda
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 2

Questions and Answers (5-10 Marks)

1. What is Sharding in distributed systems?

Sharding is a technique used to partition data horizontally across multiple servers. Each shard

stores a subset of the data, improving scalability and performance by balancing load across servers.

It helps handle high read/write traffic and is especially useful for large datasets.

2. Explain Master-Slave Replication with its benefits.

Master-Slave Replication involves one master node managing all writes and propagating updates to

slave nodes. Benefits include:

- Read Scalability: Handles more read requests by adding slaves.

- Fault Tolerance: Slaves act as backups for the master.

3. What are Write-Write conflicts? How can they be resolved?

Write-Write conflicts occur when two clients attempt to update the same data simultaneously,

leading to inconsistencies. They can be resolved using:

- Pessimistic Locking: Prevents conflicts by locking data during updates.

- Optimistic Locking: Detects and resolves conflicts after they occur, often using version stamps.

4. Define Eventual Consistency and its applications.

Eventual Consistency ensures that all replicas of data converge to the same state over time. It is

suitable for applications that can tolerate temporary inconsistencies, such as social media platforms

and caching systems.

5. What are Version Stamps? List their types.

Version Stamps are unique identifiers used to track changes and maintain data consistency. Types

include:

- Counters: Increment sequentially.

- GUIDs: Globally unique identifiers.


- Content Hashes: Deterministic and unique hashes.

- Timestamps: Time-based ordering.

- Vector Stamps: Multi-node counters for peer-to-peer systems.

6. Explain the CAP theorem in the context of distributed systems.

The CAP theorem states that in distributed systems, it is impossible to achieve all three properties

simultaneously:

- Consistency: All nodes reflect the same data at the same time.

- Availability: Every request receives a response.

- Partition Tolerance: The system continues to function despite network partitions.

Typically, systems trade off consistency for availability or vice versa.

7. What is the purpose of Quorums in distributed systems?

Quorums ensure strong consistency by requiring a minimum number of nodes to confirm an

operation. For example:

- Write Quorum (W): Minimum nodes required to confirm a write.

- Read Quorum (R): Minimum nodes required to confirm a read.

Strong consistency is achieved when R + W > N (total replicas).

You might also like