[Live API] Need help with handling the API communication (because of the limits)

Hi guys,

I just want to make an infinite flight radar and I’m very far with the development now but before I make it public, I have one question.

Because the limit is 100 calls per minute:
Should I make a backend with one server, that retrieves the API data and stores it to a cloud database (like firebase) so there is only one API client
should I make the API calls directly in the app so for every user instance the API calls are independent to each other (which means there are multiple clients that request API data).

I first thought that firebase is a good idea but with 500 flights on a server, that are like 400-700 database operations for every client every 10 seconds which results in about 130 million operations per month (couple of 100$ cost) for just one device, if that device is getting data without pause.

I would be very thankful for your opinion guys!

1 Like

You can try out redisJSON for caching. The cost would be cheaper while read will be way faster.

Also instead of a SQL database, you can choose a NoSQL option and you can dump data in 1 write (wouldn’t recommend it).

You could just write it to a JSON file in your server and have a CRON job periodically create newer ones with newer timestamps and delete the stale ones