I'm starting to think about how my application can scale if it needs
to. This is all very premature - I don't even have clear performance
goals yet, much lest perf testing in place, so it may be unnecessary.
However, one quality my data has is that it's isolated into groups of
records that never reference anything outside of that group. This
leads me to think I can have a small group of tables in a main DB to
store user info, and the rest of my tables each have an instance in
Auxilliary #1: Table1, Table2, Table3, ...
Auxilliary #2: Table1, Table2, Table3, ...
The nice thing about this design is that it would scale very nicely.
If things are slowing down, I can easily bring up another server and
balance the data. Users, would of course track which DB instance the
user connects to when using the app. The users table is referenced
frequently, but rarely updated, so if that becomes a bottleneck I can
probably have a second instance with some reasonable data replication
between the two.
Is there any built-in way to handle this in rails (or a popular plugin
that can do this)? My very initial investigation seems to indicate a
specific table can be stored on another DB, but that ALL of the rows
are stored on that DB. I can't split this up across multiple servers.
As I said, this is premature, so it's more of a curiosity than a
critical problem I need to solve. Just curious if anyone has done
anything along these lines alread.