Welcome Guest, Not a member yet? Register   Sign In
Working with multiple databases - "reader" database
#1

Hello guys, 

i am starting a new project that is expected to be under very heavy loads on the database side. 

Our infrastructure will be using a DB cluster of one main instance that will be the "writer" - it will write all data and also replicate it to other nodes on the cluster. The other nodes are however "readonly" (only the writer instance will be able to change them) but not any other user.  

The idea is to route all SELECT queries to the reader nodes (they all have the same endpoint, IE i can only configure it as a single "reader" database in CI), where all INSERTs, and UPDATEs will be send to the writer node. 

What would be the best practice to do this? 

If i have say a News model - should i instantiate two models in my controller (one for reading and one for writing)? 

Its the first time i am dealing with this kind of setup and have no idea how to structure this in CI environment

All help is much appreciated Smile
Reply


Messages In This Thread
Working with multiple databases - "reader" database - by korgoth - 04-22-2020, 02:04 PM



Theme © iAndrew 2016 - Forum software by © MyBB