I am in a load balanced environment (amazon) where the back-office (admin section) needs to be on each server. I have found no instructions (outside http://our.umbraco.org/documentation/Installation/load-balancing which just says "If you require that the back office is load balanced you may have to do additional custom development to ensure this works seamlessly." - so no help) to help me set up my servers when the back office is not on a single designated server.
The problem: publish content on one server, not showing up on other servers frontend. Trying to via umbraco code, rebuild the local cache on the secondary servers from script/code residing on the secondary servers that loads the cache from the central database.
Here is my event hook code: https://gist.github.com/rhjelmeir/8341713 which does not work (the event is fired, but not rebuilding cache, items still do not show up on the frontend). I do not have the proper understanding of umbraco or load balancing to be much help to myself. Most of the documents (I can find) dealing with caching are not updated for v6.
If you know of anyway to truly refresh all local cache from the database please let me know. Or why the refreshing of cache will not work in a load balanced environment. I need layman's terms :-)
"XML the distributed server names are the custom DNS names created for each IIS host name for each server."
Have you gotten the distributed config to work with dynamic load balancing? Amazon assigns a random dns for each server and it changes everytime we do a deploy.
But anyways, we created a (ridiculous) hackish workaround for our caching which entails adding an on application start hook within Umbraco that adds our new hook into the publish event. This hook saves the doc id to a database table (call it published), with the current server id. We have a second table (propagate). We set up a cron script that runs every 5 mins (on each server), that checks this published table for new doc ids and compares to the propagated table. If this document hasn't been propagated to the other servers (the current server), we run a function on the current server that updates the cache for that doc id, then it gets added to the propagate table with current server id.
It's a long complicated process, but it works for now. If anyone wants, I can post code and a better detailed process.
You may want to have a look at this package which has just been released. It implements a similar service to Distributed Calling. It's one (and only) provider works with Amazon ELB environments and 1 to N instances.
Load Balanced Back Office Caching Issue in 6.1.6
I am in a load balanced environment (amazon) where the back-office (admin section) needs to be on each server. I have found no instructions (outside http://our.umbraco.org/documentation/Installation/load-balancing which just says "If you require that the back office is load balanced you may have to do additional custom development to ensure this works seamlessly." - so no help) to help me set up my servers when the back office is not on a single designated server.
The problem: publish content on one server, not showing up on other servers frontend. Trying to via umbraco code, rebuild the local cache on the secondary servers from script/code residing on the secondary servers that loads the cache from the central database.
I am attempting to deal with the caching issue. I have an event hook for AfterPublish that I *want* to rebuild all local server cache. None of the suggestions in http://our.umbraco.org/wiki/reference/api-cheatsheet/publishing-and-republishing solve my problem.
Here is my event hook code: https://gist.github.com/rhjelmeir/8341713 which does not work (the event is fired, but not rebuilding cache, items still do not show up on the frontend). I do not have the proper understanding of umbraco or load balancing to be much help to myself. Most of the documents (I can find) dealing with caching are not updated for v6.
If you know of anyway to truly refresh all local cache from the database please let me know. Or why the refreshing of cache will not work in a load balanced environment. I need layman's terms :-)
Or if v7 does any better with caching?
Thanks, Robin
Have you had a look at the distributed call config??:
See Umbraco Configuration below the ASP.NET Configuration Section (sorry no internal links to send you there).
http://our.umbraco.org/documentation/Installation/load-balancing
Probably too late by now but good luck.
Thanks Chris for your response. Per the docs
"XML the distributed server names are the custom DNS names created for each IIS host name for each server."
Have you gotten the distributed config to work with dynamic load balancing? Amazon assigns a random dns for each server and it changes everytime we do a deploy.
But anyways, we created a (ridiculous) hackish workaround for our caching which entails adding an on application start hook within Umbraco that adds our new hook into the publish event. This hook saves the doc id to a database table (call it published), with the current server id. We have a second table (propagate). We set up a cron script that runs every 5 mins (on each server), that checks this published table for new doc ids and compares to the propagated table. If this document hasn't been propagated to the other servers (the current server), we run a function on the current server that updates the cache for that doc id, then it gets added to the propagate table with current server id.
It's a long complicated process, but it works for now. If anyone wants, I can post code and a better detailed process.
Interesting! We have physical servers right now - I haven't played with AWS. Definitely something to keep in mind should we ever look at it.
Sorry I'm no help there then :(
You may want to have a look at this package which has just been released. It implements a similar service to Distributed Calling. It's one (and only) provider works with Amazon ELB environments and 1 to N instances.
Dan, thanks for the info. I will check out the package
Hey Dan,
Is there a place I can ask questions regarding your package? Like what you call to refresh the cache on each server?
I've added a forum to the package's page if you've got any questions or suggestions.
is working on a reply...