Two batch servers, we would like to control load balancing based on a metadata field.

We do post processing on the publication output and have post publish processes setup. The requires us to know which batch server the publish was performed ( server 1 or server 2). We would like to specify the batch server a publication request goes to based on a metadata field value on the publication object, lets call it batch server with values 1 and 2. Is this possible?

TIA

emoji
Parents
  • Upon further investigation, we noticed "Event Type" in a event and in Background Task XML Settings, allows us to specify which service role can pick up the "publish" item. The service role is specified on the Background Task service running the batch server. So the question now becomes how can be manipulate "Event Type" of an event when we perform a publish of a publication. 

    emoji
  • Hi Akheil,

    I don't know if in today's world it is a good idea to distinguish between server1 or server2. That introduces a dependency that does not scale well, or which is a hotspot to not easily recover from when one of them fails. Furthermore it complicates your setup, it complicates any future upgrade. For that you need to share more why you are asking for this solution.

    Still, it is possible. I would advise to check the various out-of-the-box PUBLISH events and how they are triggered in 

    • \Websites\Author\EnterViaUI\Admin.XMLWriteObjPluginConfig.xml
    • Websites\Author\EnterViaUI\Admin.XMLBackgroundTaskConfiguration.xml

    So how the message arrives on the queue is often decided by an IWrite plugin that passes an EventType. In turn BackgroundTask handles the EventTypes as assigned to its Service Role. That Service Role is specified in the commandline of the registered service.

    <plugin name="ISHRAISEPUBLISHEVENT" handler="RaisePublishEvent" ishcondition="ISHLevel='lng' and CurrentAction='SetMetadata'">
      <description>Starts a background task when the 'FISHPUBSTATUS' field is changed to 'Pending'</description>
      <workingset>
    	<ishfields>
    	  <ishfield name="FISHPUBSTATUS" level="lng"/>
    	  <ishfield name="FISHEVENTID" level="lng"/>
    	</ishfields>
      </workingset>
      <initialize>
    	<parameters>
    	  <parameter name="EventTypeConfiguration">
    		<configuration>
    		  <eventtype ishcondition="ISHOutputFormat.FDITAOTTRANSTYPE='ishditadelivery'">PUBLISHDITADELIVERY</eventtype>
    		  <eventtype>PUBLISH</eventtype>
    		</configuration>
    	  </parameter>
    	</parameters>
      </initialize>
    </plugin>
    

    Best wishes,
    Dave

    emoji
  • Hi David, 

    We have three batch servers and perform post processing when a publication is released in Organize Space or Pub Manager. This custom release process, looks for the publication data/cache created when the publication was initially published and performs updates to the files which are then consumed by a downstream system we built internally. Having this post process creates a dependency that the cache/publication data needs to be synced between all batch severs, because if the publish was picked up by batch 1 and the release post process gets picked up by batch 2, it won't find the publication data folder and the process will fail. We discussed syncing the cache between batch servers, but that introduces latency and wait times for users to run the publish and post processes. Due to these reasons we are thinking of dividing the load between servers based on a metadata field, and this will ensure the publish and the post publish task will be picked up by the same batch server.

    emoji
Reply
  • Hi David, 

    We have three batch servers and perform post processing when a publication is released in Organize Space or Pub Manager. This custom release process, looks for the publication data/cache created when the publication was initially published and performs updates to the files which are then consumed by a downstream system we built internally. Having this post process creates a dependency that the cache/publication data needs to be synced between all batch severs, because if the publish was picked up by batch 1 and the release post process gets picked up by batch 2, it won't find the publication data folder and the process will fail. We discussed syncing the cache between batch servers, but that introduces latency and wait times for users to run the publish and post processes. Due to these reasons we are thinking of dividing the load between servers based on a metadata field, and this will ensure the publish and the post publish task will be picked up by the same batch server.

    emoji
Children