# How Gracefull Exit work(Design)?

**URL:** <https://forum.storj.io/t/how-gracefull-exit-work-design/3962>\
**Category:** FAQ\
**Tags:** graceful-exit\
**Created:** [January 22, 2020, 10:34pm UTC](https://forum.storj.io/t/how-gracefull-exit-work-design/3962 "2020-01-22T22:34:04Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![Vadim](https://storj.bcdn.literatehosting.com/letter_avatar/vadim/32/6_22734026db12803ebb3e059622ac3534.png) [@Vadim](https://forum.storj.io/u/Vadim)\
**Post date:** [January 22, 2020, 10:34pm UTC](https://forum.storj.io/t/how-gracefull-exit-work-design/3962/1 "2020-01-22T22:34:04Z")

</div>

We see here lot of posts than GE is very slow, so i started to discover how is work.

I found only 1 document that discribe this thing.

> <https://github.com/storj/storj/blob/3a01106ab4b52f74e5f5c420365fd4a5c46e08d8/docs/design/storagenode-graceful-exit.md>

And there is only 2-3 row how Node Upload data to other nodes.  
**This queue is responsible for communicating with the exiting node and telling it what piece to send to what node**  
If we follow this sentence it looks like Sattelite give Node only 1 address where to send this piece?  
But what to do if this Node is on fare side of the world and link between us is very slow?

If we follow this post

> [@GE вопросы, скорость выхода](https://forum.storj.io/t/ge/3729):
>
> Добрый день. Сделал на одной ноде GE, прошли уже сутки, скорость прямо скажу ужасная. . Такими темпами, она успеет выйти до следующего нового года? Нагрузка на процессор. Имею на ноде Xeon 6 потоков 150% и не спадает Очень много таких ошибок в логах 2020-01-14T06:36:52.396Z ERROR gracefulexit:chore failed to transfer piece. {“Satellite ID”: “12EayRS2V1kEsWESU9QMRseFhdxYxKicsiFmxrsLZHeLUtdps3S”, “error”: "write tcp 172.17.0.2:43856-\>35.192.3.221:7777:

More than 1 person have problem to upload piece to same IP.

why it wont work like Uplink, Satelite give you list of nodes, and you thow pieces to them, who is first win the race, get the piece. Then it just sender speed and setup question, how fast it will work.

Also can be that I not know or understand something?

---

<div class="post-metadata">

**Author:** ![BrightSilence](https://storj.bcdn.literatehosting.com/user_avatar/forum.storj.io/brightsilence/32/6048_2.png) [@BrightSilence](https://forum.storj.io/u/BrightSilence)\
**Post date:** [January 23, 2020, 12:09am UTC](https://forum.storj.io/t/how-gracefull-exit-work-design/3962/2 "2020-01-23T00:09:20Z")

</div>

> [@Vadim](#):
>
> why it wont work like Uplink, Satelite give you list of nodes, and you thow pieces to them, who is first win the race, get the piece.

Well, the difference is that an uplink is trying to upload an entire segment. It has to upload any 80 pieces, but starts more transfers so it can cancel the slowest ones. Last I heard this number was 130, but that may have changed. Either way, there is not that much overhead as a result of this, because 80 out of 130 will be successful.

Nodes only have one piece for each segment. Those pieces need to end up at another node. If you give nodes a list of say 10 other nodes, only 1 out of those 10 pieces will be a useful transfer (the fastest one) and the rest would just be wasted bandwidth. Even if you would just start 2 transfers at the same time, this would nearly double the bandwidth usage of graceful exit. It would be very inefficient. Better to just time out and then retry on another node.

---

<div class="post-metadata">

**Author:** ![Vadim](https://storj.bcdn.literatehosting.com/letter_avatar/vadim/32/6_22734026db12803ebb3e059622ac3534.png) [@Vadim](https://forum.storj.io/u/Vadim)\
**Post date:** [January 23, 2020, 6:10am UTC](https://forum.storj.io/t/how-gracefull-exit-work-design/3962/3 "2020-01-23T06:10:24Z")

</div>

Today as tests show speed and mandwidth is not very relevent, as it work very slow.  
and try over and over transfer piece to same node.  
@BrightSilence understand your point also. then it shold be list of nodes where to send and if first faild then just take Next node from list, and as was written on other post by littleskunk faild uploads has penalties.

---

<div class="post-metadata">

**Author:** ![Alexey](https://storj.bcdn.literatehosting.com/user_avatar/forum.storj.io/alexey/32/41_2.png) [@Alexey](https://forum.storj.io/u/Alexey)\
**Post date:** [January 23, 2020, 8:56am UTC](https://forum.storj.io/t/how-gracefull-exit-work-design/3962/4 "2020-01-23T08:56:08Z")

</div>

Then your node will be disqualified very fast - with one piece. 10% of failed and end of story

---

<div class="post-metadata">

**Author:** ![Vadim](https://storj.bcdn.literatehosting.com/letter_avatar/vadim/32/6_22734026db12803ebb3e059622ac3534.png) [@Vadim](https://forum.storj.io/u/Vadim)\
**Post date:** [January 23, 2020, 10:03am UTC](https://forum.storj.io/t/how-gracefull-exit-work-design/3962/5 "2020-01-23T10:03:41Z")

</div>

Why node shold ge dq if ressiving side giving error? I meant that take other node from list where to send this same piece, not take next piece.

Today problem seems to be that satelite choose slow nodes some time, when sending address to node that makes GE.

---

<div class="post-metadata">

**Author:** ![Alexey](https://storj.bcdn.literatehosting.com/user_avatar/forum.storj.io/alexey/32/41_2.png) [@Alexey](https://forum.storj.io/u/Alexey)\
**Post date:** [January 23, 2020, 7:48pm UTC](https://forum.storj.io/t/how-gracefull-exit-work-design/3962/6 "2020-01-23T19:48:03Z")

</div>

We should stop somewhere to prevent abuse. At the moment it’s 10% of transfer is failed (each by 5 attempts).

---

<div class="post-metadata">

**Author:** ![Vadim](https://storj.bcdn.literatehosting.com/letter_avatar/vadim/32/6_22734026db12803ebb3e059622ac3534.png) [@Vadim](https://forum.storj.io/u/Vadim)\
**Post date:** [January 23, 2020, 8:07pm UTC](https://forum.storj.io/t/how-gracefull-exit-work-design/3962/7 "2020-01-23T20:07:11Z")

</div>

but it can be a fault of nodes that sattelite give for GE. Satellite not know how good or fast node is, that it gives to Node making GE. So if satelite will give for each piece a list of nodes or give a list of piecese and list of nodes and GE node will choose itself where it send what piece, it will try first, second, third, and fastest nodes will get more pieces. For decentrolized storage system, sattelite regulate sending of GE in very centrolized way.

---

<div class="post-metadata">

**Author:** ![Mad\_Max](https://storj.bcdn.literatehosting.com/user_avatar/forum.storj.io/mad_max/32/1127_2.png) [@Mad\_Max](https://forum.storj.io/u/Mad_Max)\
**Post date:** [January 25, 2020, 1:42am UTC](https://forum.storj.io/t/how-gracefull-exit-work-design/3962/8 "2020-01-25T01:42:30Z")

</div>

Why it can not be 5 attempt to send same piece to 5 different nodes?  
I guess it already works this way and [Vadim](https://forum.storj.io/u/Vadim) question not relevant already? And current low speed of GE caused by other reasons like pieces queue is too short and client can not initiate enough transfers in parallel.  
But clear explanation would be nice.
