How do servers with multiple proxies work?

Discussion in 'BungeeCord Discussion' started by davidcubesvk, Mar 9, 2020.

  1. Hello,

    I'd like to ask how do servers work when they have more than 1 proxy. When you have one, all Spigot servers are connected to that one. But how are the Spigot servers connected to proxies and how are proxies connected with each other? Simply, how does it work and what does it mean?

    Thanks for the advice.
     
  2. There's a thing called RedisBungee, which is like a Bungeecord server for Bungeecord servers, if that makes sense. When a player joins the Redis, they are sent to the main Bungeecord server, for example, the Hub bungee. It's just like a massive Bungeecord network for Bungeecord networks.

    P.S. I said Bungee way too may times there
     
  3. Gianluca

    Gianluca Retired Resource Staff
    Retired Patron

    Well.. I'll first start by giving the reason multiple proxies exist, and that's primarily for load balancing. With thousands of concurrent players, and hundreds constantly logging in and out, it puts some strain on the proxy, and, doing this helps ease the process. If you're not sure about any of this, chances are you don't need it for your network.

    Think of it as a separate proxy (so, it'll have a different IP/be on a different machine), but for the same subservers; essentially, all your proxy instances will be mirrored and run the same (or, similar) configurations. IE; proxy1 has a survival and factions server, and proxy2 has those exact same servers. Now, you'll need a way to sync the (player) data between those proxies, and that's commonly done through Redis (and then RedisBungee as the plugin), due to it being insanely fast. I should also mention that Redis is used for way more than just Minecraft server proxy synchronisation.

    Now, you have 2 different IP addresses to connect to your network, and now you have to figure out which Load Balancing method you're going to use. Commonly, a lot of servers that use this setup use a Round Robin type system, and have it randomly assign a proxy on connect.

    It's really that simple! Once they connect to the network, commonly they'll be sent to a random hub (hub1, hub2, etc), and that's done with a BungeeCord plugin, nothing to do with the setup. However, for a few things, you'll want to make sure that your plugin(s) support multiple proxies/Redis.

    I hope you got a gist of how this all works, my explanation may not be the clearest.

    Just to clarify this. It seems he's saying you go from proxy to proxy, and, that's not the case. There's no Transfer Packet on Java, and we can't change the proxy players are connected to on the fly, they'll need to relog for this.
     
    #4 Gianluca, Mar 15, 2020
    Last edited: Mar 15, 2020
  4. Sorry to break it to you, but this is completely and utterly wrong
     
    • Agree Agree x 1
  5. Oh. That’s embarrassing. Sorry.
     
  6. Well a player connects using the proxy ip, Then they connect to the main lobby server and they can choose which server they want to connect to.
     
  7. Okay, thanks for all the explanations.

    Anyway, I'd like to ask, if the player count for a Spigot server is the same for all proxies? I mean, I have two proxies with a Spigot server. On that server are 10 players connected through proxy A and 20 through proxy B. If I ping the server from any of the two proxies, will the Spigot server respond with 30 players connected to it or 10/20 depending on what proxy is pinging? Should be 30, because as I understand, all Spigot servers are the same for all proxies.?

    Thanks again!
     
  8. Gianluca

    Gianluca Retired Resource Staff
    Retired Patron

    Yes. And, for the server list ping, that's where RedisBungee will come in handy, it syncs the player count across proxies