I moved my postgresql server to Amazon RDS, and a couple of days ago I created a slave replica to paralellize read operations.
I'm struggling to make loopback take advantage of the slave replica, but perhaps there is some advice or good practices I should learn in advance.
Currently, I created a new datasource in parallel to my master postgresql datasource. Some models that I just use for reading operations were manually pointed to the new datasource. However it's clear that's not the proper way to do it.
I feel like I'm missing something here, and it doesn't feel right to manually change the datasource of a model during runtime using operation hooks, which might eventually lead to race conditions.