# Rule-based replication (QoS)
Quality of Service (QoS) is used to manage file replica distribution and redundancy between providers supporting a space.
This documentation concerns the proper configuration of the Oneprovider service so that QoS rules can be effectively utilized by the users. For details on how QoS works and how to use it, consult the counterpart documentation for end users.
# QoS parameters
QoS management is based on QoS parameters that are assigned to storage backends
by Oneprovider admins. All parameters are in the form of key=value
.
Each storage has implicit parameters representing its ID and the ID of its Oneprovider:
storageId=$STORAGE_ID
and providerId=$PROVIDER_ID
.
You can modify the QoS parameters using the Web GUI (Administration Panel) or REST API.
NOTE
The storageId
and providerId
parameters cannot be removed or modified.
# Web GUI guide
QoS parameters can be set during storage creation:
To modify the parameters, use the Modify action for the desired row in the Storage backends view.
# Using REST API
Below are some links to the REST API documentation for Oneprovider administrators concerning the management of storage backend's QoS parameters:
Operation | Link to the API docs |
---|---|
Listing QoS parameters | API (opens new window) |
Modifying QoS parameters | API (opens new window) |
# Modifying QoS parameters
Adding new parameters, removing or modifying existing ones is done with the use of the same REST endpoint. Submitted QoS parameters overwrite the previous ones. The below example assumes that QoS parameters before modifications were as follows:
"geo": "PL",
"type": "disk"
The following command will result in the parameter geo
being removed, the value of parameter type
updated
and a new parameter new_key
added.
curl -H "${AUTH_HEADER}" -H "${CT}" -X PATCH {$PANEL_API}/provider/storages/$STORAGE_ID -d '{
"$STORAGE_NAME": {
"type": "$STORAGE_TYPE",
"qosParameters": {
"type": "modified_type",
"new_key": "new_value"
}
}
}'