Methods for realtime cross-server data transfer?

I tried using OnUpdate on a key in a datastore, doesn’t update on different servers expect the server which updates the key.

I’d like to hear some of your suggestions, Thanks in advance.

1 Like

Well, nothing is real time. What’s the max window you’re aiming for and what’s the purpose of the onUpdate?

1 Like

5-10 seconds and it’s for receiving a invitation notification from a friend.

1 Like

Ahh. Your best bet is an http server and to frequently check it on on every Roblox sever. If you want to keep it contained to the Roblox API, onUpdate’s delay is the best you’re gonna get.

5 Likes

Ah, very well, thanks for you suggestion.

host a http server, and the only way i can think of really making it event driven is through long-polling (rip no web-sockets)

or if you are lazy just fire a get request every few seconds and call it a day

‘real-time’ cross-server data transfer can be used if you do something creative with this:

I edit the module that is linked on that forum a bit to suit my needs more;

If you want to have cross-server data transfer you’ll want to look into JSON encoding & decoding too, saving LUA tables as JSON strings on a google sheets database will be very useful.

The entire premise of long-term is constant large sums of web calls. Google’s API isn’t gonna like that. They have quotas.

1 Like

I am currently trying out Google Firebase Realtime Database. So far it seems promising but just limited by Roblox’s HttpRequest limits but it’s not a big obstacle.

1 Like

Not sure if the quotas are actually that limiting;

Not entirely sure which fields I should be looking at…

If you scroll up, I think it has something to do with these:

I’m not entirely sure myself.

With some simple math and generous assumptions

  • 5 servers running
  • Each server checks with GoogleScript every 5 seconds
  • Extrapolate that over 24 hours

12 API calls per minute per sever (60 for all)
720 API calls per hour per sever (3,600 for all)
17,820 API calls per 24 hours per sever (86,400 for all)

And that’s just actively checking the sheet. You’d need more for setting the values in the first place.


If I wanted to be even more generous with the calculations and make it 10 seconds between every API call

6 API calls per minute per sever (30 for all)
360 API calls per hour per sever (1,800 for all)
8,640 API calls per 24 hours per server (43,200 for all)

I don’t think it’ll work.

If you extend the wait time between API calls beyond 10, you could argue that the Roblox API could top that without nearly maxing out your dataStore quota regardless.

1 Like

@MXKhronos If you can tell us what data are you trying to transfer between servers, it’d be of help.

The reason I use the http service and google sheets as a database is for licensing a script, so it posts a GET request once per server and the sheets database can be accessed from multiple devices.

You’d probably be better off hosting something yourself for as close to realtime as possible, if you wanted to use the Http Service.

1 Like

Have a look at this instead. Realtime Database Limits  |  Firebase Realtime Database

I’m not using google sheets, I’m using firebase for a lot of cross-server data transfer like squad system and a global statistics storage. Currently planning to move player’s save data to firebase from datastore too.

In terms of realtime, firebase has been doing well from my tests, although not in a large scale.

I’m currently not sure if quotas will be used up but firebase is built for this kinds of purposes so I think I have room, if not, I’ll just do some optimizing.