This topic is locked

Read Replicas DB and PHP Runner

6/27/2022 7:59:10 PM
PHPRunner General questions
R
Robert author

Good After-noon,

Does anyone know if it's possible to integrate applications developed using PHPRunner with Read Replica DBs?

I would like to find a way to redirect heavy searches on the application to a read replica DB that is synchronized with my production DBs as to avoid locks and such.

Please let me know.

Thanks

admin 6/28/2022

I think there are a few possible ways to implement this kind of functionality. The most difficult part would be telling the heavy search from the fast one, not sure how to do this.

In either case, you can add your second database as a second connection in your PHPRunner project and then in one of the events like AfterTableInit you can switch to the secondary connection using SetConnection() function.