Skip to main content

Limits

Some limits are fixed by the wire format. Others are budgets with defaults you can change. Both are on this page.

Fixed limits​

LimitValuePast it
Untyped arguments from a client20The call rejects with BadArgument before it's sent; an event Fire raises an error.
Untyped values to a client (signal arguments, return values)255A Fire raises an error; a reply fails with BadResult.
Typed fields in Args or Returns32Error where the spec is declared.
Nesting of untyped tables16 levelsBadArgument on the client, BadRequest on the server.
Untyped values in one client message2048BadArgument.
Values in copied (sidecar) tables, per client frame2048The client starts a new frame. More in one message: BadArgument.
Sidecar slots (Instances, CFrames, copied tables) per client frame255The client starts a new frame. More in one message: BadArgument.
One client message64 KiBPayloadTooLarge; an event Fire raises an error.
Client reliable frame60 KiBThe next message starts a new frame.
Messages in one client frameAbout 540 by default (MessageBurst × MirrorFraction, at most 1024)The next message starts a new frame. The server treats more than 1024 as a violation.
Frame size the server accepts72 KiB reliable, 1000 bytes unreliableDropped as a violation.
Server frame64 KiBA larger message goes alone. There's no cap from server to client.
Unreliable message900 bytes, header includedFire raises an error.
Client sends61 a secondThe next send waits for its slot.
Networked members (routes)65,535The boot fails.
Service, member, struct field and enum names255 bytesThe boot fails, or an error where the type is declared.
Loren.Reject and middleware messages256 bytesCut to 256 bytes.
Method timeout1 to 120 secondsError where it's set.
Signal backlog0 to 1024 messagesError where it's set.
T.string, T.buffer, T.array, T.map1024 unless you set a maxBadRequest on the server, BadArgument or an error on the sender.
T.enum names, T.struct fields1 to 255Error where the type is declared.
Nesting of T types16 levelsError where the type is declared.
Outbox before the client says hello (the handshake)256 KiB or 4096 messagesNewer messages are dropped, and Loren warns once.
How long the outbox waits for hello120 seconds after joiningThe whole outbox is dropped, and so is every later reliable message until the client says hello.
Hellos from one clientOne every 5 secondsA violation.
Ordered sequenceResets after 1 second of silence
Timed-out call idsHeld for at least 60 secondsA late reply is recognized and dropped.
Loren warnings10 lines a minute in total, 1 summary per player per 30 secondsSuppressed and counted.
Replies to refused calls1 RateLimited per method per player per second, 16 BadRequest per player per secondExtra calls get no reply and time out.
OnViolationOnce per player per secondCounts add up until the next call.
OnError10 calls a secondExtra ones are skipped.

Default budgets​

Each budget has a burst and a rate. The burst is how many you can send at once. The rate is how fast that allowance refills, per second. The client gets these numbers in the manifest and holds itself to 90% of them (MirrorFraction), so an honest client stays under the server's limits.

KeyDefaultCounted perWhat it limits
FrameRate / FrameBurst120 / 140player, per remoteFrames a second.
ByteRate / ByteBurst131072 / 262144playerBytes a second (128 KiB, bursts of 256 KiB), both remotes.
MessageRate / MessageBurst600 / 600playerMessages a second.
MethodRate / MethodBurst50 / 100player, per methodCalls.
EventRate / EventBurst75 / 150player, per reliable eventReliable ClientEvent fires.
UnreliableEventRate / UnreliableEventBurst120 / 60player, per unreliable eventUnreliable ClientEvent fires.
MirrorFraction0.9clientHow close to the limits clients go.
MaxRunningCalls32playerCalls yielded inside handlers at once.
MaxQueuedCalls64playerCalls waiting behind those. Past it: Busy.
MaxZombies / MaxZombiesPerRoute16 / 4player / player and methodTimed-out handlers still running.
SerialQueue8player, per Serial methodCalls waiting in line. Past it: Busy.
MaxPending256clientCalls waiting for a reply. Past it: TooManyInFlight.
DefaultTimeout10methodSeconds before a call rejects with Timeout.
WatchdogGrace5methodSeconds after the timeout before the server gives up on a call.
CancelOnTimeoutfalsemethodWhether the server cancels the handler when it gives up.
Backlog64signalMessages kept for a late first Connect.
BacklogWindow10clientSeconds after the client boot that backlogs are kept.

A frame costs max(bytes, 64), plus 16 per sidecar slot, plus 8 for every value inside copied tables and the length of their strings. That's what's charged against the byte budget.

Changing them​

Every key above is set on the server, before SetOnFire:

src/server/Server.server.luau
local ReplicatedStorage = game:GetService("ReplicatedStorage")
local Loren = require(ReplicatedStorage.Shared.Loren)

Loren.Configure({
MethodRate = 100,
MethodBurst = 200,
DefaultTimeout = 15,
Members = {
["ShopService.Buy"] = { RateLimit = { 2, 4 }, Timeout = 5 },
["AimService.Aim"] = { RateLimit = { 30, 30 } },
},
})

Loren.AddServices(script.Parent.Services)
Loren.SetOnFire():expect()
  • Clients get the values from the server. Setting a server-only key on the client does nothing, and Studio warns.
  • Members changes one method or ClientEvent. Its keys are RateLimit, Timeout, Serial, CancelOnTimeout and AllowNonFinite. The same options can go in the Service's Spec (see Typed specs); Members wins when both are set. Members never applies to Signals. A Signal's options come from its Spec, and Backlog falls back to Configure's Backlog.
  • A bad key or value errors at the Configure line, with a suggestion for typos.

The boot also checks that the budgets leave room for the largest frame an honest client can send: ByteBurst × MirrorFraction has to be at least 131072, and FrameBurst × MirrorFraction and MessageBurst × MirrorFraction at least 1. If not, the boot fails and says which one.

The Configuration page has every Configure key with its allowed values.