Wiki source code of Shared Resources
Last modified by Eleni Cojocariu on 2026/10/20 06:45
Show last authors
| author | version | line-number | content |
|---|---|---|---|
| 1 | [[Distributing events>>doc:documentation.xs.admin.clustering.enable-event-distribution.WebHome]] keeps the nodes of a cluster in agreement about what changed, but it moves no data: anything a node //stores// has to be stored where every other node can read it, or the nodes slowly become different wikis. Below is what they share, what they must not share, and the page that documents each. | ||
| 2 | |||
| 3 | {{plantuml}} | ||
| 4 | @startuml | ||
| 5 | !theme bluegray | ||
| 6 | skinparam nodesep 25 | ||
| 7 | skinparam ranksep 40 | ||
| 8 | |||
| 9 | node "XWiki node" as N | ||
| 10 | |||
| 11 | package "Its own permanent directory" as PD { | ||
| 12 | file "observation/id.txt" as ID | ||
| 13 | file "configuration.properties" as CONF | ||
| 14 | folder "store/solr" as LS | ||
| 15 | } | ||
| 16 | |||
| 17 | package "Shared with every other node" as SHARED { | ||
| 18 | database "database" as DB | ||
| 19 | node "remote Solr" as RS | ||
| 20 | folder "attachments and\ndeleted documents" as ATT | ||
| 21 | } | ||
| 22 | |||
| 23 | N --> PD : keeps to itself | ||
| 24 | N --> SHARED : reads and writes | ||
| 25 | @enduml | ||
| 26 | {{/plantuml}} | ||
| 27 | |||
| 28 | |=Resource|=Why every node needs the same one|=Where it is documented | ||
| 29 | |The database|It holds the documents themselves, and every node reads and writes them there.|[[Install and Configure a Relational Database>>doc:documentation.xs.admin.installation.methods.install-xwiki-war.install-relational-database.WebHome]] | ||
| 30 | |A remote Solr server|Some Solr cores are storage rather than a rebuildable index: the ##events## core is where notifications and the activity stream live, and ratings likewise. A node left on the default ##solr.type=embedded## keeps its own copy of that data in its own permanent directory, so set ##solr.type=remote## and ##solr.remote.baseURL## on every node.|The "Set up a remote Solr server" section of [[Solr Search API>>doc:extensions:Extension.Solr Search API]] | ||
| 31 | |A blob store for attachments and deleted documents|Setting ##store.blobStoreType## to ##s3## puts attachments and deleted documents where every node reads the same bytes. Only the ##filesystem## blob store is bundled, so the S3 one has to be installed as an extension first.|[[Blob Store>>doc:documentation.xs.admin.store.blob.WebHome]] and [[Configure S3 as Blob Store>>doc:documentation.extensions.admin.s3-blob-store.configure-s3.WebHome]] | ||
| 32 | |A shared directory for the filesystem store, when S3 is not an option|The filesystem store writes under the node's own permanent directory, so each node ends up with the attachments uploaded to it. Point ##store.file.directory## at the shared mount instead of sharing the permanent directory itself.|[[The Attachment Store>>doc:documentation.xs.admin.store.attachment-store.WebHome]], and [[Sub-Directories in the Permanent Directory>>doc:documentation.xs.admin.configuration.directories.permanent-directory.sub-directories.WebHome]] for the property itself | ||
| 33 | |**Not** the permanent directory as a whole|It also holds state that has to stay per node: the cluster identifier in ##observation/id.txt##, the keys and settings XWiki persists in ##configuration.properties##, and the embedded Solr index in ##store/solr##. Sharing all of it makes the nodes fight over the same files.|[[Sub-Directories in the Permanent Directory>>doc:documentation.xs.admin.configuration.directories.permanent-directory.sub-directories.WebHome]] | ||
| 34 | |The authentication keys|A node that was not given the same keys as the others rejects their session cookies, so a visitor is logged out the moment the load balancer moves them.|[[Authentication Parameters>>doc:documentation.xs.admin.authentication.parameters.WebHome]] | ||
| 35 | |A sticky load balancer|A session exists only on the node that created it, so a visitor has to keep reaching that node.|[[Add a Load Balancer>>doc:documentation.xs.admin.clustering.load-balancer.WebHome]] |