Second Life Architecture - The Grid

Update:Presentation: Second Life’s Architecture. Ian Wilkes, VP of Systems Engineering, describes the architecture used by the popular game named Second Life. Ian presents how the architecture was at its debut and how it evolved over years as users and features have been added. Second Life is a 3-D virtual world created by its Residents. Virtual Worlds are expected to be more and more popular on the internet so their architecture might be of interest. Especially important is the appearance of open virtual worlds or metaverses. What happens when video games meet Web 2.0? What happens is the metaverse.
Information Sources
- Second Life runs MySQL
- Interview with Ian Wilkes
- TechTrends: Inside Linden Lab
- Town Hall with Cory Linden
- InformationWeek articles (1, 2) and blog
- Second Life Wiki: Server Architecture
- Wikipedia: Second Life Server
- Second Life Blog
- Second Life: A Guide to Your Virtual World
Platform
- MySQL
- Apache
- Squid
- Python
- C++
- Mono
- Debian
What's Inside?
The Stats
- ~1M active users
- ~95M user hours per quarter
- ~70K peak concurrent users (40% annual growth)
- ~12Gbit/sec aggregate bandwidth (in 2007)
Staff (in 2006)
- 70 FTE + 20 part time
Software
Client/Viewer- Open Source client
- Render the Virtual World
- Handles user interaction
- Handles locations of objects
- Gets velocities and does simple physics to keep track of what is moving where
- No collision detection
- Runs Havok 4 physics engine
- Runs at 45 frames/sec. If it can't keep up, it will attempt time dialation without reducing frame rate.
- Handles storing object state, land parcel state, and terrain height-map state
- Keeps track of where everything is and does collision detection
- Sends locations of stuff to viewer
- Transmits image data in a prioritized queue
- Sends updates to viewers only when needed (only when collision occurs or other changes in direction, velocity etc.)
- Runs Linden Scripting Language (LSL) scripts
- Scripting has been recently upgraded to the much faster Mono scripting engine
- Handles chat and instant messages
- One big clustered filesystem ~100TB
- Stores asset data such as textures.
- Eventlet is a networking library written in Python. It achieves high scalability by using non-blocking io while at the same time retaining high programmer usability by using coroutines to make the non-blocking io operations appear blocking at the source code level.
- Mulib is a REST web service framework built on top of eventlet
- 2000+ Servers in 2007
- ~6000 Servers in early 2008
- Plans to upgrade to ~10000 (?)
- 4 sims per machine, for both class 4 and class 5
- Used all-AMD for years, but are moving from the Opteron 270 to the Intel Xeon 5148
- The upgrade to "class 5" servers doubled the RAM per machine from 2GB to 4GB and moved to a faster SATA disk
- Class 1 - 4 are on 100Mb with 1Gb uplinks to the core. Class 5 is on pure 1Gb
-
Asset Server