-
Notifications
You must be signed in to change notification settings - Fork 0
Redis
David Liu edited this page Mar 20, 2024
·
6 revisions
- Share nothing
- Multi process
Redis Functions is an API for managing code to be executed on the server. (Stored Procedure)
Also, they are intended to better support the use case of maintaining a consistent view for data entities through a logical schema
- supersedes the use of EVAL in prior versions of Redis.
- available in Redis 7
- The core use case is executing part of your application logic inside Redis, efficiently and atomically.
- Every function belongs to a single library. The library's contents are immutable, and selective updates of its functions aren't allowed. Instead, libraries are updated as a whole with all of their functions together in one operation.
- A function's execution blocks all server activities during its entire time, similarly to the semantics of transactions. so you should avoid using long-running functions.
- 在单台机器上运行集群,只是为了能够使用超过1个core。
- Using EVAL requires that the application sends the entire script for execution every time
- The underlying assumption is that scripts are a part of the application and not maintained by the Redis server.