Is it okay to call rest API in every 5 seconds to receive update Android/iOS UX?

127 Views Asked by At

We are building one mobile (Android & iOS) application where we need to update UX based on the data we receive from back-end server. The value of data from server might change in a range of 1 to 20 minutes. Is it good to call the rest API in every 5 seconds considering there can be chances of 120,000 calls to that API in one minute? Please also propose any solution if any of you came across similar problem & solved it.

1

There are 1 best solutions below

0
Gabe Sechan On

No, and you'd spend a fortune on cloud hosting as you scale up if you did that. Look into push messaging instead- that's where the server sends a message to the client when data changes. That's how things like messaging apps work, rather than polling.