Bugzilla – Bug 14911
Meta-bug for scalability / player redirect
Last modified: 2010-03-22 08:42:50 UTC
This is the meta-bug for making SN more scalable and solving our hostname problems all in one. The big chunks in rough order: 1) Split off the read-mostly identifying data about players and users into a separate database which only needs to be written to during account creation and player registration type events. Inter-database foreign keys will tie this to the sn_prod1 data. Initially this will start be part of the replication ring. SN code needs to be modified to use the new tables appropriately. 2) Mod the SN code further so that it makes a separate DB connection with separate config info for writes to this info, but uses the existing sn_prod1 connection to read it. 3) Add fields to the new central user table for datacenter assignment. Add code at account creation time to fill this in from GeoIP guessing. Initially hacked to always pick "DC", and we consider the whole globe to be "DC" during this transition period. 4) Build in player/user/SC redirect code which looks at the datacenter assignment field in that central database. 5) Build user migration tools, so that we can pick a user and kick all his connections off persistently for a few, re-assign them, move their data to the other datacenter's database, and then let them in. 6) Actually migrate everyone to DC by shutting off service elsewhere. Restart with unreplicated fresh databases at all other datacenters, migrate users back as appropriate under the new scheme. etc...
Re: the "lockout" during user migration, this could probably be implemented with a NULL in the datacenter field. The migrate tool sets this as NULL and kicks off all connections. New connections will be rejected and/or answered with some kind of help message as appropriate for the device/interface ("Your account is being migrated, please wait..."). Then it can move the user data from one DB to another, delete the old data, and then set the datacenter field to the new datacenter.