Redsync Example

Tried Redsync example.

Dependencies

Desctiption

figure1

Same service is running on Server A and Server B

Service operates as follows:

  1. Listen request from client
  2. Get lock by redsync library
  3. Release lock by redsync library
  4. Return response to client

The same key is used for locking regardless of Server

Reference

Redis Docs

English

Japanese

Others

Distributed Locks using Golang and Redis