Is there a limit to how many times per second a remote can be fired?

I want to know if there are limits on remote events. For example: Will I get an error if I repeatedly fire a remote event way to fast (Basicly without intervals)?

3 Likes

The limitations are outlined on the wiki here: https://developer.roblox.com/articles/Remote-Functions-and-Events#limitations

11 Likes

It says about 50 KB/sec but how many remote events should be fired a second to reach the limit? (That might also depend on what is being sent through the remotes also)

That heavily depends on how much data you’re sending with each request. It could potentially be tens of thousands or just a few (although not likely, and you should certainly not be sending this much data per request). Do you have an example case that you’re concerned about?

4 Likes

Don’t fire remote events this often. There’s a 99% chance you’re doing something very wrong. Why do you need to fire them this much?

8 Likes

I found myself firing remote events often when doing stuff unique to the client’s avatar. For example in VR when a client is waving, if I want to show that to all the other clients I have to pass controller cframe information to the server so all other clients can also see the VR movement. Maybe this is a bad approach.

4 Likes

Use something like my Ping Module where all you do is invoke a remote function to the client and the client responds. This goes on forever (as long as the client is still connected) and is very good for communication and getting the ping without exceeding any remote limits. Also for movement replication, you can use BodyMovers or Constraints to move the objects so that they automatically replicate from the client since they will be the NetworkOwner of the parts.

4 Likes

I can’t seem to find the actual rate limitations anymore with that link or anywhere else in the Roblox articles. Maybe the limits have changed?

You should not need to worry about rate limits if all you are doing is communicating by constantly invoking and responding to a remote function as previously mentioned.

Example:

while client.Parent do
    success, clientData = pcall(remote.InvokeClient, remote, player, serverData)
    if not success then wait() end
end
remote.OnClientInvoke = function(serverData)
    return clientData
end
3 Likes

The more I think about it, I can imagine Roblox trying to maximize the client/server communication so theoretically there probably isn’t a limit as long as all clients are treated equally, just networking limitations with packet loss, nodal delay, bandwidth and what not.

Thanks for the suggestions. I will probably get into the habit of remote functions on the client. Is remote functions essentially an underlying TCP connection? While remote events are UDP?

2 Likes

Well they still arrive correctly, just potentially out of order. The advantage of using one remote function is that you can make your own queue, as well as send data that you might want to keep from someone who might be say, lag switching or abusing the remotes. A good example is when I was doing lag compensation. I was funneling my own physics and motion data through the remote, so if they chose to not respond to the function or ignore the correction, they will be out of sync with what the server expects their location to be, as well as probably not receive updates about the location of other people (by not sending anything as the response was not made).

1 Like