Guild state change — existing approach

Serializes concurrent access with a per-guild-id distributed lock

Guild state change — existing approach Serializes concurrent access with a per-guild-id distributed lock Client app · Architecture component Client app L7 LB / gateway · Architecture component L7 LB / gateway API servers ×N · stateless · Architecture component API servers ×N stateless Redis lock · per-guild-id · Architecture component Redis lock per-guild-id Guild state DB · Architecture component Guild state DB join · donate, etc. over HTTP ① acquire lock / ③ release ② load-modify-store

Serialize with a distributed lock

  • • ① acquire lock → ② load-modify-store → ③ release lock
  • • Several API servers can touch the same guild at once, so a per-guild-id lock is needed