azure服务_在Windows Azure上尝试Redis缓存即服务

azure服务

azure服务

First, if you have already have an MSDN subscription (through your work, whatever) make sure to link your MSDN account and an Azure Account, otherwise you're throwing money away. MSDN subscribers get between US$50 and US$150 a month in free Azure time, plus a 33% discount on VMs and 25% off Reserved Websites.

首先,如果您已经有MSDN订阅(通过您的工作,无论如何),请确保将您的MSDN帐户和Azure帐户关联起来,否则您会浪费金钱。 MSDN订户每月可获得50至150美元的免费Azure时间,外加VM33%的折扣和保留网站的25%的折扣

Next, log into the Azure Preview Portal at https://portal.azure.com.  Then, go New | Redis Cache to make a new instance. The Redis Cache is in preview today and pricing details are here. both 250 meg and 1 GB caches are free until July 1, 2014 so you've got a week to party hard for free.

接下来,通过https://portal.azure.com登录到Azure预览门户。 然后,去New | Redis缓存以创建新实例。 Redis Cache现已在预览中,价格详细信息在这里。 在2014年7月1日之前,免费提供250兆缓存和1 GB缓存,因此您有一周可以免费参加聚会。

image

Of course, if you're a Redis expert, you can (and always could) run your own VM with Redis on it. There's two "Security Hardened" Ubuntu VMs with Redis at the MS Open Tech VMDepot that you could start with.

当然,如果您是Redis专家,则可以(并且始终可以)运行带有Redis的自己的VM。 您可以从MS Open Tech VMDepot开始使用两个带有Redis的“增强安全性”的Ubuntu VM

I put one Redis Cache in Northwest US where my podcast's website is.  The new Azure Portal knows that these two resources are associated with each other because I put them in the same resource group.

我在播客网站所在的美国西北部放置了一个Redis缓存。 新的Azure门户知道这两个资源是相互关联的,因为我将它们放在了相同的资源组中。

image

There's Basic and Standard. Similar to Website's "basic vs standard" it comes down to Standard you can count on, it has an SLA and replication setup. Basic doesn't. Both have SSL, are dedicated, and include auth. I'd think of Standard as being "I'm serious about my cache" and Basic is "I'm messing around."

有基本和标准。 与网站的“基本与标准”类似,它归结为您可以指望的标准,它具有SLA和复制设置。 基本没有。 两者都具有SSL,专用协议并包含auth。 我认为Standard是“我对缓存很认真”,而Basic是“我在搞乱”。

There are multiple caching services (or Cache as a Service) on Azure.

Azure上有多个缓存服务(或“缓存即服务”)。

  • Redis Cache: Built on the open source Redis cache. This is a dedicated service, currently in Preview.

    Redis缓存:建立在开源Redis缓存的基础上。 这是一项专用服务,当前在预览中。

  • Managed Cache Service: Built on AppFabric Cache. This is a dedicated service, currently in General Availability.

    托管缓存服务:基于AppFabric缓存。 这是一项专用服务,目前处于“一般可用性”状态。

  • In-Role Cache: Built on App Fabric Cache. This is a self-hosted cache, available via the Azure SDK.

    角色内缓存:基于App Fabric缓存构建。 这是一个自托管缓存,可通过Azure SDK获得。

Having Redis available on Azure is nice since my startup MyEcho uses SignalR and SignalR can use Redis as the backplane for scaleout.

在我的启动MyEcho使用SignalR并且SignalR可以将Redis用作横向扩展的背板时,可以在Azure上使用Redis很好。

Marc Gravell (with a "C") over at StackExchange/StackOverflow has done us all a service with the StackExchange.Redis client for .NET on NuGet. Getting stuff in and out of Redis using .NET is very familiar to anyone who has used a distributed Key Value store before.

Marc Gravell (带有“ C”)位于StackExchange / StackOverflow,已通过NuGet用于.NET的StackExchange.Redis客户端为我们提供了所有服务。 以前使用过分布式键值存储的任何人都非常熟悉使用.NET来进出Redis。

  • BONUS: There's also ServiceStack.Redis from https://servicestack.net that includes both the native-feeling IRedisNativeClient and the more .NET-like IRedisClient. Service Stack also supports Redis 2.8's new SCAN operations for cursoring around large data sets.

    奖励:还有来自https://servicestack.netServiceStack.Redis ,其中包括本机感觉的IRedisNativeClient和更像.NET的IRedisClient。 Service Stack还支持Redis 2.8的新SCAN操作,用于在大型数据集上进行游标。

ConnectionMultiplexer connection = ConnectionMultiplexer.Connect("contoso5.redis.cache.windows.net,ssl=true,password=...");

IDatabase cache = connection.GetDatabase();

// Perform cache operations using the cache object...
// Simple put of integral data types into the cache
cache.StringSet("key1", "value");
cache.StringSet("key2", 25);

// Simple get of data types from the cache
string key1 = cache.StringGet("key1");
int key2 = (int)cache.StringGet("key2");

In fact, the ASP.NET team announced just last month the ASP.NET Session State Provider for Redis Preview Release that you may have missed. Also on NuGet (as a -preview) this lets you point the Session State of your existing (perhaps legacy) ASP.NET apps to Redis.

实际上,ASP.NET团队上个月刚刚宣布了您可能错过的ASP.NET会话状态提供程序(用于Redis预览版) 。 同样在NuGet(作为-preview)上,这使您可以将现有(也许是旧式)ASP.NET应用程序的会话状态指向Redis。

After pushing and pulling data out of Redis for a while, you'll notice how nice the new dashboard is. It gives you a great visual sense of what's going on with your cache. You see CPU and Memory Usage, but more importantly Cache Hits and Misses, Gets and Sets, as well as any extraordinary events you need to know about. As a managed service, though, there's no need to sweat the VM (or whatever) that your cache is running on. It's handled.

在将数据从Redis推送和拉出一段时间后,您会注意到新的仪表板非常好。 它使您对缓存的运行情况有了很好的视觉感受。 您会看到CPU和内存使用情况,但更重要的是,缓存命中和未命中,获取和设置以及您需要了解的任何异常事件。 但是,作为一项托管服务,无需耗费正在运行缓存的VM(或其他任何资源)。 处理了。

image

From the Azure Redis site:

Azure Redis网站

Perhaps you're interested in Redis but you don't want to run it on Azure, or perhaps even on Linux. You can run Redis via MSOpenTech's Redis on Windows fork. You can install it from NuGet, Chocolatey or download it directly from the project github repository. If you do get Redis for Windows (super easy with Chocolatey), you can use the redis-cli.exe at the command line to talk to the Azure Redis Cache as well (of course!).

也许您对Redis感兴趣,但是您不想在Azure甚至Linux上运行它。 您可以在Windows fork上通过MSOpenTech的Redis运行Redis 。 您可以从NuGetChocolatey进行安装,也可以直接从项目github存储库下载。 如果确实获得了Windows版Redis(对Chocolatey来说非常容易),则可以在命令行上使用redis-cli.exe与Azure Redis缓存进行对话(当然!)。

It's easy to run a local Redis server with redis-server.exe, test it out in develoment, then change your app's Redis connection string when you deploy to Azure.

使用redis-server.exe运行本地Redis服务器很容易,在开发中对其进行测试,然后在部署到Azure时更改应用程序的Redis连接字符串。

翻译自: https://www.hanselman.com/blog/trying-redis-caching-as-a-service-on-windows-azure

azure服务

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值