We can't find the internet
Attempting to reconnect
Something went wrong!
Hang in there while we get back on track
Invalidate Cache in Erlang Clusters Using Postgres WAL
127
clicks
Source: youtube.com
In Chase Granberry's presentation at ElixirConf 2022, he focuses on the challenges of cache invalidation within computer systems and demonstrates a solution using Elixir alongside the write-ahead log (WAL) feature of PostgreSQL. He explains how data can be easily cached with Erlang Term Storage (ETS) and how a stateful connection can be established to subscribe to Postgres database changes. Granberry walks through the use of the WAL to precisely determine when to expire cache entries, which is particularly beneficial for distributed systems like an Erlang cluster. The talk includes an exploration into various Elixir libraries, such as Cachex for cache expiration, and delves into the implementation details of setting up cache invalidation leveraging the Postgres WAL. Granberry also touches upon the importance of creating reverse indexes to efficiently identify the corresponding entries to invalidate when updates come through the WAL, and he proposes methods to manage WAL subscriptions and replication effectively.
Related posts
© HashMerge 2024