Crates.io | redify |
lib.rs | redify |
version | 0.0.1 |
source | src |
created_at | 2023-04-25 19:06:16.136097 |
updated_at | 2023-04-25 19:06:16.136097 |
description | orm style crate |
homepage | |
repository | |
max_upload_size | |
id | 848754 |
size | 33,028 |
HMGET
and not HGETALL
My thinking is that with the redis HGETALL
all command
the upstream to downstream data rate is is more shifted
towards the downstream part the with HMGET
. Let me explain.
When sending data to a redis instance the HGETALL
command
will ruffly send the same static amount of bytes for
every type. The byte length of the response redis sends back,
actually depends on the number of fields, field names and
the length of the actual field value. So if you where to
push
and pull
x objects to and from redis your upstream
bandwidth would only be partially used with repercussion for
your downstream bandwidth. In a one to one data link, like
many server clusters have, it would be more efficient to use
both up and downstream bandwidth to leverage the available.
Using HMGET
reduces the downstream bandwidth consumption by
the number of fields and field names in bytes and there fore
increases the upstream bandwidth consumption by the same amount.
The HMGET
command seamed to be a good balance between both
up and downstream bandwidth.