Zettelkasten

Partitioning(Sharding)

·수정 2026.04.24·수정 2

Range Based Partitioning

  • Pros: good locality for range queries
  • Cons: Hot Spot

Hash range Based Partitioning

  • arbitary sharding Pros: relatively evenly distribution, less hot spots Cons: No data locality for range query

Secondary Index

  • additional index to primary index

Local Secondary Index

  • have a second copy sorted by secondary index
  • it is saved in each node

Global Secondary Index

  • 별도의 독립된 테이블 형태로 저장됨
  • Pros: Now read using th index require reading from only one node
  • Cons: we may have to write to multiple shards at onece requires

Distributed Transactions

why?: need atmoicitiy

Two Phase Commit

  • cross partition writes

  • global secondary Indexes

  • Using coordinator node

  • commit log

  • Problems

    • a lot of points to fail
  • conclusion

    • Distributed transactions are hard!
    • we'll see how to make them more fault tolerant