Stephen Brannan - 74 - Aug 9, 2014

What’s the correct way to connect to Azure redis cache (preview) using ServiceStack.Redis (note I’m using v4.0.15.0 if that matters). I’m using the syntax “,ssl=true,password=<password>” and I keep getting a connection refused. I tried it using the StackExchange.Redis library and that worked fine.

I got the connection syntax from this link…

Stephen Brannan:

Ok I got a bit further. I found I could connect using the RedisClient instead of PooledRedisClientManager, but I’m still having trouble getting it to work with ssl. Any thoughts on the ssl part?

Redis does not have an official connection string format so that link only shows StackExchange.Redis connection string format.

This answer shows an example of connecting with a remote server that includes a password:


There’s no SSL in redis-server either, that’s an Azure extension Microsoft added which isn’t supported in SS.Redis (or most other Redis clients). You should still be able to connect without SSL tho.

Stephen Brannan:

+Demis Bellot Isn’t it a security risk not using ssl with redis if the auth data is stored in the redis cache? ssl has never been my strong point.

Want to stress again: Redis doesn’t support SSL so its very rare that it’s ever accessed over SSL. In order to access the official redis-server distribution over SSL you would basically have to go through a ssh tunnel.

Redis is meant to be used internally (i.e. AppServer to redis instance, not over the Internet) so it’s normally protected by firewalls.

Stephen Brannan:

Got it, makes sense. Thanks Demis

Ivan Fioravanti:

I agree that Redis should be used internally, but on Azure it’ offered as a service from a public URL so SSL is a must :frowning: