Coldfusion ORM and load balancing

43 views
Skip to first unread message

Tim Bryant

unread,
Apr 2, 2016, 5:07:32 PM4/2/16
to cf-orm-dev
We have 3 MS SQL servers set up in a Master - Slave - Slave relationship synced with replication, where the Master handles all of the writes and the slaves handle all of the reads. Before we implemented Coldfusion ORM (hibernate), we used 3 separate datasources, one for the master and the other two for the slaves.

After implementing CF ORM, we have seen an increased load on the master, and we believe that is because we set up hibernate to use the master datasource. From what we understand, CF ORM can handle multiple datasources as of 9.0.1, but all related cfc objects must use the same datasource. We also needed the ability to write so we only had one choice.

Is there a way we can tell CF ORM to use all 3 datasources/servers while sending all read only requests (e.g. getUsers(), getOrders()) to the slave servers and anything with a potential write (e.g. getUser(100).updateName('John'), createOrder()) to the master server?
Reply all
Reply to author
Forward
0 new messages