š—„š—²š—½š—¹š—¶š—°š—®š˜š—¶š—¼š—» š—®š—»š—± š—¦š—µš—®š—æš—¶š—»š—“ š—¶š—» š——š—®š˜š—®š—Æš—®š˜€š—²š˜€ – š—Ŗš—µš—²š—» š—®š—»š—± š—Ŗš—µš˜†?

January 21, 2026

š™ƒš™–š™£š™™š™”š™žš™£š™œ š™”š™¤š™–š™™š™Ø š™¤š™› š™§š™šš™–š™™š™Ø š™–š™£š™™ š™¬š™§š™žš™©š™šš™Ø š™¤š™£ š™– š™Øš™žš™£š™œš™”š™š š™™š™–š™©š™–š™—š™–š™Øš™š š™˜š™–š™£ š™—š™šš™˜š™¤š™¢š™š š™¤š™«š™šš™§š™¬š™š™šš™”š™¢š™žš™£š™œ. š™š™¤ š™¢š™–š™£š™–š™œš™š š™©š™š™žš™Ø, š™¬š™š š™˜š™§š™šš™–š™©š™š š™˜š™¤š™„š™žš™šš™Ø š™¤š™› š™¤š™Ŗš™§ š™™š™–š™©š™–š™—š™–š™Øš™š š™©š™¤ š™š™–š™£š™™š™”š™š š™¢š™¤š™§š™š š™§š™šš™¦š™Ŗš™šš™Øš™©š™Ø š™Øš™žš™¢š™Ŗš™”š™©š™–š™£š™šš™¤š™Ŗš™Øš™”š™®. š™š™š™žš™Ø š™˜š™¤š™£š™˜š™šš™„š™© š™¢š™¤š™Øš™©š™”š™® š™–š™„š™„š™”š™žš™šš™Ø š™©š™¤ š™‰š™¤š™Žš™Œš™‡ š™™š™–š™©š™–š™—š™–š™Øš™šš™Ø.

š—Ÿš—²š—®š—±š—²š—æ-š—™š—¼š—¹š—¹š—¼š˜„š—²š—æ š— š—²š—°š—µš—®š—»š—¶š˜€š—ŗ (š— š—®š˜€š˜š—²š—æ-š—¦š—¹š—®š˜ƒš—²)

• One leader handles all š˜„š—æš—¶š˜š—²š˜€. • Followers are copies of the leader and handle reads. • Followers may not always be fully up-to-date; this is called š—²š˜ƒš—²š—»š˜š˜‚š—®š—¹ š—°š—¼š—»š˜€š—¶š˜€š˜š—²š—»š—°š˜†. • Data syncing from leader to followers is called š—æš—²š—½š—¹š—¶š—°š—®š˜š—¶š—¼š—», which can be š˜€š˜†š—»š—°š—µš—æš—¼š—»š—¼š˜‚š˜€ or š—®š˜€š˜†š—»š—°š—µš—æš—¼š—»š—¼š˜‚š˜€. • In synchronous replication, writes are slower because the leader waits for followers to update before completing the write. • Reads are usually routed to followers to reduce latency and spread load. • If the leader fails, a follower can be promoted to leader.

š—Ÿš—²š—®š—±š—²š—æ-š—Ÿš—²š—®š—±š—²š—æ š—„š—²š—½š—¹š—¶š—°š—®š˜š—¶š—¼š—» (š— š˜‚š—¹š˜š—¶-š—Ÿš—²š—®š—±š—²š—æ)

• š™ˆš™Ŗš™”š™©š™žš™„š™”š™š š™£š™¤š™™š™šš™Ø š™–š™˜š™© š™–š™Ø š™”š™šš™–š™™š™šš™§š™Ø, each handling both reads and writes independently. • This allows scaling write capacity by distributing writes across leaders. • Because nodes sync asynchronously, the system may have lower immediate consistency (š™–š™”š™Øš™¤ š™ š™£š™¤š™¬š™£ š™–š™Ø š™”š™¤š™¤š™Øš™šš™”š™® š™˜š™¤š™£š™Øš™žš™Øš™©š™šš™£t). • Conflicts can arise if two leaders make conflicting writes, needing conflict resolution. • Works well for distributed systems with users across regions, offering high availability and fault tolerance. • Compared to synchronous replication, it offers lower latency but weaker consistency.

š—¦š—µš—®š—æš—±š—¶š—»š—“ • Splits a large database into smaller parts called shards to handle huge datasets. • Data is partitioned based on a key, which can be:

  1. Range-based (e.g., A-L, M-Z)
  2. Hash-based (data distributed by a hash function)
  3. NoSQL databases often have built-in sharding; SQL databases usually require manual sharding.
  4. Manual sharding in SQL databases can compromise ACID guarantees making transactions less reliable.

š˜œš˜Æš˜„š˜¦š˜³š˜“š˜µš˜¢š˜Æš˜„š˜Ŗš˜Æš˜Ø š˜µš˜©š˜¦š˜“š˜¦ š˜¤š˜°š˜Æš˜¤š˜¦š˜±š˜µš˜“ š˜©š˜¦š˜­š˜±š˜“ š˜µš˜° š˜„š˜¦š˜“š˜Ŗš˜Øš˜Æ š˜„š˜Ŗš˜“š˜µš˜³š˜Ŗš˜£š˜¶š˜µš˜¦š˜„ š˜„š˜¢š˜µš˜¢š˜£š˜¢š˜“š˜¦ š˜“š˜ŗš˜“š˜µš˜¦š˜®š˜“ š˜µš˜©š˜¢š˜µ š˜£š˜¢š˜­š˜¢š˜Æš˜¤š˜¦ š˜±š˜¦š˜³š˜§š˜°š˜³š˜®š˜¢š˜Æš˜¤š˜¦, š˜³š˜¦š˜­š˜Ŗš˜¢š˜£š˜Ŗš˜­š˜Ŗš˜µš˜ŗ, š˜¢š˜Æš˜„ š˜„š˜¢š˜µš˜¢ š˜¤š˜°š˜Æš˜“š˜Ŗš˜“š˜µš˜¦š˜Æš˜¤š˜ŗ š˜¢š˜¤š˜¤š˜°š˜³š˜„š˜Ŗš˜Æš˜Ø š˜µš˜° š˜“š˜±š˜¦š˜¤š˜Ŗš˜§š˜Ŗš˜¤ š˜¢š˜±š˜±š˜­š˜Ŗš˜¤š˜¢š˜µš˜Ŗš˜°š˜Æ š˜Æš˜¦š˜¦š˜„š˜“.

Comments (0)