apache / apache/trafficserver

Non-cryptographic hash for cache key

Open
#8,756 1 comment 0 reactions 0 assignees View on GitHub
New Feature Stale
Dominant language
C++
Stars
2k
Forks
874
Avg merge
6d 15h
Merged PRs (30d)
46

Description

We found that OpenSSL's md5 is expensive (#8719). Replacing the library is an approach, but I start wondering we really need a cryptographic hash here.

#8755 is a PoC of using non-cryptographic hash for URL hash. If we look at collision ratio and benchmarks, the xxhash looks good for this use case.

- https://github.com/Cyan4973/xxHash/wiki/Collision-ratio-comparison
- https://github.com/Cyan4973/xxHash/wiki/Performance-comparison

A concern is when we change the hash algorithm, the cache needs to be cleared once.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.