I’ve just quickly scanned through this plugin, and here’s some quick feedback / suggestions.
Note this is mostly applicable if you’re working on very large WPMU instances (we’ve been manipulating a 200000+ blogs DB and a 70000+ blogs DB).
First, it’s really easier to use a basic algorithm to connect to DBs rather than the “dblist” thing.
Basically the password is dynamically calculated for each db using a simple hash algorithm (kept secret), and the host is selected based on a simple calculation too like $blog_id % $nb_servers -> server to connect to.
In such a context, you just need to be careful about your repartition algorithm, for instance we use a number such as 2520 rather than 1024 or 4096 for the number of DBs. Why ?
Because 2520 is a multiple of 2,3,4,5,6,7,8,9,10.
It means that if your connection algorithm is done properly, until you reach 11 DB servers (should give you time), when you want to add a DB server you only have to move to that server some of the DBs, without having to change your repartition algorithm. While if you used 4096, you’ll have some more trouble once you reach 5 DB servers and will likely have to move all or most blogs around to fit into a new algorithm. You can use the exact same algorithm with 4096 DBs, it’s only that you have to build it from the start in a way that is compatible with having an unknown number of servers up to X, depending on what you target.