Copied to clipboard

Flag this post as spam?

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


  • James McMunn 2 posts 83 karma points
    Oct 21, 2015 @ 08:46
    James McMunn
    1

    Umbraco 7 backend and load balancing - what are the problems?

    We have recently started using Umbraco, and are currently deploying it to Azure cloud services. We are deploying our web app with Umbraco's back-office to the same cloud service, and making use of things like auto-scaling. We are using Umbraco v.7.3.0.

    However, I have seen this documentation: https://our.umbraco.org/documentation/getting-started/setup/server-setup/load-balancing/ which states "You will designate a single server to be the back-office server for which your editors will log into for editing content. Umbraco will not work correctly if the back-office is behind the load balancer.".

    Unfortunately, to fix this would mean creating another cloud service for the back-office, and forcing it to only have one instance. We would also lose the abillity to deploy to it at any time, so it isn't the preferrred way we'd like to run things.

    So far we haven't noticed any problems with multiple instances of a cloud service using Umbraco's back-office, can anybody tell me what are the likely problems we would see and explain why? I'm keen to get an understanding of why this causes a problem.

  • James Strugnell 80 posts 188 karma points
    Oct 31, 2015 @ 09:03
    James Strugnell
    0

    Can't help you but I was just about to ask the same question so hopefully this will bump it up to someone's attention.

    Can I ask what your implementation looks like in terms of specifics required for Load Balancing. i.e.:

    Did you set up a machine key in your web.config and, if so, did this cause issues with your existing user accounts? Have you implemented an alternative session provider (SQL? Redis?)

    Are you still using Log4Net Files for logging, but with the Machine Name appended? How's that working out for you?

    Do you have many back-office editors? i.e. it might be possible that, in the scenario where you only have one editor (mostly) then they will be kept on the same server within the load-balanced environment and perhaps negate the issues that can arise with the back-office being edited across multiple servers. (That's speculation by the way)

    How have you set up your Media directory? Is that in Azure blob storage?

    Have you got Examine configured and working? Was that straightforward following the docs?

    Have you configured auto-scaling within Azure? What is the impact on the site when you add/remove instances? Any downtime incurred?

    Any other issues you've had while using 7.3 and load balancing in Azure web sites?

    I'm looking at potentially enabling load balancing in Azure and your answers here (and anyone else's) would be very helpful.

    Thanks, James.

  • Shannon Deminick 1469 posts 4924 karma points hq
    Nov 16, 2015 @ 14:57
    Shannon Deminick
    100

    Hi,

    Unfortunately, to fix this would mean creating another cloud service for the back-office, and forcing it to only have one instance.

    Yes this is correct if you go the Cloud services route.

    We would also lose the abillity to deploy to it at any time

    You'd basically deploy to 2x places... but I'm sure you could automate this one way or another

    can anybody tell me what are the likely problems we would see and explain why? I'm keen to get an understanding of why this causes a problem.

    Yes, the problem is when you have multiple content editors who are actively doing work on 2 or more different servers - since you have no control over this, this scenario would be happening quite often if you have more than one content editor. Under normal circumstances, if your editors are normally not working on the same content item, things will probably just work. It all really depends on the order in which things get registered in the instructions table.

    • There can be cases where content editor are editing the same content item and under normal circumstances the 'last one in wins'. However, since you are load balancing this action there is no guarantee of order, there could be any sort of network latency between one content editor's server and another one to the central database. So in this case 'last one in wins' might not be correct
    • The bigger problem is when you start moving and deleting content if two content editors move content and save content at the same time, there's potential that a content item can end up without a parent and you'll get YSODs ... which will probably have a knock on affect with caches
    • Even more dramatic would be if you had multiple admins working at the same time and editing content types + compositions... the order in which instructions get into the db would be massively important and if they go in out of order there's potential for some odd caching issues to occur.

    Because we cannot guarantee the order in which a server can enter instructions into the table, we cannot guarantee stability when load balancing the back office, therefore it is not supported.

  • James McMunn 2 posts 83 karma points
    Nov 25, 2015 @ 12:23
    James McMunn
    0

    Thanks Shannon. Thanks for replying James - I'll try to give answers as best i can below.

    Generally the challenges we've seen with load balancing are in spinning up new servers (takes time) and also we're having problems getting scheduled publishing to work in anything but local dev machines.

    In the interim we have actually spun up a cloud service with just one instance to facilitate editing, though I don't think this has fixed any problems.

    • Did you set up a machine key in your web.config and, if so, did this cause issues with your existing user accounts? Have you implemented an alternative session provider (SQL? Redis?)

    Yes, we have a machine key in web.config, this has been the case from when we started using Umbraco, so I'm not aware of any issues it's caused us. We are using Redis session provider.

    • Are you still using Log4Net Files for logging, but with the Machine Name appended? How's that working out for you?

    We are using log4net, but we've connected it up to our own logging solution, so we end up gettings logs in the event log / sql. I don't know if appending the machine name to the log files is necessary when using azure, because the file system is neither replicated or shared.

    • Do you have many back-office editors?

    We are fortunate at the moment to have only one editor using this, perhaps two at the outside. Your suggestion of pinning them to one server is definitely something we've looked into, though in the first instance it seemed easier to just spin up a seperate service to cover editing.

    • How have you set up your Media directory? Is that in Azure blob storage

    It's in Azure blob storage. We use the Blob storage package from Umbraco.

    • Have you got Examine configured and working? Was that straightforward following the docs?

    I don't think we did anything special to get this working, it seems to work out of the box for us, but I will caveat this with saying that we only use it in the backoffice. My understanding is that this can have an impact on how long servers take to spin up when scaling / reimaging boxes.

    • Have you configured auto-scaling within Azure? What is the impact on the site when you add/remove instances? Any downtime incurred?

    I think we've had the auto-scaling working, but our instances are slow to start at the moment, for reasons unrelated to Umbraco. This obviously isn't ideal, we are looking into improvements we can make to this, early indications are that Azure Web Sites are going to make some improvements here but our infrastructure currently prevents us migrating to this fully.

  • James Strugnell 80 posts 188 karma points
    Dec 21, 2015 @ 17:09
    James Strugnell
    0

    Very informative, thanks James (and Shannon).

    I've just raised another question related to this one, regarding file based configurations (e.g. Umbraco Forms) when the back office is run separately to the public front-end.

    See here: https://our.umbraco.org/forum/umbraco-7/using-umbraco-7/73855-azure-load-balancing-best-practice-with-umbraco-forms

Please Sign in or register to post replies

Write your reply to:

Draft