Skip to content

Cross Server Communication

Nick DeGruccio edited this page Jan 23, 2021 · 2 revisions

Starting with 6.0.0, GTS was redesigned to focus on networks of servers. While GTS can still be run in with just a single server in mind, the functionality of the plugin is structured to handle both cases!

When installing GTS across a network of servers, the same general installation rules apply!


Prerequisites

In order for GTS to work correctly across a network, all instances of GTS must be using the same storage type and messaging type!

In terms of storage options, you are limited to:

  • MySQL
  • MariaDB
  • MongoDB
  • PostgreSQL Note: You must have each system read from the same database!

BungeeCord / Waterfall / Velocity

GTS tracks player information via their UUID's. The UUID of a player is provided by the server implementation, but this ID can be altered depending on the state of the online-mode setting.

When using a server proxy service (one of the names indicated by this section), it's absolutely critical that you establish the proxy service's IP forwarding system.

We will assume you know how to do this. If not, please refer to your proxy service's configuration guidelines.


Installing GTS across your Network

Installing GTS on your network is fairly straight-forward. However, you will need to adjust a few configuration options based on the type of server GTS is being installed on, as well as for general communication.

As for installing GTS on a single server instance, you can refer to the general Installation guide. If you are installing GTS with cross-server communication in mind, then please see the below information to understand what exactly you need to alter to establish communication.

storage-method

Mentioned during the Prerequisites, you are limited to a set of storage methods if you wish for data to sync between instances.

Ensure you set your storage-method to one of those options, as well as that you are using the same connection settings for all instances.

messaging-service

The "Messaging Service" is based on the service designed by LuckPerms, and has been integrated into GTS. This service acts as the system responsible for notifying other servers within the network of information that will affect the processing of the plugin.

  • If you are running a small network (set of servers connected to a singular proxy), then you should set this option to pluginmsg
  • If you are running a network with more than one proxy, then it's recommended you install a Redis server (we will assume you know how to do this already), and set this option to redis. You'll also need to fill in your Redis credentials after setting this option so the system can connect properly!
  • If you have no proxy in use, you can keep this mode set to none.

The Proxy-Based Version of GTS

It's important to note that the proxy-based version of GTS is not a replacement for the backend versions of the plugin. Information regarding the contents of listings is unavailable to the service, as the proxy can never reliably decipher the information into a working format.

As such, the proxy-based version of the plugin has only two roles:

  • Handles requests made by players that'll interact with/change the listings stored in GTS in a FIFO (first in, first out) order, ensuring that two servers making a similar request meet no conflicts (like duplication or overriding of data).
  • Forwards responses of request messages around the network when messaging-service is set to pluginmsg.

This means that GTS is, and always will be, required on your Spigot/Sponge server, even if you have the proxy-based version installed.