Liferay allows us to configure two different data sources: first for writing and second for reading. This configuration, in an easy way, allows users to split writing and reading requests. This type of configuration lets us build scalable and high-performance infrastructure.
As we mentioned at the beginning, we are focusing on Liferay configuration aspects. Our assumption is that you are ready to use database servers with master/slave replication. The MySql official documentation at https://dev.mysql.com/doc/refman/5.1/en/replication-configuration.html describes how to configure replication.
In order to achieve our goal, open portal-ext.properties
and configure the following settings:
jdbc.write.driverClassName=com.mysql.jdbc.Driver jdbc.write.url=jdbc:mysql://<DB_WRITE_ADDRESS>/lportal?useUnicode=true&characterEncoding=UTF-8&useFastDateParsing=false jdbc.write.username=<USERNAME> jdbc...