Package com.yahoo.config.application.api
Class Bcp
java.lang.Object
com.yahoo.config.application.api.Bcp
Defines the BCP structure for an instance in a deployment spec:
A list of region groups where each group contains a set of regions
which will handle the traffic of a member in the group when it becomes unreachable.
This is used to make bcp-aware autoscaling decisions. If no explicit BCP spec
is provided, it is assumed that a regions traffic will be divided equally over all
the other regions when it becomes unreachable - i.e a single BCP group is implicitly
defined having all defined production regions as members with fraction 1.0.
It is assumed that the traffic of the unreachable region is distributed
evenly to the other members of the group.
A region can be a fractional member of a group, in which case it is assumed that
region will only handle that fraction of its share of the unreachable regions traffic,
and symmetrically that the other members of the group will only handle that fraction
of the fraction regions traffic if it becomes unreachable.
Each production region defined in the instance must have fractional memberships in groups that sums to exactly one.
If a group has one member it will not set aside any capacity for BCP.
If a group has more than two members, the system will attempt to provision capacity
for BCP also when a region is unreachable. That is, if there are three member regions, A, B and C,
each handling 100 qps, then they each aim to handle 150 in case one goes down. If C goes down,
A and B will now handle 150 each, but will each aim to handle 300 each in case the other goes down.
- Author:
- bratseth
-
Nested Class Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic Bcp
empty()
boolean
groups()
int
hashCode()
boolean
isEmpty()
Returns this bcp spec, or if it is empty, the given bcp spec.Set<com.yahoo.config.provision.RegionName>
regions()
Returns the set of regions declared in the groups of this.toString()
withGroups
(List<Bcp.Group> groups)
-
Constructor Details
-
Bcp
-
-
Method Details
-
defaultDeadline
-
groups
-
withGroups
-
regions
Returns the set of regions declared in the groups of this. -
isEmpty
public boolean isEmpty() -
orElse
Returns this bcp spec, or if it is empty, the given bcp spec. -
empty
-
equals
-
hashCode
public int hashCode() -
toString
-