design doc(to be continued) - #9
Conversation
|
|
||
| ## Specifications | ||
| ### Sharding strategy | ||
| We plan to use Document based sharding. A comparison between doc based sharding and term based sharding([stolen from Jeff Dean](http://web.stanford.edu/class/cs276/Jeff-Dean-Stanford-CS276-April-2015.pdf)): |
There was a problem hiding this comment.
Awesome you found this comparison!
|
我喜欢一个node里可以有多个shard。这样把算法设计中的shard概念和系统运维中的node数量decouple了。 Sequential Document ID Generation我在想,如果反正我们得把每一个document都persist了。那么是不是可以按照document被加入到我们系统(或者说被persist的顺序)编号作为document ID? 换句话说,document ID就是从0开始的——如果要删除一个document,则在persist storage(例如S3)里把那个document标记为removed,但是并不真的删除,尤其是不会改变document ID序列。 这样,我们就可以做到“每N个document构成一个shard”。而且新来的document会进入新的shards。 Indexer Root in addition to Search Root另外,是不是可以(或者说应该)在search root之外再加一个进程,indexer root? ![Alt text](http://g.gravizo.com/g? IndexerRoot负责document ID的序列化生成。 具体的说,SearchRoot 实现RPC Go RPC calls 都是被多goroutine并发执行的,为了产生sequential document Id,
以上想法都假设AddDocument的调用频率远远小于Search的调用频率。 |
Click View button to see the fully rendered markdown text.