Load balancing deployment for local blynk server


I am investigating a deployment model for my local blynk server so that it can be scalable when load is too high for the server. I plan to deploy multiple small server behind a load balancer (using AWS cloud service) but I don’t know how to sync the data between servers.
Those servers can share same data folder using a shared disk storage but looks like the Blynk server store all data on memory (and write to data file every minute) so the syncing is still a problem which I don’t know how to solve. Can anyone advise on this? Thanks a lot.



Based on little statements I recall though out this forum… there is not much actual “load” and a Local Server can easily handle hundreds, even thousands of clients… So, is load balancing even necessary? I believe Blynk themselves only have three servers running for the planet (for the basic Cloud service… more for the commercial side), and that is probably mostly to eliminate lag time.

Meanwhile, you can search this forum for other related topics… like this…

1 Like


Yeah, agree with @Gunner blynk server designed for high throughput, so even super cheap server can handle thousands of devices.



Thanks. Your info made me confident to deploy a private server and not too worry about scaling in short term.

@Dmitriy, I am not sure if this is appropriate question. If not, please ignore. Can you share a bit how you guys organize the 3 product servers you mentioned? Are you applying some sync trick or they are using seperate data? Thanks.



While awaiting Developer input… I will answer based on past forum experience. Any server is an independent self contained entity from all other servers.

In fact there used to be a Geo DNS issue when users created an account on one Cloud Server (in their geographic location) then traveled to an area that was serviced by one of the other Cloud Servers, and were thus unable to connect with the generic address.

This issue was resolved last year, but while it was not clear if it was via custom DNS redirection or some other method, I don’t believe it involved anything like your load balancing question… only the developers know for sure :wink:



Using CHIRON FS raid1 over network to syncing data between your servers and a mikrotik router for the pcc load balancing for higher throughput



Thank Gunner a lot for your info.

@ErfanDL, setting up a shared storage between server or data syncing between server is not a big problem to me. What I just don’t understand is how the Blynk server read from data file while running.

For example, server 1 has some update and write to data files and the changes are synced to data files on server 2. How and when does server 2 pick up the changes? In case if both servers make changes in same data file at same time, how the sync will work? Thanks.



@vanminh0910 Blynk Server is an Open-Source Netty based Java server… so you can also look that info up and perhaps glean from it how the data is transferred/stored, etc.



I totally forgot that and should have done the homework :D. Thanks a lot for your info.



Right now we use Geo DNS as load balancer. So when app/hardware connects to the closest server it checks if this is correct server. In most cases it is. Otherwise server returns redirect response with correct server address. Every server holds it’s own userbase, so this is more like sharding scheme that is based on location.


Two Identical IFTTT Applets Google Assistant - One Works, the other one doesn't
Is GeoDNS still an issue?

Great explanation. That deployment model is smart and nice. Thanks.