You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: content/commands/auth/index.md
+6-2Lines changed: 6 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -51,7 +51,9 @@ The AUTH command authenticates the current connection in two cases:
51
51
Redis versions prior of Redis 6 were only able to understand the one argument
52
52
version of the command:
53
53
54
-
AUTH <password>
54
+
{{< clients-example cmds_cnxmgmt auth1 >}}
55
+
AUTH "temp-pass"
56
+
{{< /clients-example >}}
55
57
56
58
This form just authenticates against the password set with `requirepass`.
57
59
In this configuration Redis will deny any command executed by the just
@@ -62,7 +64,9 @@ Otherwise, an error is returned and the clients needs to try a new password.
62
64
63
65
When Redis ACLs are used, the command should be given in an extended way:
64
66
65
-
AUTH <username> <password>
67
+
{{< clients-example cmds_cnxmgmt auth2 >}}
68
+
AUTH "test-user" "strong_password"
69
+
{{< /clients-example >}}
66
70
67
71
In order to authenticate the current connection with one of the connections
68
72
defined in the ACL list (see [`ACL SETUSER`]({{< relref "/commands/acl-setuser" >}})) and the official [ACL guide]({{< relref "/operate/oss_and_stack/management/security/acl" >}}) for more information.
Copy file name to clipboardExpand all lines: content/commands/bf.reserve/index.md
+7-6Lines changed: 7 additions & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -46,12 +46,13 @@ Though the filter can scale up by creating sub-filters, it is recommended to res
46
46
sub-filters requires additional memory (each sub-filter uses an extra bits and hash function) and consume further CPU time than an equivalent filter that had
47
47
the right capacity at creation time.
48
48
49
-
The number of hash functions is `-log(error)/ln(2)^2`.
50
-
The number of bits per item is `-log(error)/ln(2)` ≈ 1.44.
49
+
The optimal number of hash functions is `ceil(-ln(error_rate) / ln(2))`.
51
50
52
-
***1%** error rate requires 7 hash functions and 10.08 bits per item.
53
-
***0.1%** error rate requires 10 hash functions and 14.4 bits per item.
54
-
***0.01%** error rate requires 14 hash functions and 20.16 bits per item.
51
+
The required number of bits per item, given the desired `error_rate` and the optimal number of hash functions, is `-ln(error_rate) / ln(2)^2`. Hence, the required number of bits in the filter is `capacity * -ln(error_rate) / ln(2)^2`.
52
+
53
+
***1%** error rate requires 7 hash functions and 9.585 bits per item.
54
+
***0.1%** error rate requires 10 hash functions and 14.378 bits per item.
55
+
***0.01%** error rate requires 14 hash functions and 19.170 bits per item.
55
56
56
57
## Required arguments
57
58
@@ -86,7 +87,7 @@ Non-scaling filters requires slightly less memory than their scaling counterpart
86
87
When `capacity` is reached, an additional sub-filter is created.
87
88
The size of the new sub-filter is the size of the last sub-filter multiplied by `expansion`, specified as a positive integer.
88
89
89
-
If the number of elements to be stored in the filter is unknown, you use an `expansion` of `2` or more to reduce the number of sub-filters.
90
+
If the number of items to be stored in the filter is unknown, you use an `expansion` of `2` or more to reduce the number of sub-filters.
90
91
Otherwise, you use an `expansion` of `1` to reduce memory consumption. The default value is `2`.
0 commit comments