Aerospike - shop * small * large numbers

Scenario
Let's say I save up to 5 byte arrays, each 50 kB, for each user.

Possible implementations:

1) One byte array per record indexed by a secondary key.
Pros: Fast read / write.
Cons: high power request (up to 5 results per request). Bad for horizontal scaling if byte arrays are often used.

2) All byte arrays in a separate record in separate cells
Pros: Quickly read
Neutral: Lock should be more than 250 KB
Cons: Slow writing (one change means overwriting all byte arrays).

3) Store byte arrays in LLIST LDT
Pros: Avoid solution flaws (1) and (2)
Cons: LDTs ​​are usually slow

4) Store each byte array in a separate UUID-bound entry. Save the list of UUIDs in another entry.
Pros: writing to each byte array does not require overwriting all arrays. There are no secondary issues with secondary indexes. Avoid using LDT.
Cons: reading a client in two steps: getting a list of UUIDs from a meta record, and then multi-get for each UUID (really slow?)

5) , (, userid_index, 123_0, 123_1, 123_2, 123_3, 123_4) : : (, user1_index1 user2_index2 ). , (, ) , - (, - - ).


/ / # 2 ( , ). , ( LDT, ).

() / # 3 (LDT). -, , - , .


, ( , )? ()?

+4
1

. ( , Aerospike).

# 3. LDT, , , / (), / .

Key/Value. . , β„– 1 . ( ).

# 2 , 1 bin...

, # 4 # 5. β„– 5 . , . , :) ( , ). , , , " " , ( ). β„–4 , ( ).

, . , , , .

+4
source

Source: https://habr.com/ru/post/1615110/


All Articles