The GlobalTuners system is very complex. It consists of more than 60 servers all over the world, which are all somehow connected. Most of these servers may sign on and off at any time.
The system is built around one central (physical) server, which runs the so called 'Hub', 'Relay', database server and the webserver. More than 60 "nodes", the servers connected to the receivers, connect to the Hub and Relay. More than 10 users are connected to the Hub and optionally the Relay server and a node at any time.
Everything in the network talks directly to the hub, passing small messages to handle authentication of users, logging and administration. Even though the hub is responsible for only a small amount of traffic, it consumes relatively much CPU power to process all the messages.
The Hub is mostly visible to the outside world as the software that handles the Global Chat. Behind the scenes, it does a lot more: it handles authentication of users connecting to receivers, authentication of the nodes, updates the database on behalf of the nodes, forwards administrative commands from the website to the nodes. In addition, many nodes use the 'Relay' mechanism, which basically directs all traffic to and from the node through the GlobalTuners servers, to hide their IP address and/or work around firewalls and port forwarding issues. The Hub forwards the control messages between the user and the node. In some special cases, when using AJAX, Comet or page reloading to talk to the receiver, the Hub does some additional processing and buffering.
The Relay server was designed to forward audio streams from the nodes to the users. Nodes that have little bandwidth, wish to hide their IP address or can not open a port in a firewall or NAT router, can use the relay server to solve these issues. The user requests the audio stream from the relay instead of directly from the node, and the relay asks the node, via the hub, to start an audio stream to the relay. The relay can also distribute an already running stream to multiple users when they request the same audio stream, saving some bandwidth on the node.
More recently, the relay server also became responsible for RTMP access to the nodes. RTMP is the native protocol used by Adobe Flash, and provides near real-time audio streaming, interleaved with control data on one connection. The relay in turn talks to the nodes via the hub.
One MySQL database is used for the entire system. It's accessed by the website to provide all dynamic content, and to manage node configurations. The database is also accessed by the hub to provide status information to the website and to read configuration information to pass on to the nodes.
The webserver runs only PHP scripts. These PHP scripts talk to the database server and occasionally directly to the hub to provide direct access to statistics, management operations and receivers. In some cases, the webserver is used to access a receiver through the AJAX, Comet or page refresh technology. The webserver also serves the Flash components, which in turn talk to the nodes and hub to access the receivers and global chat.