mrkschan / cuttle Goto Github PK
View Code? Open in Web Editor NEW:octopus: - Rate limit HTTP API calls per access token
License: MIT License
:octopus: - Rate limit HTTP API calls per access token
License: MIT License
This rate limiter has two config options - i. HTTP header name, ii. time pause unit (s/ms/etc.)
We're looking for a solution to limit requests to an external API to slow down our requests (from multiple backend services) to conform with their rate limits. They have set a 30 request per minute limit which is going to be roughly ½ requests per second.
This doesn't seem to fit in with cuttle's configuration as anything under 0 is throwing an exception. I would essentially need to set a rate: .5
in the configuration I believe.
Currently, cuttle only supports creating a zone by HOST
. It is better to support creating a zone by URL
. E.g. api.example.com/users/*/
creates zone per users/*/
.
Prepare a set of test scripts that run against certain API service with rate limit.
It seems like it segfaulted with the following conf file
Main: Forwarding request to https://name.myshopify.com:443/admin/shop.json
Segmentation fault (core dumped)
root@:/var/cuttle# cat cuttle.yml
addr: :3128
cacert: './cacert.pem'
cakey: './privkey.pem'
zones:
- host: "*.myshopify.com"
shared: false
control: rps
rate: 2
- host: "*"
shared: true
control: noop
Example authentication methods: https://developer.github.com/v3/#authentication
There are few cases here.
I have a use case where I would like to use this behind a corporate proxy. Is there a setting I can add in main.go to facilitate the request being forwarded to the corporate proxy?
Supports cuttle -f config.yml
rather than reading config.yml from $CWD
Hi @mrkschan, thanks for writing this. I'm wondering what state this is in, and if you have any idea if it can be deployed to heroku. Many thanks!
We better provide useful error message when the config file is not correct.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.