▲ | iamcalledrob 13 hours ago | |||||||
This isn't a great test setup. It's testing RTT rather than the peak throughput of Redis. I'd suggest using Redis pipelining -- or better: using the excellent rueidis redis client which performs auto-pipelining. Wouldn't be surprising to see a 10x performance boost. | ||||||||
▲ | aaronblohowiak 11 hours ago | parent | next [-] | |||||||
Even so 35ms+ latency for Redis reads is very very high I’d want to understand what is happening there | ||||||||
▲ | dizzyVik 11 hours ago | parent | prev | next [-] | |||||||
Author here. Redis is definitely faster. I was specifically not going for absolute peak performance for either redis or postgres - that would require going down to the wire protocols. The idea was emphasize that there' a "good enough" level of performance. Once you need that sort of speed - sure, there are ways to achieve it. | ||||||||
| ||||||||
▲ | oa335 12 hours ago | parent | prev [-] | |||||||
Postgres also supports query pipelining - at it seems like the popular go Postgres client library pgx supports it: https://github.com/jackc/pgx/issues/1113#event-6964024724 |