Kubernetes Redis cluster with 3 master and 3 slave.
Native Redis cluster is deployed on 3 servers. Each server hold one master and one slave.
The conclusion is the kubernetes cluster is around 30% slower than native cluster.
This is understandable since are a lot layers in kubernetes (container, kube dns...), but the benefit is kubernetes can handle the crash for us. It depends on your business logic and see choosing which one.
# ./redis-benchmark -h 10.111.79.75
-p 6379
-n 250000
-
Test Case | Kubernetes Redis Cluster (requests/s) | Native Redis-Cluster (requests/s) |
---|---|---|
PING_INLINE | 34886.96 | 44389.20 |
PING_BULK | 37335.72 | 49309.66 |
SET | 34373.71 | 47801.15 |
GET | 37174.72 | 47258.98 |
INCR | 36148.06 | 46772.69 |
LPUSH | 36374.22 | 45821.12 |
RPUSH | 34760.85 | 50854.36 |
LPOP | 36437.84 | 49504.95 |
RPOP | 35350.68 | 50484.65 |
SADD | 37832.93 | 50617.53 |
HSET | 36411.30 | 50771.73 |
SPOP | 36748.49 | 48694.98 |
LPUSH (needed to benchmark LRANGE) | 37358.04 | 51020.41 |
LRANGE_100 (first 100 elements) | 36851.41 | 49144.88 |
LRANGE_300 (first 300 elements) | 31277.37 | 45737.29 |
LRANGE_500 (first 450 elements) | 23182.49 | 49603.18 |
LRANGE_600 (first 600 elements) | 23992.32 | 50566.34 |
MSET (10 keys) | 35582.12 | 50885.41 |