AEM Asset Off Loading



Setting up Asset Offloading

Steps to be involved:-
     1. Set topology for the Master and Worker instances. Add Worker in Master & Master in Worker topology configurations.
     2. Master is configured with DAM Update Asset Offloading Workflow to run instead of DAM Update Asset.
     3. When assets are uploaded on to Master, an offloading job sends asset info to Worker i.e. from Master -> Worker.
     4. Worker executes actual DAM Update Asset Workflow on each & every asset.
     5. With Reverse replication, the package with processed assets & its renditions are replicated back to Master from Worker i.e. Master <- Worker.
Set Topology For Instances:
  • Login into OSGi on the Master instance http:// <host>:<port>/system/console/topology
  • Configure 'sling discovery service' with topology connector url also note Sling ID and here we need to configure Configure Discovery.Oak Service at
                 http:// <host>:<port>/system/console/configMgr/org.apache.sling.discovery.oak.Config
  • In Master topology update hostname and IP address of Worker topology
                              

  • Now Login into OSGi console of Worker i.e. http:// <host>:<port>/system/console/topology
  • Note instance Sling ID and here needs to configure Configure Discovery.Oak Service at
                     http:// <host>:<port>/system/console/configMgr/org.apache.sling.discovery.oak.Config

After topology configuration is done it looks like below with instances sling id.
                   
   Configure Topic Consumption
                        

   Offloading processing of DAM Assets
  1. On the Master instance go to Workflow console and access launchers tab: http://<hostname>:<port>/libs/cq/workflow/content/console.html
  2. For DAM Update Asset workflow launcher update Workflow drop down value from “DAM Update Asset” to “DAM Update Asset Offloading”.
                                             

       3. Open Workflow launcher console on the Worker, open DAM Update Assets workflow and uncheck Transient Workflow, save changes.
                            

   Use Forward replication
  1. On Worker instance, open configuration of OffloadingDefaultTransporter (http://<hostname>:<port>/system/console/configMgr/com.adobe.granite.offloading.impl.transporter.OffloadingDefaultTransporter).
  2. Change value of the property default.transport.agent-to-master.prefix from offloading_outbox to offloading.
                               
   Turning off transport packages
  1. On Master, open configuration of OffloadingDefaultTransporter at http://<hostname>:<port>/system/console/configMgr/com.adobe.granite.offloading.impl.transporter.OffloadingDefaultTransporter
  2. Disable the property Replication Package (default.transport.contentpackage).
  3. Repeat same step on Worker:
                       
   Disabling the transport of workflow model
  1. Open Master access Workflow console http://<hostname>:<port>/libs/cq/workflow/content/console.html.
  2. Open the Models tab.
  3. Open the DAM Update Asset Offloading workflow model.
  4. Open step properties & Arguments tab, deselect Add Model to Input & Add Model to Output both options like below.
                    
         Save changes done to the model.
   Optimizing the polling interval
           Workflow offloading is implemented using an external workflow on the Master, that polls for the completion of the offloaded workflow on the Worker. The default polling interval for the external workflow processes is five       seconds. Adobe recommends to increase polling interval of the Assets offloading step to at least 15 seconds to reduce the offloading overhead on the master.
  1. Open Workflow console on Master http://<hostname>:<port>/libs/cq/workflow/content/console.html.
  2. Open the Models tab and open DAM Update Asset Offloading workflow model.
  3. Open the step properties for the DAM Workflow Offloading step and open Commons tab, and adjust the value of the Period property.
  4. Save changes to model.
   Turning off automatic agent management:
       Adobe recommends to turn off automatic agent management because it does not support binary-less replication and can cause confusion when setting up a new offloading topology. Moreover, it does not automatically support the forward replication flow required by binary-less replication.
  1. Open Configuration Manager from the URL http://<hostname>:<port>/system/console/configMgr.
  2. Open the configuration for OffloadingAgentManager (http://<hostname>:<port>/system/console/configMgr/com.adobe.granite.offloading.impl.transporter.OffloadingAgentManager).
  3. Disable automatic agent management.
                  
        Repeat above step same on the Worker instance.