achie27
achie27

Reputation: 45

Is Redis' EVAL atomic wrt a connection or the whole data store?

Suppose A and B are two services with (separate) connections to a centralised Redis. If A is running a lua script will B be able to run one at the same time?

Upvotes: 1

Views: 81

Answers (1)

Itamar Haber
Itamar Haber

Reputation: 49942

Is Redis' EVAL atomic wrt a connection or the whole data store?

EVAL is, like most of Redis' commands, atomic and blocks the server while it is executing.

If A is running a lua script will B be able to run one at the same time?

B, the process, will continue running but its connection to the Redis server will not respond during that time. After the script's execution is finished, subsequent requests will resume being served from the server to all clients.

Upvotes: 3

Related Questions