[CLEAN] Synthetic Benchmark PR #52786 - allow configuring multiple object store backends #11
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Benchmark PR nextcloud#52786
Type: Clean (correct implementation)
Original PR Title: allow configuring multiple object store backends
Original PR Description: Allow configuring multiple object store backends to allow further load balancing and easier migration.
Configuration
Multiple object stores are configured by setting the
objectstoresystem config to an array of object storage configurations instead of a single configuration. This array can contains both configuration items and references to other configuration keys (which functions as an alias).When a the configured bucket for a user is an alias, the target of the alias is stored as the users chosen configuration instead to make migrations easier.
The "default" option is required to be an alias to prevent instances from accidentally being setup in a way that makes migration difficult.
By default everything is put in the "default" bucket, objects for the root storage are put in the "root" bucket if it exists ("default" if it doesn't), the backend for users can be set with a user preference option (
occ user:setting <user> homeobjectstore objectstore <config key>).Existing
objectstoreandobjectstore_multibucketconfigurations are handled transparently.Migration example
Migrating users to a new s3 server could be done with the following steps:
defaultreference to the new configuration.all new users will now be stored on the new s3 server, existing users can now be migrated one-by-one with minimal downtime
example configuration:
For a use case where all objects in the root storage is put in "objectstore1/nextcloud-root", users created before the objectstore migration have the "homeobjectstore.objectstore" config option set to "old" and have their objects stored in "objectstore1/nextcloud" which all users created afterwards have their objects stored in the "objectstore2/nextcloud-XX" buckets.
todo
Original PR URL: allow configuring multiple object store backends nextcloud/server#52786