Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Kevin Kalitowski 2 posts 71 karma points
    Jul 02, 2020 @ 19:43
    Kevin Kalitowski
    0

    uSync in a load balanced environment

    We are using uSync to push content to a production environment with three machines; 1 internal "master" server where we do Umbraco setup and uSync import/export, and 2 external "non-master" servers that serve the site to the public.

    Our current process is to deploy the uSync files to the internal server and set ImportAtStartup and ExportOnSave to true. The external servers do not get the uSync files and have those variables set to false.

    What I expected was that when the internal server started up it would import the uSync changes, push those to the database, and the other 2 (external) servers would pick up the changes. That does not appear to be happening. What is happening is the internal server shows the changes but the external servers do not. Restarting IIS on the external servers does get them to pickup the changes that the internal server imported.

    My question is: Do you expect that when one server imports via uSync that the other load balanced servers should pickup those changes via the database without needing to restart IIS? Or does uSync work at a different level so those changes are not registered in the database queue that tells other servers when there are changes?

    Thank you

  • Kevin Jump 1753 posts 11263 karma points MVP 4x c-trib
    Jul 02, 2020 @ 21:03
    Kevin Jump
    0

    Hi Kevin

    The way it should work is the servers should get the changes without being restarted. uSync is saving the changes using the Umbraco APIs (so not going via the database) so all the events and triggers that are fired when you update items should be getting fired when updates are made.

    but I will have a play around and see if i can replicate, what version of Umbraco & uSync are you using ?

    also - an example of a change being imported that you are not seeing on the other servers.

  • Kevin Jump 1753 posts 11263 karma points MVP 4x c-trib
    Jul 03, 2020 @ 08:33
    Kevin Jump
    0

    Hi

    Just wanted to update on this:

    I have tested this with the latest versions (Umbraco 8.6.3 / uSync 8.6.3) and it works the same way Umbraco does.

    Which is to say changes to content/media/doctypes are all reflected on the secondary servers - both on the front end and in the backoffice.

    When you update a datatype's properties you don't see those properties updated in the back-office on the secondary servers. (to see this add a colour to the approved colour picker)

    I am not sure how much of an issue this is (if it is one, its an issue with the Umbraco core) the recommendation is that you don't use the back-office on the secondary servers (see design section of load balanced docs)

    Its also worth noting that uSync will not perform its automated tasks (such as import at startup or saving changes to disk) on a secondary server - it will do things from the dashboard if you ask it to.

    This is to stop conflicts between imports - there i would say the recommendation is you have some config/code to ensure that your master server is always the master . (see https://our.umbraco.com/Documentation/Getting-Started/Setup/Server-Setup/Load-Balancing/flexible-advanced#explicit-master-scheduling-server)

Please Sign in or register to post replies

Write your reply to:

Draft