Partitioning & Replication

Partitioning: Process of dividing data into independent segments.

Need of Partitioning:

  • If the data is served without partitioning, every time a request comes to the machine, the whole data needs to be traversed, it will also be resource- and time-consuming.
  • In partitioning, there is less load on partitioned systems, unlike non-partitioned systems in case of failure because the load will be independent in case of partitioned systems, unlike the latter.
  • Partitioning is usually done in the form of indexes that are based on most used patterns.
  • Provides increased fault tolerance and reliability.
  • Used by NoSQL databases like CassandraDB, DynamoDB, etc.

The reason why these databases never offer immediate acknowledgment to write operations is that for a single write operation, multiple requests are generated to write in the main table and all different criteria-based partitions.

Replication: creating copies of data on multiple machines.

2 protocols:

1. Primary Replication Protocols:

  • All write requests are made by primary replicas and read requests are handled by backup replicas. The primary replica ensures that the request is also acknowledged by backup replicas to make sure no inconsistencies.
  • This will be useful in the case of banking where each operation is critical and hence we can't afford a single mistake.


2. Consensus Replication Protocols:

  • When any requests come more than half of the nodes need to acknowledge it successfully before getting it successful. Hence the name Consensus Protocol. eg: Raft and Paxos.

要查看或添加评论,请登录

Pushkal Goyal的更多文章

  • Merkle Tree :

    Merkle Tree :

    A concept popular in Distributed Systems. Merkle Tree is a binary tree used for easy search and secure verification of…

  • Interpreter and Compiler

    Interpreter and Compiler

    Python => interpreter & other languages like CPP => compiler-based languages. I didn't know the way I could see the…

  • Consistent Hashing

    Consistent Hashing

    It is one of the system design techniques used to optimize performance issues with horizontal hashing while scaling…

  • Circular Imports in Python

    Circular Imports in Python

    **packages : directory with __init__.py **modules : files with .

  • POSIX

    POSIX

    It stands for Portable Operating System Interface. This is a compliance introduced by the US government for procurement…

社区洞察

其他会员也浏览了