Hi Rob,

Nice! Thanks for releasing this. I’m not sure when I’ll use this but I can 
pretty much guarantee that I will give it a go sooner or later. I’ve written a 
few of these in the past, it’s good to see someone make a library out of it.

BTW, things like AngularJS and EmberJS should/could know about 503 errors and 
what they mean. There’s actually a project, that I’ve *not* used (yet), 
https://github.com/kkolstad/angular-servicestack that will re-try on a 503 
after a random delay. Here’s the line from their source code (it’s 
coffeescript):

sleepTime = Math.min (Math.random() * (Math.pow(4, response.collisionCount() - 
1) * 100)), serviceStackRestConfig.maxDelayBetweenRetries

Cheers,
Bob

On Nov 16, 2013, at 1:21 PM, Rob Day <r...@rkd.me.uk> wrote:

> Hi all,
> 
> I've just published the first working version of a Ring middleware that some 
> of you might find useful. It's designed for web apps where, if you're 
> overloaded, it's better to serve some requests quickly and fail the others 
> than to try and serve all the requests       and do it slowly. (My background 
> is in telecoms, where that's often the best approach.)
> 
> Specifically, you specify a target latency that you want 90% of requests to 
> try and meet, and it applies the algorithm from 
> http://www.eecs.harvard.edu/%7Emdw/papers/control-usits03.pdf to try and keep 
> your latency below that threshold. The exact parameters of the algorithm are 
> tunable, and different URLs or groups of URLs can have different targets and 
> parameters.
> 
> It still needs a bit of tidying - docstrings, cleaning up some of the Midje 
> tests, and so on - but it works and I think the documentation is usable, so 
> I'm announcing it now.
> 
> Github (w/ docs): https://github.com/rkday/overload-middleware
> Clojars: https://clojars.org/overload-middleware
> 
> Let me know if you have any feedback!
> Rob

-- 
-- 
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clojure@googlegroups.com
Note that posts from new members are moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"Clojure" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to