Based on information here http://www.asp.net/signalr/overview/performance/scaleout-with-redis , I've stood up an Azure Redis Cache . I've been scaling out SignalR over Azure ServiceBus up until this point, but frankly it drops a lot of messages and I'd like to investigate the other options. I'm trying to just do a little bit of a discovery run with my new Azure Redis Cache instance, but my app will no longer run with the single line configuration change.
EDIT - I should add that I'm using the SignalR 2.2.0 libraries.
Old Code:
var sbConnString = CloudConfigurationManager.GetSetting("Microsoft.ServiceBus.ConnectionString");
GlobalHost.DependencyResolver.UseServiceBus(sbConnString, ApplicationGlobals.APPLICATION_NAME);
New Code:
var redisConnString = "MYAPP.redis.cache.windows.net,ssl=true,password=PRIMARY_ACCESS_KEY";
GlobalHost.DependencyResolver.UseRedis(new RedisScaleoutConfiguration(redisConnString, "MYAPP"));
New Code Variant 2:
GlobalHost.DependencyResolver.UseRedis("MYAPP.redis.cache.windows.net", 6380, "PRIMARY_ACCESS_KEY", "MYAPP"));
I've tried all permutations of SSL/Non-SSL, connection string constructor vs parameter contructor etc., but I've yet to run the WebApp successfully with the Redis scaleout configuration. What am I doing wrong?
I regenerated the Access Keys and everything started working. It was helpful to create a little console app based on StackExchange.Redis to test the connection outside of signalR.
I found this ScottGu's post about RedisCache helpful.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.