Enable per policy proxy config options
This is an alternative approach to that proposed in [1] Adds support for optional per-policy config sections to be added in proxy-server.conf. This is highly desirable to allow per-policy affinity options to be set for use with duplicated EC policies [2] and composite rings [3]. Certain options found in per-policy conf sections will override their equivalents that may be set in the [app:proxy-server] section. Currently the options handled that way are: sorting_method read_affinity write_affinity write_affinity_node_count For example: [proxy-server:policy:0] sorting_method = affinity read_affinity = r1=100 write_affinity = r1 write_affinity_node_count = 1 * replicas The corresponding attributes of the proxy-server Application are now available from instances of an OverrideConf object that is obtained from Application.get_policy_options(policy). [1] Related-Change: I9104fc789ba85ab3ab5ccd34096125b482821389 [2] Related-Change: Idd155401982a2c48110c30b480966a863f6bd305 [3] Related-Change: I0d8928b55020592f8e75321d1f7678688301d797 Co-Authored-By: Kota Tsuyuzaki <tsuyuzaki.kota@lab.ntt.co.jp> Change-Id: I3f718f425f525baa80045ba067950c752bcaaefc
This commit is contained in:
11 changed files with 1150 additions and 117 deletions
@@ -174,6 +174,7 @@ use = egg:swift#proxy
# affinity cases, equally-sorting nodes are still randomly chosen to
# spread load.
# The valid values for sorting_method are "affinity", "shuffle", or "timing".
# This option may be overridden in a per-policy configuration section.
# sorting_method = shuffle
#
# If the "timing" sorting_method is used, the timings will only be valid for
@@ -211,6 +212,7 @@ use = egg:swift#proxy
# anything in region 2, then everything else:
# read_affinity = r1z1=100, r1z2=200, r2=300
# Default is empty, meaning no preference.
# This option may be overridden in a per-policy configuration section.
# read_affinity =
#
# Specifies which backend servers to prefer on writes. Format is a comma
@@ -223,6 +225,7 @@ use = egg:swift#proxy
# nodes:
# write_affinity = r1, r2
# Default is empty, meaning no preference.
# This option may be overridden in a per-policy configuration section.
# write_affinity =
#
# The number of local (as governed by the write_affinity setting) nodes to
@@ -230,6 +233,7 @@ use = egg:swift#proxy
# should be an integer number, or use '* replicas' at the end to have it use
# the number given times the number of replicas for the ring being used for the
# request.
# This option may be overridden in a per-policy configuration section.
# write_affinity_node_count = 2 * replicas
#
# These are the headers whose values will only be shown to swift_owners. The
@@ -249,6 +253,18 @@ use = egg:swift#proxy
# ionice_class =
# ionice_priority =
# Some proxy-server configuration options may be overridden on a per-policy
# basis by including per-policy config section(s). The value of any option
# specified a per-policy section will override any value given in the
# proxy-server section for that policy only. Otherwise the value of these
# options will be that specified in the proxy-server section.
# The section name should refer to the policy index, not the policy name.
# [proxy-server:policy:<policy index>]
# sorting_method =
# read_affinity =
# write_affinity =
# write_affinity_node_count =
[filter:tempauth]
use = egg:swift#tempauth
# You can override the default log routing for this filter here:
Reference in New Issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.