Support Topics Documentation Slack YouTube Blog

Question regarding the API calls / second


(Bilal B-Man El-Wali) #1

Hey guys,
I am using the pub/sub subscription to receive messages between users.
The pub/sub system works (as I understand) by pinging backendless for “new messages” every x seconds (usually every 1 second).
Does it just monitor or does it actually make an API call every second?
Because then if you have 100 online users at the same time, that would practically mean 100 API calls/second … and if for every 10 API calls / second (more than the free 50), is 50$, then it will become very expensive, very fast.
Is my understanding correct?
Thanks in advance.


(Mark Piller) #2

Hi Bilal,

The polling requests are counted towards the API calls limit.

Regards,
Mark


(discobot) #3

I have a similar problem: I am using pub/sub model for user chat, and it literally kills me: I have a channel per user to user chat, and thus if I have 8 people I am talking to, application generates 8 polls (1 poll per channel) per second, or 480 API requests per minute. Clearly, this is not the going to work. Even poling every 3 seconds, would make this impractical.

Could you please tell me what should we be using for chat application if not this?

Thank you!