microsoftarchive / redis

Redis is an in-memory database that persists on disk. The data model is key-value, but many different kind of values are supported: Strings, Lists, Sets, Sorted Sets, Hashes
http://redis.io
Other
20.78k stars 5.37k forks source link

AUTH immediately after creating a connection #559

Open deepakverma opened 6 years ago

deepakverma commented 6 years ago

While using redis-benchmark with more that one client for eg. -c 500, it would first create 500 connections and then authenticate them by sending AUTH command over the wire.

This creates an issue while trying to benchmark Redis endpoints (like Azure Redis) that implements DDOS attack prevention by dropping connections in an event of high number of unauthenticated clients.

With this pull request I am proposing to send AUTH command immediately after a connection has been created by redis-benchmark to improve this scenario.