How is the server able to push messages to IoT end devices?

As I understand, interaction between Blynk server and IoT end device is using HTTP. Suppose I use the app to turn on/off an LED connected to Arduino. The trigger goes to the Blynk server but how does the server relay this to the Arduino? My understanding is that client-server interaction is based on request and response. Is the Arduino regularly polling the server, which would be inefficient?

I just want to know how it is implemented under the hood because I want devices not to do polling.

Yes the Arduino is connected to the server (polling) and if it is set up correctly works very well.

No. Blynk works over TCP or SSL/TLS connection (if hardware supports). However HTTP option also available if needed.

It is not.

In general it depends on your widget settings. Widgets work in 2 modes - PUSH mode and Frequency Reading mode. In frequency reading mode app (when it is active and open) polling server and server polling hardware.
In Push mode you send commands via Blynk.virtualWrite when necessary.

All this is possible as App and Hardware has opened TCP/SSL keep-alive connections.

1 Like

Thanks for the quick response. I checked out the link about Push and Freq Reading modes. Definitely useful.

Given that TCP/SSL keep-alive connections are used, will there be scaling up issues at the server? I assume if there are tens of thousands of apps and devices, server has to maintain a TCP connection for each one.

I don’t see any. Do you?

Yes. Is that a problem :slight_smile: ?

Blynk has been faultless for me for over 5 months… thanks Blynk team! :heart_eyes:

3 Likes