Server architecture

This wiki is mainly focused on the viewer, since that is the portion of the system that is open source. However, because the viewer interacts with the Second Life servers in somewhat complicated ways, it is helpful to have an understanding of what components do what on the server side.

Much of what you'll need to understand is actually covered in the protocol documentation. In particular, take a look at Authentication Flow, which outlines the process by which the viewer establishes connections with a number of components.

(obsolete) if you want to see what the architecture may look like in the future, or if you would like to help shape it, visit the Architecture Working Group.


Components

Login server

CGI script running on login.agni.lindenlab.com. Handles verification of user name and password. Determines the login region based on home vs. last location vs. URL specified location. Finds the simulator process running that region and verifies user is allowed to connect there. Alerts the simulator to expect a connection. Informs the viewer of where to connect.


Spaceserver

Handles routing of messages based on grid x,y locations. Simulator talks to Space Server to *register* and also find who the neighbors are.

Dataserver

Handles connections to the central database, log database, inventory database(s) and search database(s). Performs queries on behalf of the simulator process.

Simulator

The primary SL server process. Each simulator process simulates one 256x256 meter region.

There are about 26,000 regions in total in 2026. Each one is hosted on an AWS EC2 instance within an AWS ECS container.

It handles storing object state, land parcel state, and terrain height-map state. It performs visibility calculations on objects and land and transmits the data to the viewer. It transmits texture data in a prioritized queue. Physics simulation is handled with the Havok physics library. Chat and instant messages are processed here. The viewer is handed off from one simulator to another as it moves between regions.

Running at full tilt, a simulator will run at 45 frames/sec. If it can't keep up, it will attempt time dilation without reducing frame rate. More details on work performed during a frame are in Simulator Main Loop.

Simulators communicate with one another using a circuit via UDP. A "circuit" is a UDP network connection. Circuits are maintained between adjacent simulators.

Simulator vs. Viewer

It helps to understand the division of labor between the simulator and the viewer, since the split in Second Life is very different than most other virtual environments:

Other servers