leapcode/leap_platform — pull request #6 by elijh (2013-07-30 20:15:32+00:00)
Title: add weights and backup servers to haproxy

this requires leap_cli 1.2.1 to work correctly.

if there are no "close" couchdb nodes, then all are weighted equally and there are no backups.

if there are some close couchdb nodes, these are weighted more and the rest are set as backups.

currently, we don't use timezone to figure out relative weights, we just distinguish between local and non-local. effectively, this means the 'weight' is not really used, just the 'backup' option. in the future, we might make weight mean something real.

"option allbackups" is required so that all backup servers will be used, not just a single one (if ever non-backup server is dead).