Choosing Between ETS and Mnesia for Erlang State Management
A technical guide on choosing between ETS and Mnesia for Erlang state management, comparing performance, durability, and distribution with a hybrid implementation example.
ReadMeFeed / Community knowledge
Real questions. Useful conversations. Find the people who know your stack.
A technical guide on choosing between ETS and Mnesia for Erlang state management, comparing performance, durability, and distribution with a hybrid implementation example.
Diagnosing Mnesia sync failure when log location and rotation vary by deployment A RabbitMQ node refuses to boot, emitting repeated Waiting for Mnesia tables messages followed by a timeout. The first ERROR line after Starting RabbitMQ typically identifies the failing subsystem, but the log file path, rotation policy, and retention defaults differ across pack
Mnesia transaction retry duplicates writes on deadlock or timeout Goal: confirm whether Mnesia re-executes write operations when a transaction restarts after a deadlock or timeout, and whether any built-in API prevents duplicate writes across those retries. Mnesia automatically restarts a transaction on contention, but documentation indicates that side effec
An Erlang service using Mnesia must schedule a backup with minimal node downtime. The team needs to decide whether to take an offline snapshot using mnesia:backup/2 with the force option or an online snapshot using mnesia:backup/2 with safe_fallback , then restore it with mnesia:restore/2 and confirm the recovered tables match the pre-backup state. Assuming
Context When restoring a Mnesia backup with :mnesia.restore/2 , the :default_op option controls how tables not explicitly named in the restore specification are handled. Documented values include :clear_tables , :keep_tables , and :skip_tables , but the exact semantics—especially whether :skip_tables preserves existing data or leaves the table absent—vary in