Kamailio, the ex OpenSER team has released an enhanced version of lcr module, in to the development trunk.
The new high-performance implementation keeps lcr information in an in-memory hash table. The size of which could be managed with the new parameter 'lcr_hash_size'.
The 'weight' field in 'gw' table allows to assign a gateways according to weight in a group. Among other enhancements, lcr_reload function is now executed under a lock minimizing race conditions.
You can learn more about what is new in upcoming Kamailio 1.5.0 at Kamailio Dokuwiki site:
If you are a developer, then download trunk version of Kamailio via SVN:
svn co https://openser.svn.sourceforge.net/svnroot/openser/trunk kamailio