Decentralized ETS Counters for Better Scalability
A shared Erlang Term Storage
(ETS) table is often an
excellent place to store data that is updated and read from
multiple Erlang processes frequently. ETS provides key-value stores to
Erlang processes. When the
write_concurrency option
is activated, ETS tables use fine-grained locking
internally. Therefore, a scenario where multiple processes insert and
remove different items in an ETS table should scale well with the
number of utilized cores. However, in practice the scalability
for such scenarios is not yet perfect. This blog post will explore
how the decentralized_counters
option brings us one step closer to
perfect scalability.