Parity between servers for cross-server messaging via datastore and messagingservice

currently making a cross-server, offline and online messaging system, which will save across servers via datastores

image

i am not sure which is the best way to go about this as i need both consistency/parity between servers and reliability while not being rate limited by datastoreservice.

do i use caching, do i use increment or setasync, etc etc

for the system, the data is like so:

local conversations = {
	{
		id = "",
		users = {},
		messages = {
			{
				sender = 0,
				content = "",
				time = 0,
				status = "read", -- "read" "delivered" "sent"
				version = 1, -- 1 = Default, 2 = Offline/Cross-Server
			}
		}
	}
}

i have cross-server and same-server communication working fine (until the point where datastores are needed, i.e player leaves and joins another server, cant retain same convo id and wont work)

any help wouldbe awesome. if you need some more info lmk!

1 Like

The idea is really cool!

I’m not an expert at datastores, however, you could consider non-native data storage and access it through the HttpService. It’s rate-limited at 500 requests/min compared to DataStore’s 60 requests/min and is architecturally designed for real-time communication.

This service allows games to be integrated with off-Roblox web services such as analytics, data storage, remote server configuration, error reporting, advanced calculations or real-time communication.

For each Roblox game server, there is a limit of 500 HTTP requests per minute. Exceeding this may cause request-sending functions to stall entirely for about 30 seconds.

Of course, the downside to this is greater complexity, points of failure, etc.

I’m pretty sure datastore’s limit is:

60 + (#players * 10)

so as long as you have 5 or more players, youll have more requests using datastoreservice.

I did consider using httpservice, however I’d like to keep things within roblox as much as possible to keep costs low, while being simple(r) to implement.

1 Like