Release Details
This is a release candidate for 17.5.0. It is published to NuGet as a prerelease, so you need to include prereleases to install it.
The main work in 17.5.0 is support for load-balanced sites, and a much better Publisher content and media browser. It also fixes restore points hanging on large sites under IIS.
uSync:Publisher:Settings:AffinityFailFast setting (off by
default) stops a push or pull as soon as it moves to a different server,
instead of letting it carry on.uSync:WorkingFolder:Path setting controls where uSync keeps its
working files, so all the servers in a load-balanced site can share one
working folder.A push or pull sends a series of requests to the target site. Each request uses files the one before it left in the target's working folder. When the target is load balanced, those requests can land on different servers. The working files are then missing on the server that picks up a request, and the push or pull fails partway through with a "File not found" or "Folder missing" error.
17.5.0 gives you two ways to deal with this. You can use either one, or both.
[!NOTE] If your load balancer already uses server affinity, you probably won't need to change any configuration in Umbraco: uSync's affinity support is on by default.
If your load balancer uses an affinity cookie (ARR affinity on Azure App Service, Application Gateway, or any other cookie-based "sticky session" option), Publisher now picks the cookie up from the first response. It then sends it back on every later request of the same push or pull, so the whole operation stays on the server that answered first.
Setup: turn on cookie-based affinity in your load balancer. There's nothing to set in uSync. It works with any cookie name and does nothing against a server that doesn't set one. These settings are there if you need them:
"uSync": {
"Publisher": {
"Settings": {
"AffinityEnabled": true,
"AffinityCookieNames": [],
"AffinityFailFast": false
}
}
}
AffinityCookieNames: leave it empty to send back every cookie the target
sets. Only list names if the target sets other cookies that should be left
alone.AffinityFailFast: if a push or pull moves to a different server anyway,
uSync always logs a warning naming both servers. Turn this on to also stop
the operation there, instead of letting it fail a few steps later.To see which server answered a request, check the X-uSync-Node header on
responses from the target.
Affinity is only needed because each server keeps its working files on its own local temp storage. If every server can reach the same storage (a UNC share, a mounted volume, or on Azure a path backed by Azure Files), you can put uSync's working folder there. Then every server sees the same files, whichever one answers a request.
"uSync": {
"WorkingFolder": {
"Path": "\\\\shared-server\\usyncwork"
}
}
Setup:
Path on every server in the site. It accepts an absolute
path, or a path relative to the site's content root (e.g. ~/usyncwork),
but a relative path is only shared if that location is itself on shared
storage.Leave Path unset and nothing changes: uSync keeps using a uSync folder in
Umbraco's local temp storage.
The backoffice you push or pull from still needs your load balancer's normal session affinity for your browser. uSync doesn't manage that.
For the live progress connection on a load-balanced site, see the next section.
During a push or pull, the servers keep a SignalR connection open between them to send live progress back to your browser. In this release that connection gives up quickly on a server it can't reach, rather than waiting SignalR's default 15 seconds. The server settings page also warns you when it can't connect.
The connection only carries progress updates, so a push or pull works without it. You can turn it off:
"uSync": {
"Publisher": {
"Settings": {
"ServerToServerHub": false
}
}
}
It is on by default, and you only need to turn it off if you see delays or other problems during a push or pull. This is most likely on a load-balanced site, where the connection can land on a different server from the push or pull itself.
uSyncSnapshots_singleWarning) in the backoffice.IProcessingOptions implementation.