itsLiran on Nostr: The only "downside" with clustering is that any methods that operate on multiple keys ...
The only "downside" with clustering is that any methods that operate on multiple keys MUST be on the same cluster node.
This is where you take advantage of the key-hashing. So if you know you're setting a bunch of data for a single user at a time, you can make sure the keys for that user's data are hashed to the same slot.
Published at
2023-03-09 14:10:50Event JSON
{
"id": "12b2bf8718c02101ad6d8fdc76afe80d73c2ad1633de2adddc902ea80505a11e",
"pubkey": "a9e5bff17ded4a4a3bf4de3ff7be295ca85678ac4f9dc647a1c3829f52e65299",
"created_at": 1678371050,
"kind": 1,
"tags": [
[
"e",
"cc3b5bb93e7f1bc1515629efa16d0bf18b838656039d91b7929e0299b5328447",
"",
"root"
],
[
"e",
"b567c51f8f77d1cd387e63a944fee7b81a8692a6533af8f06e0a8424e1fd635c",
"",
"reply"
],
[
"p",
"3bf0c63fcb93463407af97a5e5ee64fa883d107ef9e558472c4eb9aaaefa459d"
]
],
"content": "The only \"downside\" with clustering is that any methods that operate on multiple keys MUST be on the same cluster node.\n\nThis is where you take advantage of the key-hashing. So if you know you're setting a bunch of data for a single user at a time, you can make sure the keys for that user's data are hashed to the same slot.",
"sig": "5abfb621589b896194dd2b85bfb4d909e13cf61d17ba66e435a569b699b6282fb7bef62e1e3ed4b2543e08260d05fda3620d6d2cfdee3c4c09593146b34111dd"
}