EugTech / innovate-eugene-api

Used for the asset inventory open-data project.
GNU General Public License v3.0
1 stars 1 forks source link

build a caching proxy #4

Open markdav-is opened 5 years ago

markdav-is commented 5 years ago

https://airtable.com/appPsmg9AEzmjOyVS/api/docs#nodejs/ratelimits

The API is limited to 5 requests per second. If you exceed this rate, you will receive a 429 status code and will need to wait 30 seconds before subsequent requests will succeed.

The official Node.js client has built-in retry logic.

If you anticipate a higher read volume, we recommend using a caching proxy.

markdav-is commented 5 years ago

here's a sample up in glitch: https://glitch.com/~airtable-api-proxy

markdav-is commented 5 years ago

we'll eventually dump airtable, but it's nice to have a proxy so we are not hitting the DB all the time.

johnrnelson commented 5 years ago

We have a MySQL instance on the web server that has the basic records in it. Lots of work needs to be done but the records are there and exposed through the API both HTTP and command line via nodejs.

I see no reason to dump Airtable since we have the code that uses it. We can support Airtable just as easy as Excel so might as well leave that code in there for those few people who want to use it or in case you change your mind later and use AirTable as the "publisher" and everyone else as a "subscriber".

Proxy is a huge topic so we should devote some time to talk about it amongst ourselves.