Shared insights

Postmates built a tool called Bazaar that helps onboard new partners and handles several routine tasks, like nightly emails to merchants alerting them about items that are out of stock.

Since they ran Bazaar across multiple instances, the team needed to avoid sending multiple emails to their partners by obtaining lock across multiple hosts. To solve their challenge, they created and open sourced ConsulMutEx, and an Elixir module for acquiring and releasing locks with Consul and other backends.

It works with Consul’s KV store, as well as other backends, including ets, Erlang’s in-memory database.

A Consul Locking Library in Elixir – Postmates (
2 upvotes·74.4K views
Avatar of StackShare Editors