Skip to content

Latest commit

 

History

History
9 lines (5 loc) · 639 Bytes

readme.md

File metadata and controls

9 lines (5 loc) · 639 Bytes

Are Redis Connections Really Lightweight?

This benchmark test compare the latency numbers of two approaches:

1- EPHEMERAL CONNECTIONS: We do not reuse the connection. Instead we create a new connection for each command and close the connection immediately. We record the latency of client creation, ping() and client.quit() together. See the bench() method in the code.

2- REUSE CONNECTIONS: We create a connection once and reuse the same connection for all commands. Here, we record the latency of ping() operation. See the benchReuse() method.

See the blog post.