User:J4/LNL

From Resonite Wiki
Revision as of 13:28, 10 November 2025 by J4 (talk | contribs) (very bad version I'm too tired to write stuff like this)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

What is the LNL window size setting? There is plenty of misinformation going around this setting, which can seem magical for someone whose trade isn't networking.

This page will oversimplify things for the sake of being understood by anybody. Be sure to yell at me for that.

How do networks work?

Packets everywhere

Computers can send and receive information over networks via packets. A packet is basically an envelope containing the data to transmit. If the data to transmit is too large (for instance when downloading a movie or a game), the data can be split in multiple packets.

It would be like receiving IKEA furniture in the mail, you can receive many packages that will get assembled to form a single object in the end.

TCP

In the beginning, there was nothing, then came TCP. TCP stands for Transmission Control Protocol and is one of the many ways computers transmit information between each other.

TCP is pretty easy to understand. All the data is sent in sequence, with the receiver sending back acknowledgements to make sure the data has been received successfully. Think of it as a registered letter.

UDP

UDP stands for User Datagram Protocol and takes a faster route. Instead of acknowledging every single bit of data, UDP just sends all the packets towards the receiver while the receiver will not acknowledge reception.

While this can be faster, some packets might be in the wrong order or missing. In most applications, this isn't an issue; for instance, if you stream a movie over UDP, you probably won't notice a missing frame in the video. Another strength of UDP is that you get to decide how to check for missing information and how to order it.

In case an application still needs the speed of UDP while needing some reliability of TCP, Bell Labs created a modification of UDP commonly called reliable packets. Those reliable packets have some degree of acknowledgements and ordering added to them.

Resonite's networking

So, what about Resonite in all of this? Resonite mainly uses UDP for session traffic, given we require updates to get as soon as possible to users.

However, to avoid jitters in the sessions, Resonite's underlying networking still tries to enforce a certain order for packets (you don't want to receive an update for it to then receive and older update and go back-and-forth). Remember those reliable packets we've talked about before? That's where they come in handy.

The LNL Window Size setting does something very simple to understand: by default, Resonite will send up to 64 packets at a time without requiring any kind of validation. This basically makes it faster to send data.

Raising the limit allows Resonite to send more packets without validation, thus making it even faster. A limit too high might also overload the network given past a certain point, too many packets will be sent at once, clogging the pipe.

On the other end of the spectrum, setting the LNL Window too low will make Resonite wait for packets to be acknowledged, thus sending fewer updates. If you have a high latency with the host, those acknowledgements will take longer to be received, thus adding the updates in a queue (those famous queued packets).

Since this is an oversimplified explanation, what really happens is much more complex and nuanced, but those are the big lines.

If you are interested in more detailed information about Resonite's networking, consult the documentation page for it.

Common questions

But… what about packet stuffing?

Packet stuffing is mistakenly associated with the LNL Window Size setting as it was added with the same update, however, they have very little to do with each other.

To explain what is packet stuffing, imagine you're sending hundreds of documents via mail. By default, a computer will send one sheet of paper per envelope, not caring about the space remaining in the envelope. With packet stuffing, as many sheets of paper will be crammed into the envelope, making it transmit more information in the same space.