On Thu, 2016-02-25 at 15:54 +0100, Petr Spacek wrote:
On 25.2.2016 15:28, Simo Sorce wrote:
On Thu, 2016-02-25 at 14:45 +0100, Petr Spacek wrote:
An alternative is to be lazy and dumb. Maybe it would be enough for
We would retain
[first step - no change from variant A]
* create locations
* assign 'main' (aka 'primary' aka 'home') servers to locations
++ specify weights for the 'main' servers in given location, i.e.
input (server, weight) tuples
Then, backups would be auto-generated set of all remaining servers
Additional storage complexity: 0
This covers the scenario "always prefer local servers and use remote
fallback" easily. It does not cover any other scenario.
This might be sufficient for the first run and would allow us to
feedback from the field.
Now I'm inclined to this variant :-)
To be honest, this is all I always had in mind, for the first step.
- define a location with the list of servers (perhaps location is a
property of server objects so you can have only one location per server,
and if you remove the server it is automatically removed from the
location w/o additional work or referential integrity necessary), if
weight is not defined (default) then they all have the same weight.
- Allow to specify backup locations in the location object, priorities
are calculated automatically and all backup locations have same weight.
Hmm, weights have to be inherited form the original location in all
you mean that all backup locations have the same *priority*?
Anyway, explicit configuration of backup locations is introducing API and
schema for variant A and that is what I'm questioning above. It is hard to
make it extensible so we do not have headache in future when somebody
that more flexibility is needed OR that link-based approach is better.
I think no matter we do we'll need to allow admins to override backup
locations, in future if we can calculate them automatically admins will
simply not set any backup location explicitly (or set some special value
like "autogenerate" and the system will do it for them.
Forcing admins to mentally calculate weights to force the system to
autogenerate the configuration they want would be a bad experience, I
personally would find it very annoying.
In other words, for doing what you propose above we would have to design
complete schema and API for variant A anyway to make sure we do not lock
ourselves, so we are not getting any saving by doing so.
A seemed much more complicated to me, as you wanted to define a ful
matrix for weights of servers when they are served as backups and all
- Define a *default* location, which is the backup for any other
location but always with lower priority to any other explicitly defined
I would rather *always* use the default location as backup for all other
locations. It does not require any API or schema (as it equals to "all
servers" except "servers in this location" which can be easily calculated
We can start with this, but it works well only in a stellar topology
where you have a central location all other location connect to.
As soon as you have a super-stellar topology where you have hub location
to which regional locations connect to, then this is wasteful.
This can be later on extended in whatever direction we want without any
More importantly, all the schema and API will be common for all other
anyway so we can start doing so and see how much time is left when it is
I am ok with this for the first step.
After all location is mostly about the "normal" case where clients want
to reach the local servers, the backup part is only an additional
feature we can keep simple for now. It's a degraded mode of operation
anyway so it is probably ok to have just one default backup location as
a starting point.