title: node.js application-level rate limiting of 3rd party API calls
body: <p>The app I am building makes heavy numbers of calls to the Facebook Graph API (but it could be any API with rate limit). For argument's sake let's say the limit is 600 requests per 10 minutes.</p>
  
  <p>I'm using <a href="https://github.com/jhurliman/node-rate-limiter" rel="nofollow">https://github.com/jhurliman/node-rate-limiter</a> to rate limit the individual threads, but what I need to do is rate limit all Facebook API calls at the macro app level, so that the app as whole does not exceed that limit.</p>
  
  <p>I've really no idea how to accomplish that. I am fairly new to node and have no concept of what a solution for this would even look like.</p>
  
  <p>It would be good to know if Facebook's rate limit is per app or per authenticated user. I'm assuming app, hence this problem.</p>