[twitter-dev] Re: Twitter Update, 8/10 noon PST
Geometric backoffs are more generally know as exponential backoffs. If ya google that, ya get a couple of useful and interesting things: http://en.wikipedia.org/wiki/Exponential_backoff http://en.wikipedia.org/wiki/Truncated_binary_exponential_backoff http://dthain.blogspot.com/2009/02/exponential-backoff-in-distributed.html etc. Hope this helps. Jim On Aug 11, 12:01 am, hansamann wrote: > Can someone post a link to some online resources explaining more > aboutgeometricback-offs? Did a search, did not find a whole lot. > > Thx > Sven > > On Aug 10, 7:18 pm, "jim.renkel" wrote: > > > Yup, when you doback-offs, ya can't do them deterministically, ya > > gotta do them for a random amount, generally uniformly distributed > > between some upper and lower bounds. > > > It's the bounds that increase geometrically or exponentially, up to > > some limit, but the each back-off should be random between the bounds. > > > If theback-offsare not randomized, its leads to synchronicity, as > > you noted. > > > BTW, all standardizedback-offsof which I am aware specify randomized > > back-off. > > > Jim Renkel > > > On Aug 10, 7:54 pm, Michael Chang wrote: > > > > On Mon, Aug 10, 2009 at 3:36 PM, Dewald Pretorius > > > wrote: > > > > > On Aug 10, 3:57 pm, Ryan Sarver wrote: > > > > > As such the system has more general strain on it and thus will > > > > > produce some more 502/503 errors. If you see them, you should do a > > > >geometric > > > > > back off instead of just sending a new request. > > > > > Ryan, > > > > > What starting value and what common ratio of ageometricback off > > > > would you recommend? > > > > One issue with back off (geometricor otherwise) is that if everyone uses > > > the same values; it won't work. > > > > Think about it -- let's say 10 000 users all access the system > > > simultaneously and all of them get 502/503 errors. Then let's say they all > > > wait five seconds before retrying. Once those five seconds are up; they > > > will > > > all simultaneously accesss the site again, and likely again get the same > > > 502/503 errors. This causes them all to back off again, say, for 25 > > > seconds. > > > Then they will all again contact the server again, at the same time, and > > > so > > > on and so forth until either they all give up, or until the end of time, > > > whichever comes first. > > > > (Yes, this is a simplified example, but it should get the point across. In > > > practice, at least a few users might get through every time, and > > > eventually, > > > yes, everyone would get served if they are patient enough. But if everyone > > > uses different back-off values, then the traffic becomes somewhat more > > > even, > > > and thus the servers can cope with the load more easily.) > > > > -- > > > Thanks, > > > > Michael Chang > > > > I may not be able to open heavily-formatted Word, Powerpoint, or Excel > > > documents. Send at your own risk.
[twitter-dev] Re: Twitter Update, 8/10 noon PST
On Mon, 10 Aug 2009 22:01:16 -0700 (PDT) hansamann wrote: > Can someone post a link to some online resources explaining more about > geometric back-offs? Did a search, did not find a whole lot. Retry intervals grow in a geometric progression: http://en.wikipedia.org/wiki/Geometric_progression A start value of 1 second that doubles on each subsequent retry is common, as are caps on the length of time to continue attempts. Chris Babcock
[twitter-dev] Re: Twitter Update, 8/10 noon PST
Can someone post a link to some online resources explaining more about geometric back-offs? Did a search, did not find a whole lot. Thx Sven On Aug 10, 7:18 pm, "jim.renkel" wrote: > Yup, when you do back-offs, ya can't do them deterministically, ya > gotta do them for a random amount, generally uniformly distributed > between some upper and lower bounds. > > It's the bounds that increase geometrically or exponentially, up to > some limit, but the each back-off should be random between the bounds. > > If the back-offs are not randomized, its leads to synchronicity, as > you noted. > > BTW, all standardized back-offs of which I am aware specify randomized > back-off. > > Jim Renkel > > On Aug 10, 7:54 pm, Michael Chang wrote: > > > On Mon, Aug 10, 2009 at 3:36 PM, Dewald Pretorius wrote: > > > > On Aug 10, 3:57 pm, Ryan Sarver wrote: > > > > As such the system has more general strain on it and thus will > > > > produce some more 502/503 errors. If you see them, you should do a > > > geometric > > > > back off instead of just sending a new request. > > > > Ryan, > > > > What starting value and what common ratio of a geometric back off > > > would you recommend? > > > One issue with back off (geometric or otherwise) is that if everyone uses > > the same values; it won't work. > > > Think about it -- let's say 10 000 users all access the system > > simultaneously and all of them get 502/503 errors. Then let's say they all > > wait five seconds before retrying. Once those five seconds are up; they will > > all simultaneously accesss the site again, and likely again get the same > > 502/503 errors. This causes them all to back off again, say, for 25 seconds. > > Then they will all again contact the server again, at the same time, and so > > on and so forth until either they all give up, or until the end of time, > > whichever comes first. > > > (Yes, this is a simplified example, but it should get the point across. In > > practice, at least a few users might get through every time, and eventually, > > yes, everyone would get served if they are patient enough. But if everyone > > uses different back-off values, then the traffic becomes somewhat more even, > > and thus the servers can cope with the load more easily.) > > > -- > > Thanks, > > > Michael Chang > > > I may not be able to open heavily-formatted Word, Powerpoint, or Excel > > documents. Send at your own risk.
[twitter-dev] Re: Twitter Update, 8/10 noon PST
Yup, when you do back-offs, ya can't do them deterministically, ya gotta do them for a random amount, generally uniformly distributed between some upper and lower bounds. It's the bounds that increase geometrically or exponentially, up to some limit, but the each back-off should be random between the bounds. If the back-offs are not randomized, its leads to synchronicity, as you noted. BTW, all standardized back-offs of which I am aware specify randomized back-off. Jim Renkel On Aug 10, 7:54 pm, Michael Chang wrote: > On Mon, Aug 10, 2009 at 3:36 PM, Dewald Pretorius wrote: > > > On Aug 10, 3:57 pm, Ryan Sarver wrote: > > > As such the system has more general strain on it and thus will > > > produce some more 502/503 errors. If you see them, you should do a > > geometric > > > back off instead of just sending a new request. > > > Ryan, > > > What starting value and what common ratio of a geometric back off > > would you recommend? > > One issue with back off (geometric or otherwise) is that if everyone uses > the same values; it won't work. > > Think about it -- let's say 10 000 users all access the system > simultaneously and all of them get 502/503 errors. Then let's say they all > wait five seconds before retrying. Once those five seconds are up; they will > all simultaneously accesss the site again, and likely again get the same > 502/503 errors. This causes them all to back off again, say, for 25 seconds. > Then they will all again contact the server again, at the same time, and so > on and so forth until either they all give up, or until the end of time, > whichever comes first. > > (Yes, this is a simplified example, but it should get the point across. In > practice, at least a few users might get through every time, and eventually, > yes, everyone would get served if they are patient enough. But if everyone > uses different back-off values, then the traffic becomes somewhat more even, > and thus the servers can cope with the load more easily.) > > -- > Thanks, > > Michael Chang > > I may not be able to open heavily-formatted Word, Powerpoint, or Excel > documents. Send at your own risk.
[twitter-dev] Re: Twitter Update, 8/10 noon PST
On Mon, Aug 10, 2009 at 3:36 PM, Dewald Pretorius wrote: > > On Aug 10, 3:57 pm, Ryan Sarver wrote: > > As such the system has more general strain on it and thus will > > produce some more 502/503 errors. If you see them, you should do a > geometric > > back off instead of just sending a new request. > > Ryan, > > What starting value and what common ratio of a geometric back off > would you recommend? > > One issue with back off (geometric or otherwise) is that if everyone uses the same values; it won't work. Think about it -- let's say 10 000 users all access the system simultaneously and all of them get 502/503 errors. Then let's say they all wait five seconds before retrying. Once those five seconds are up; they will all simultaneously accesss the site again, and likely again get the same 502/503 errors. This causes them all to back off again, say, for 25 seconds. Then they will all again contact the server again, at the same time, and so on and so forth until either they all give up, or until the end of time, whichever comes first. (Yes, this is a simplified example, but it should get the point across. In practice, at least a few users might get through every time, and eventually, yes, everyone would get served if they are patient enough. But if everyone uses different back-off values, then the traffic becomes somewhat more even, and thus the servers can cope with the load more easily.) -- Thanks, Michael Chang I may not be able to open heavily-formatted Word, Powerpoint, or Excel documents. Send at your own risk.
[twitter-dev] Re: Twitter Update, 8/10 noon PST
On Aug 10, 3:57 pm, Ryan Sarver wrote: > As such the system has more general strain on it and thus will > produce some more 502/503 errors. If you see them, you should do a geometric > back off instead of just sending a new request. Ryan, What starting value and what common ratio of a geometric back off would you recommend? Dewald