# Sharding in production

**URL:** <https://discuss.dgraph.io/t/sharding-in-production/6600>\
**Category:** Dgraph\
**Created:** [May 5, 2020, 10:17am UTC](https://discuss.dgraph.io/t/sharding-in-production/6600 "2020-05-05T10:17:34Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![madhousez](https://yyz1.discourse-cdn.com/flex007/user_avatar/discuss.dgraph.io/madhousez/32/4624_2.png) [@madhousez](https://discuss.dgraph.io/u/madhousez)\
**Post date:** [May 5, 2020, 10:17am UTC](https://discuss.dgraph.io/t/sharding-in-production/6600/1 "2020-05-05T10:17:34Z")

</div>

From what I have read in the docs, during a predicate rebalance this will cause the predicate to go in to read only mode, and you should queue up the the work until it back in write only mode.

This is fine for a mostly offline system but how can this be good for a live system? Maybe I have read something wrong, but this does seem very good for feedback type system like DAG processing, which dgraph would help simplify.

---

<div class="post-metadata">

**Author:** ![mrjn](https://yyz1.discourse-cdn.com/flex007/user_avatar/discuss.dgraph.io/mrjn/32/775_2.png) [@mrjn](https://discuss.dgraph.io/u/mrjn)\
**Post date:** [May 6, 2020, 11:27pm UTC](https://discuss.dgraph.io/t/sharding-in-production/6600/2 "2020-05-06T23:27:10Z")

</div>

> [@madhousez](#):
>
> This is fine for a mostly offline system but how can this be good for a live system?

That was how Google’s Bigtable used to work. During tablet migration, it would pause writes to that tablet. Note that migrations are not that common. You could also manually trigger these moves during periods of “maintenance”, etc.

We could definitely improve it over time. Allow writes while a move is going on, but it is not a priority for now.

---

<div class="post-metadata">

**Author:** ![dereksfoster99](https://yyz1.discourse-cdn.com/flex007/user_avatar/discuss.dgraph.io/dereksfoster99/32/2886_2.png) [@dereksfoster99](https://discuss.dgraph.io/u/dereksfoster99)\
**Post date:** [May 7, 2020, 8:01pm UTC](https://discuss.dgraph.io/t/sharding-in-production/6600/3 "2020-05-07T20:01:43Z")

</div>

Welcome Owen. Look forward to hearing more from you on the forums!

---

<div class="post-metadata">

**Author:** ![venkatkiran.s](https://avatars.discourse-cdn.com/v4/letter/v/34f0e0/32.png) [@venkatkiran.s](https://discuss.dgraph.io/u/venkatkiran.s)\
**Post date:** [May 22, 2020, 8:31am UTC](https://discuss.dgraph.io/t/sharding-in-production/6600/4 "2020-05-22T08:31:01Z")

</div>

i am also having the similar doubt about the data migration in sharding.

You added that  
"You could also manually trigger these moves during periods of “maintenance”,

Can you please refer me how to do this.  
And also can we add our manual way to control the predicate to group combination.  
This will help the client to control based on their data.

---

<div class="post-metadata">

**Author:** ![mrjn](https://yyz1.discourse-cdn.com/flex007/user_avatar/discuss.dgraph.io/mrjn/32/775_2.png) [@mrjn](https://discuss.dgraph.io/u/mrjn)\
**Post date:** [May 22, 2020, 3:14pm UTC](https://discuss.dgraph.io/t/sharding-in-production/6600/5 "2020-05-22T15:14:33Z")

</div>

Look for moveTablet here: [https://dgraph.io/docs/deploy/#more-about-dgraph-zero](https://dgraph.io/docs/deploy/#more-about-dgraph-zero)

You can set the rebalance interval flag in Zero to something arbitrarily high, so Zero wouldn’t do tablet moves automatically.
