[BlueOnyx:23030] Re: Clustering for HA

Michael Stauber mstauber at blueonyx.it
Fri Jul 26 16:50:41 -05 2019


Hi Ernie,

> Has anyone worked out a good method of load balancing sites across multiple
> BX servers?

Let me get back to this. By now I can say: Yes, it can be done. The new
"Easy Migrate" takes care of that and can help you to easily accomplish
this.

See: https://www.blueonyx.it/easy-migrate

> Of course that only takes care of websites and nothing else. CODB is the
> issue. Any thoughts on replicating that functionality?

Yeah, CODB has always been holding us back on that feature. But after
two years of mulling this over I realized that we could turn that
perceived weakness into an advantage.

The CODB objects contain all the information we need to make a clone of
a Vsite, of Users and all the related settings. Different BlueOnyx
models have differences in their CODB Object and Namespace schemas. But
usually we never take old keys out of the Schemas, but add new ones. And
all the new keys have sensible default values defined, so we're not
forced to set them in most cases during a migration.

So "Easy Migrate" takes advantage of that. It fetches the CODB Schema of
a Vsite and a User Object (and all their Namespaces) from the source
server. It compares them with a Vsite and a User on the target server.
If there isn't a Vsite yet it creates and deletes one for gathering that
info.

The rest is plain Hash or Array key comparison and weeding out whatever
doesn't exist or doesn't fit anymore. There were surprisingly few hard
coded adjustments needed. Like for the difference in PHP integration
between 5207R/5208R and 5209R/5210R, where some sensible defaults for a
migration had to be established. Or finding out which keys we don't want
to set. For example if a Vsite is using Let's Encrypt, then it has a
flag set that on import would trigger a re-creation of the LE cert
request. So we just import the existing cert instead and leave the
trigger blank. Stuff like that.

Additionally: As Easy Migrate uses RSYNC over SSH you could even set up
a cronjob that runs it as often as you like and it'll keep the Vsites
and Users in Sync and also transports over any CODB related changes you
made in between on the source server of the migration.

-- 
With best regards

Michael Stauber



More information about the Blueonyx mailing list