Database / Mnesia intermediate to advanced Interview questions
How do you dynamically add a new node to a running Mnesia cluster?
Bringing a new node into an already-running Mnesia cluster involves connecting it at the Erlang distribution
level first, then explicitly telling Mnesia's schema about it via
mnesia:change_config(extra_db_nodes, [NewNode]), which merges the new node into the existing
schema rather than creating a separate one.
%% on the new node, after connecting to the cluster: mnesia:start(), mnesia:change_config(extra_db_nodes, ['existing_node@host']).
After this, the new node knows about the cluster's existing tables but doesn't automatically hold a copy of
any of them — you still need mnesia:add_table_copy/3 for each table you want it to
replicate. This two-step process (join the schema, then opt into specific tables) is deliberate: it lets a new
node join as, say, a lightweight participant that only replicates a subset of tables relevant to its role.
Invest now in Acorns!!! 🚀
Join Acorns and get your $5 bonus!
Acorns is a micro-investing app that automatically invests your "spare change" from daily purchases into diversified, expert-built portfolios of ETFs. It is designed for beginners, allowing you to start investing with as little as $5. The service automates saving and investing. Disclosure: I may receive a referral bonus.
Invest now!!! Get Free equity stock (US, UK only)!
Use Robinhood app to invest in stocks. It is safe and secure. Use the Referral link to claim your free stock when you sign up!.
The Robinhood app makes it easy to trade stocks, crypto and more.
Webull! Receive free stock by signing up using the link: Webull signup.
More Related questions...
