7

We have different CM and CD servers

I am generating files on publish:end and publish:end:remote events. Files will be generated in the website-Root/Dictionary Folder.

What files? - We are going through each sites dictionary folder and creating JSON files with dictionary key value pairs.

I am clear on how its generating files on the Content Management server Data folder. As the publish event happened on this server. We are not really worried about performance impact on CM server.

what i am not clear is how the content delivery network is picking up this publish event (may be some how publish:end:remote event is letting the CD server know) and generating these files?

Is there going to be any performance impact on the content delivery server?

  • 1
    Not really an answer, but rather than generating static files from CMS content why don't you just use the CMS and a special layout to generate the output like all your other content. You can use the CMS component cache to make it go very fast if you need that, and it's already wired into the publish process. – Richard Hauer Dec 21 '16 at 20:11
10

When publish:end:remote event is raised, there is an entry created in the core database EventQueue table.

All the servers (including CD servers) check that table and executes all the handlers.

In terms of performance impact, it all depends on the code which generates the files.

| improve this answer | |
  • So, it does mean the same code run on CD server to generate files again. is it better to generate files only on publish:end and on publish:end:remote write code which get those files from CM server and replaces into CD server? – Dheeraj Palagiri Dec 21 '16 at 16:09
  • That would be an option. It depends whether this code is using lot of CPU. Maybe it's not worth it – Marek Musielak Dec 21 '16 at 17:21
13

The communication between the Content Delivery and Content Management box is handled through the Event Queue.

  1. Your Content Management instance triggers an event (i.e.: "publish:end:remote")
  2. This event is added to the EventQueue table in the database that is targeted by the event. for the "publish:end:remote" event is usually the "web" database unless you've specified custom publishing targets/databases
  3. Every 2 seconds, your CD instance poll the EventQueue table in the database where they retrieve content. If they find an event queued up in the EventQueue table, they attemp to handle it through the handler for the "website" site.

The interval at which you Content Delivery instance poll the EventQueue is configurable in the sitecore.config file under the /sitecore/eventQueue/processingInterval node

| improve this answer | |
  • do you know why "publish:complete:remote" is placed in the core database and the "publish:end:remote" is placed in the web database? Also, is it possible to control which database a specific event goes into? I have 2 CDs and one of them does not have access to the same core database as the CM (it's in a different region), so it never sees the event. – theyetiman Feb 26 at 11:06

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.