Automatic Server Selection

Discussion in 'BungeeCord Plugin Development' started by Gus Callaway, Mar 17, 2013.

  1. I think it would be a neat feature if Bungee cord could move connecting players to a different server if the main one is full instead of just kicking them saying the server is full. The would be most usefull for any minigame server cloud like the walls or hunger games. A proiority setting would also have to be added into the config for each server. As an alternative to a priority, it could just be based on what position it holds in the config. So the server listed first would automatically have the highest priority.

    Here is an example. Say there is a AutoWalls server with 5 different sub servers under the same cloud. Their config would look like this.
    Code (Text):
    servers:
      us1:
        address: localhost:25501
        priority: 5
      us2:
        address: localhost:25502
        priority: 4
      us3:
        address: localhost:25503
        priority: 3
      us4:
        address: localhost:25504
        priority: 2
      us5:
        address: localhost:25505
        priority: 1
    Note: This would also remove the need for a 'default_server' setting.

    In this case, if someone connects to the BungeeCord proxy, it will forward them to us1. If us1 is full, it will forward them to us2, if us2 is full, to us3, ect. The would provide the most efficient sorting system for a server like this. Ideally, BungeeCord would be able to apply this same process to other situations. For example, if us1 was offline, BungeeCord would send the player to us2. Even if it just did the player slot feature though, it would still be very helpful.
     
    • Like Like x 4
    • Agree Agree x 1
  2. The said topic about us1 can be done much easier without the need of two proxies, just one hub server with signs. You right click a sign that said [gamemode] and it searches through a set of specified servers in the config to find one which is open.

    I know no publicly available plugins for this at the moment, but someone could whip one up. I have seen it on other servers.
     
  3. Favorlock

    Sponsor

    I think his point was if someone tried to connect to a server and it was full then it would send them to the next server instead.
     
  4. In theory it could be done with the plugin mentioned above just pointed to the hub (In this case us1) and others.
     
  5. So the priority system would be held in the plugins configuration instead of bungee.

    Code (Text):
    priority:
      - us1
      - us2
      - us3
      - us4
      - us5
     
    This would set us1 as the top priority descending downwards. When the plugin recieves a player wanting to join the game, it checks player slots for us1. If us1 is full, it moves to us2. If thats full, it moves on to us3. If us3 has a slot open, it forces the player to type /server us3.

    It is true that this could be done with a plugin, but since the BungeeCord implementation would aid all kinds of servers, including ones that dont have hub servers, and since it is a faster way to do the same thing, I would still suggest doing it via BungeeCord rather than a plugin. I understand that the developers want to keep it as lightweight as possible, but I think this would be worth it.
     
  6. I would prefer it via bungee implementation but currently the latest build has bigger problems such as persistent crashes. It is done very easily via plugins, as mchive.eu and other servers have shown. That test config you made is correct.

    For multiple minigame servers you would probably want different lines. So like

    Code (Text):
    priority:
      hungergames:
        - us1
        - us2
        - us3
      spleef:
        - us1
        - us2
        - us3

    Then you would define a sign like [hungergames] which would execute the process of searching for an open server in that order. And disable /server command (Unless you still want joining manually)
     
  7. Would it be a BungeeCord plugin, a Bukkit plugin, or both?
     
  8. A bukkit plugin that interacts with bungee through Plugin Messages.
     
  9. now I just need to track down a developer...
     
  10. Share if possible, I would love this.