Considerations for whether 30/80 byte keys makes a difference:
1. whether your data size would push the packet beyond the ethernet
frame size and/or MTU
2. whether the key being larger than a 64 byte cache line makes a
difference in hashing
3. whether the key being larger than a 64 byte cache line makes a
difference in comparison of keys after hashing
4. other IO, interrupts, or network weather at the time
My gut says that network weather and interrupt handling delays would
tend to dominate individual set/get performance more than anything
else in a simple "web request comes in, send the client the response
from a small number of Redis GET calls", though streaming a large
volume of requests via pipeline may offer a slight performance
advantage to the short keys for otherwise unloaded networks.
Regards,
- Josiah
> --
> You received this message because you are subscribed to the Google Groups "Redis DB" group.
> To post to this group, send email to redi...@googlegroups.com.
> To unsubscribe from this group, send email to redis-db+u...@googlegroups.com.
> For more options, visit this group at http://groups.google.com/group/redis-db?hl=en.
>
>
> The cool thing during my tests was that the overall speed was
> basically dictated by the number of packets being transmitted, all of
> the other factors (hash-table computations, memory lookups, etc...
> played no significant role). Again these tests were only for SET/GET
> so there is not a lot of computation going on.
Could you see any differences in timing by length
of partial matches? I'm just wondering about timing
attacks (so never using session cookies as keys just
to be on the safe side).
--
Don Marti
http://zgp.org/~dmarti/
dma...@zgp.org
But re-read the earlier posts where we discuss what would make the
most difference. Hint: it's not really key size.
- Josiah
What I'm doing, and this may be overkill, is taking
HMAC(secret key, user-visible session cookie) and
using that as the Redis key. That way -- I think,
please correct me if I'm wrong -- it should make it
harder to do a timing attack on session cookies,
even if Redis takes longer to return a "no match"
on a near match, and someone who is trying to guess
session cookies has a copy of Redis to play with.
- Josiah