yesdog / Waterdog

Waterdog, a Yesdog fork of Waterfall/BungeeCord that adds Bedrock support.
MIT License
186 stars 37 forks source link

TCP between proxy and server #25

Closed tarik02 closed 5 years ago

tarik02 commented 5 years ago

Can I use TCP connection between proxy and server (for example PMMP)? Is there some benefits using TCP vs Raknet in this case?

colinrgodsey commented 5 years ago

The main benefit here is that the RakNet downstream (server) connections will work with out-of-the-box nukkit and pmmp, no plugins or anything needed. We're considering creating a set of plugins that will allow TCP connections to nukkit and pmmp. We have decided not to use synapse because of some design concerns, so this TCP protocol will probably be different

tarik02 commented 5 years ago

So, is there performance benefits for using TCP between proxy and downstream (server)? I am not speaking about Synapse, I'm speaking just about connection, just use TCP with encapsulated packet instead of RakNet. Maybe even it will be better to use only one connection per server (for example on demand).

colinrgodsey commented 5 years ago

This is actually a kind of difficult question to answer. One thing I can say so far, is the way that Synapse is done (bundles multiple connections into one connection) is a bad design. Bungee/Waterdog need to be able to apply 'backpressure' to the downstream connections when possible so it doesnt have to cache an unnecessary amount of data. really unstable, and a big vulnerability that can crash the proxy.

At this point, im thinking we will eventually make a plugin for tcp-per-connection to PMMP, maybe nukkit too.