Copied to clipboard

Flag this post as spam?

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


  • Robin Hjelmeir 24 posts 85 karma points
    Mar 17, 2014 @ 18:21
    Robin Hjelmeir
    0

    Refreshing cache per each server

    What functions/method do you use to refresh each servers cache? I am not trying to steal code or anything, I have just run into only one method working for actually refreshing the cache properly from the database not from the xml nodes.

    Thanks again for writing this package (haven't tested it out yet, seeing if we can configure our servers the way in your note)

  • Dan Lister 416 posts 1974 karma points c-trib
    Mar 17, 2014 @ 18:55
    Dan Lister
    100

    Hi Robin.

    The ECB package hooks into the Content and Media publish events (along with some others) so you shouldn't have to manually call a cache refresh request for each server. The idea behind the package is that when a page is published, the service uses the current provider to get a list of server addresses. From there, it sends a cache refresh request to each.

    In your case, the current provider would be the Amazon Distributed Calling Provider which retrieves a list of EC2 instance addresses in the current ELB environment. Although you could always write your own provider by implementing the IExtendedDistributedCallingProvider interface and changing your web.config accordingly.

    Hopefully that answers your questions,
    Dan. 

  • Matt 76 posts 280 karma points
    Mar 18, 2014 @ 17:46
    Matt
    0

    I assume this will not work in an "Azure Websites" environment as there is no way to query the Load Balancer (which uses ARR) to see what instances are currently live?  Additionally "Azure Websites" does not expose a direct http path to the individual instances, even if you did manage to get them so that would be a second roadblock.

    I assume the above is not true for Amazon's implementation of Load Balancing and that is why this package works?

    Regards,
    Matt 

  • Dan Lister 416 posts 1974 karma points c-trib
    Mar 18, 2014 @ 17:50
    Dan Lister
    0

    Yeah that's correct Matt. I've not written an Azure provider for the package nor do I know if its possible. Its something I will be looking into later on. I'm pretty certain it will be possible with Azure Cloud Services though. You are correct. The Amazon provider works when used by the package as Amazon's implementation is a lot more accessible.

  • Matt 76 posts 280 karma points
    Mar 18, 2014 @ 17:57
    Matt
    0

    Thanks Dan.  Figured as much.  I'm pretty deep into researching ways to do it (hack) using Azure Websites if you need some advice or have questions.  I currently have a couple of email threads going with folks on the Azure team trying to work out a solution.  Thus far we are firmly in the "hack" camp as ARR simply does not allow direct access to "it's" boxes.

    I'm not too familiar with Amazon, but I assume your setup is similar to using VM's on Azure?, so it is more of an IaaS approach rather than a PaaS approach?  Could you maybe share overall pricing for a simple "Small" setup (3.5GB RAM, etc).  Might be helpful for those comparing Amazon to Azure.  Familiarity with Azure aside, I personally like the PaaS approach as I dont have to worry about server updates, etc and all the "cool built in bits" that "Azure Websites" brings with it (git deployment, backup, etc).

    Regards,
    Matt 

  • Nathan Bingham 5 posts 35 karma points
    Mar 20, 2014 @ 18:56
    Nathan Bingham
    0

    I don't mean to highjack the intent of this thread, but I'm trying to solve the same problem with Azure Websites and Umbraco 6.1.6. The only promising approach I've found so far is the idea of a single Website that acts as the backoffice and n front-end Websites that watch a shared queue for when to refresh. It's talked about in this video if you haven't already seen it - https://www.youtube.com/watch?v=U7dVUHtpd_k - Azure Websites part starts around 27:25.

    If there's anywhere I can lend my voice to Azure providing the tools needed to solve this issue let me know. If that's even a possibility. I'm a big fan of Azure Websites, but not being able to easily refresh the cache in Umbraco is becoming a deal-breaker for using it.

    Thanks,
    Nate

  • Matt 76 posts 280 karma points
    Mar 20, 2014 @ 19:28
    Matt
    0

    Hey Nate

    I managed to get things working with 1 site for back office and 1 for front end. Scaling works on front end as does distributed cache refresh via custom code. Package coming in next week or so as I'm at uwestfest this week.

    Regards

    Matt

  • Dan Lister 416 posts 1974 karma points c-trib
    Mar 20, 2014 @ 23:06
    Dan Lister
    0

    Hey folks. Just as a side note, you might want to have a read of the comments on this issue. Apparently, the ability to write custom distributed calling providers is built into the core but not publically available yet.

  • Matt 76 posts 280 karma points
    Mar 26, 2014 @ 05:53
    Matt
    0

    Hey Dan,

    I pushed my project (and source just now) out to:
    http://our.umbraco.org/projects/backoffice-extensions/rbcumbracoonazure

    Its very much a Proof of Concept/Experiment.

    I used some of your code - the stuff around calling cacherefresher.asmx, so thanks for that :-)  One thing I did notice is that you call RefreshAll - that results in the Examine index not being updated, so you might want to use RefreshById instead which will update the Examine index.

    Regards,
    Matt 

  • Dan Lister 416 posts 1974 karma points c-trib
    Mar 26, 2014 @ 16:03
    Dan Lister
    0

    Thanks Matt. Your new package looks pretty awesome.

    I'll have a look at the refresh request when I get change. Cheers for looking at the source and pointing it out :)

Please Sign in or register to post replies

Write your reply to:

Draft