Implementing Read-Replica (slave) database connections I'm thinking about ways to implement this but don't instinctively know the best route in Craft.

Our infrastructure is in AWS and, due to other applications, we have access to a read-replica DB instance alongside the master instance. I'm wondering about how to write an extension/plugin that would direct all SELECT requests to either the master OR the slave, and all INSERT / UPDATE / DELETE requests to the master only.

What are some possible paths for incorporating this?
Craft 3

You can see an example of how to do read/write splitting in Craft 3 here: https://docs.craftcms.com/v3/config/app.html#database-component

Craft 2

Definitely not current possibly natively in Craft since Yii's CDbConnection (which is what Craft uses for database connections) has no concept of master/slave connections.

In theory, something like the Yii DB splitting extension that @RitterKnight mentioned is a start in the right direction, but even then, you'd have to do some pretty significant core hacking to utilize it in Craft 2.

Should be much more feasible in Craft 3 since the ability to swap out core components like that is planned.