Skip to content

SYSTEM Cited by 1 source

folly::ConcurrentHashMap

folly::ConcurrentHashMap is the concurrent hash-map primitive in folly, Meta's open-source C++ library of general-purpose building blocks. Source: folly/concurrency/ConcurrentHashMap.h.

Cited in the 2024-12-02 cryptographic monitoring post as the internal data structure the FBCrypto aggregating buffered logger uses, selected because it is "built to be performant under heavy writes in multithreaded environments, while still guaranteeing atomic accesses."

Role for this wiki

  • Write-heavy multithreaded map primitive. The canonical Meta choice when many threads need to update counters concurrently without coarse-grained locking.
  • Enables client-side aggregation of very high-rate events. FBCrypto's per-event counter increment happens on every cryptographic operation in every calling thread — "machines often compute millions of cryptographic operations per day" — so the map's write performance is load-bearing for the whole aggregating-buffered-logger architecture.

Seen in

  • systems/fbcrypto — the consumer.
  • systems/folly-singleton — folly's singleton primitive used for the FBCrypto buffered-logger global.
  • aggregating-buffered-logger — the pattern whose write-performance requirement this map primitive satisfies.
Last updated · 766 distilled / 2,225 read