mneisa table fragmentation vs manually splitting
vim
ofer.affias@REDACTED
Sun Sep 27 08:40:48 CEST 2009
hi,
i am working on a erlang based distributed architecture, at the end i
intend to use it on EC2. my application included a database, and since
i want to spread the load on the database, i thought of splitting the
table.
the question is should i choose mnesia built-in feature 'fragmented
table' over manually splitting the database into clusters?
i.e. suppose i have a simple key-value sets which i need to store in
my database. and suppose i have 1000 keys, and i did some measurements
and i want only 10 keys on each machine (for better performance) so i
need 100 machines. thus, if i understand correctly the
documentation, i have at least two options:
1. manual split:
i can set up clusters of 10 machines each. on each machine i will have
a node with a running mnesia, and on a such cluster all the mnesia
nodes will be connected. furthermore, i can use master-slave
duplicated database scheme, if my application will know how to use a
specific node to write to a specific key. i assume here that *all* the
nodes in my world (100) are erlang connected, and on each 10 machine
cluster there is a connected (shared) mnesia database.
2. table fragmentation:
i can connect all my 100 machines with single mnesia schema, and
fragment the table into 10 pieces, where each cluster of 10 machines
will share each piece. again, i can use the same master-slave scheme i
described above to access my database.
am i correct with those assumptions?
should i prefer one method over the other?
thanks for your help,
vim.
More information about the erlang-questions
mailing list