10 Nov '15, 1pm

Grape API Throttling with Grape-Attack gem #ruby #rubylang #programming

× The Ruby and Rails community linklog Made a library? Written a blog post? Found a useful tutorial? Share it with the Ruby community here or just enjoy what everyone else has found! Grape API Throttling with Grape-Attack gem by Pierre-Louis Gottfrois — 3 September 2015 Grape-Attack has your API endpoints covered. Grape-Attack is a middleware for Grape to add endpoint-specific throttling. Will also take care of setting custom rate limit headers for you. Comments Looks like a very good start for a gem. I like the usage of adapters. Is there something that allows per API client limiations? This user has 1K limit and the other one has 10K limit? Robert Pankowecki — 4 September 2015 Absolutely, you can specify an identifier per endpoints like this: throttle max: 100, per: 1.day, identifier: Proc.new { current_user.id } More informations in the readme :) Pierre-Louis Gottfrois ...

Full article: http://www.rubyflow.com/p/daqy13-grape-api-throttling-wit...

Tweets