[GitHub] couchdb-couch-replicator pull request: Add jittered delay during r...

2016-05-06 Thread asfgit
Github user asfgit closed the pull request at: https://github.com/apache/couchdb-couch-replicator/pull/37 --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if th

[GitHub] couchdb-couch-replicator pull request: Add jittered delay during r...

2016-05-06 Thread rnewson
Github user rnewson commented on the pull request: https://github.com/apache/couchdb-couch-replicator/pull/37#issuecomment-217399910 +1 --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this f

[GitHub] couchdb-couch-replicator pull request: Add jittered delay during r...

2016-05-06 Thread rnewson
Github user rnewson commented on a diff in the pull request: https://github.com/apache/couchdb-couch-replicator/pull/37#discussion_r62309248 --- Diff: src/couch_replicator_manager.erl --- @@ -124,13 +126,25 @@ replication_error(#rep{id = {BaseId, _} = RepId}, Error) -> ni

[GitHub] couchdb-couch-replicator pull request: Add jittered delay during r...

2016-05-05 Thread kxepal
Github user kxepal commented on the pull request: https://github.com/apache/couchdb-couch-replicator/pull/37#issuecomment-217284764 +1 --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this fe

[GitHub] couchdb-couch-replicator pull request: Add jittered delay during r...

2016-05-05 Thread kxepal
Github user kxepal commented on the pull request: https://github.com/apache/couchdb-couch-replicator/pull/37#issuecomment-217284745 Interesting to see the overhead that writing errors back produces. Thanks for sharing these graphs! Agree that bulk thing is a sort of separate chang

[GitHub] couchdb-couch-replicator pull request: Add jittered delay during r...

2016-05-05 Thread nickva
Github user nickva commented on the pull request: https://github.com/apache/couchdb-couch-replicator/pull/37#issuecomment-217282034 @kxepal Don't have time to implement full solution but tried it with just commenting out writing errors back to docs. So here is what it looks

[GitHub] couchdb-couch-replicator pull request: Add jittered delay during r...

2016-05-05 Thread kxepal
Github user kxepal commented on the pull request: https://github.com/apache/couchdb-couch-replicator/pull/37#issuecomment-217271437 @nickva Hm...I'm very curious now what the graphs would be for batch solution. If you're not on rush, may I ask for a some time to make an implement

[GitHub] couchdb-couch-replicator pull request: Add jittered delay during r...

2016-05-05 Thread nickva
Github user nickva commented on the pull request: https://github.com/apache/couchdb-couch-replicator/pull/37#issuecomment-217233800 @janl @kxepal Here is a poor man's cluster graph. From local dev cluster, single source to 500 targets replications. Data on ramdisk. The time

[GitHub] couchdb-couch-replicator pull request: Add jittered delay during r...

2016-04-28 Thread nickva
Github user nickva commented on the pull request: https://github.com/apache/couchdb-couch-replicator/pull/37#issuecomment-215451405 @janl Production cluster has graphs of the failure. But it was months back, so it probably lost some resolution by now. Also have a script to g

[GitHub] couchdb-couch-replicator pull request: Add jittered delay during r...

2016-04-28 Thread janl
Github user janl commented on the pull request: https://github.com/apache/couchdb-couch-replicator/pull/37#issuecomment-215365123 Random delays are a common way to handle this type of thing and I think it’s a great pragmatic intermediate solution (with a short diff to boot :).

[GitHub] couchdb-couch-replicator pull request: Add jittered delay during r...

2016-04-27 Thread nickva
Github user nickva commented on the pull request: https://github.com/apache/couchdb-couch-replicator/pull/37#issuecomment-215300013 @kxepal Ah I see what you meant. Yeah it might be possible to have a batcher for doc updates. In general it would be better to not hav

[GitHub] couchdb-couch-replicator pull request: Add jittered delay during r...

2016-04-27 Thread kxepal
Github user kxepal commented on the pull request: https://github.com/apache/couchdb-couch-replicator/pull/37#issuecomment-215289304 @nickva > We are thinking how to built that however that will take longer and will be closer to a complete re-write of the replicator code.

[GitHub] couchdb-couch-replicator pull request: Add jittered delay during r...

2016-04-27 Thread nickva
Github user nickva commented on the pull request: https://github.com/apache/couchdb-couch-replicator/pull/37#issuecomment-215287320 @kxepal I tried to accomodate small and larger setups by making the range proportional to number of replications on current node. So small set

[GitHub] couchdb-couch-replicator pull request: Add jittered delay during r...

2016-04-27 Thread kxepal
Github user kxepal commented on the pull request: https://github.com/apache/couchdb-couch-replicator/pull/37#issuecomment-215283702 @nickva Aha, I see. But I think these numbers wouldn't be a something special for big setups. Also, another point: I don't think that there be much

[GitHub] couchdb-couch-replicator pull request: Add jittered delay during r...

2016-04-27 Thread nickva
Github user nickva commented on the pull request: https://github.com/apache/couchdb-couch-replicator/pull/37#issuecomment-215282100 @kxepal Good point. Agreed. I meant to do not min(uniform(Range), Max) but uniform(min(Range,Max)). Fixed it. Here is how it looks now:

[GitHub] couchdb-couch-replicator pull request: Add jittered delay during r...

2016-04-27 Thread kxepal
Github user kxepal commented on the pull request: https://github.com/apache/couchdb-couch-replicator/pull/37#issuecomment-215263623 ``` 14> RepCount2 = 300. 300 15> Delays2 = [lists:min([random:uniform(RepCount2 * 2 * AVG_ERROR_DELAY_MSEC), MAX_ERROR_DELAY_MSEC]) || _ <- l

[GitHub] couchdb-couch-replicator pull request: Add jittered delay during r...

2016-04-27 Thread kxepal
Github user kxepal commented on the pull request: https://github.com/apache/couchdb-couch-replicator/pull/37#issuecomment-215262746 ``` 8> AVG_ERROR_DELAY_MSEC = 100. 100 9> RepCount = 1000. 1000 10> MAX_ERROR_DELAY_MSEC = 6. 6 11> Delays

[GitHub] couchdb-couch-replicator pull request: Add jittered delay during r...

2016-04-27 Thread kxepal
Github user kxepal commented on the pull request: https://github.com/apache/couchdb-couch-replicator/pull/37#issuecomment-215260015 I like the fix of problem, but I don't like the way it happens. Actually, I don't like two things: random and sleep. The random is completely unpredicta

[GitHub] couchdb-couch-replicator pull request: Add jittered delay during r...

2016-04-27 Thread nickva
Github user nickva commented on a diff in the pull request: https://github.com/apache/couchdb-couch-replicator/pull/37#discussion_r61345382 --- Diff: src/couch_replicator_manager.erl --- @@ -124,13 +126,25 @@ replication_error(#rep{id = {BaseId, _} = RepId}, Error) -> nil

[GitHub] couchdb-couch-replicator pull request: Add jittered delay during r...

2016-04-27 Thread sagelywizard
Github user sagelywizard commented on a diff in the pull request: https://github.com/apache/couchdb-couch-replicator/pull/37#discussion_r61341684 --- Diff: src/couch_replicator_manager.erl --- @@ -124,13 +126,25 @@ replication_error(#rep{id = {BaseId, _} = RepId}, Error) ->

[GitHub] couchdb-couch-replicator pull request: Add jittered delay during r...

2016-04-27 Thread nickva
Github user nickva commented on a diff in the pull request: https://github.com/apache/couchdb-couch-replicator/pull/37#discussion_r61329387 --- Diff: src/couch_replicator_manager.erl --- @@ -124,13 +127,30 @@ replication_error(#rep{id = {BaseId, _} = RepId}, Error) -> nil

[GitHub] couchdb-couch-replicator pull request: Add jittered delay during r...

2016-04-27 Thread rnewson
Github user rnewson commented on a diff in the pull request: https://github.com/apache/couchdb-couch-replicator/pull/37#discussion_r61328162 --- Diff: src/couch_replicator_manager.erl --- @@ -124,13 +127,30 @@ replication_error(#rep{id = {BaseId, _} = RepId}, Error) -> ni

[GitHub] couchdb-couch-replicator pull request: Add jittered delay during r...

2016-04-27 Thread rnewson
Github user rnewson commented on a diff in the pull request: https://github.com/apache/couchdb-couch-replicator/pull/37#discussion_r61328215 --- Diff: src/couch_replicator_manager.erl --- @@ -124,13 +127,30 @@ replication_error(#rep{id = {BaseId, _} = RepId}, Error) -> ni

[GitHub] couchdb-couch-replicator pull request: Add jittered delay during r...

2016-04-27 Thread nickva
GitHub user nickva opened a pull request: https://github.com/apache/couchdb-couch-replicator/pull/37 Add jittered delay during replication error handling For one-to-many replications, when source fails, it can create a stampede effect. A jittered delay is used to avoid that.