Best approach to fetch data from broker database or from filesystem?

Leilani: 2 weeks ago

I need to fetch Component data in a User Control from the Presentation Server, and I have 2 ways:

  1. First published the Component to Broker and then use the Broker API to fetch the content in the User Control.
  2. Publish the Component to the file system of the Content Delivery server in the form of an XML file and then fetch the content from that published XML.

I know that if I go for the Broker option, then there would be a server hit to DB, but also Broker provides caching. Whereas if I use the file system then there is no DB hit.

So here I am looking for a precise answer from some expert as I already used and familiar from both ways to fetch data.

Eva: 2 weeks ago

It absolutely depends on what you are trying to achieve. If your components are going to be in millions, then it makes sense that you use the Broker Database and use Broker API (for Tridion 2009 and below) or Content Delivery Web Service (for Tridion 2011 and above). The reason is that it may become a problem if millions of files in the size of several Giga Bytes is available on the File System in terms of maintenance and backup of the same. Further scaling out will also be cumbersome specially if you are planning to use the DFS tool.

Further, regarding performance, Although Tridion Cache Channel Service is fantastic in providing a great performance yet it will not assure you that there will be no DB hits. However, it would be great to have it.

For the cases where you only have small number of components to publish - something like Navigation Components for Primary and secondary navigation, then it will make sense to publish them to File System instead of Broker DB