如何衡量Windows Azure的带宽使用编程方式? [英] How to measure Windows Azure bandwidth usage programmatically?

查看:196
本文介绍了如何衡量Windows Azure的带宽使用编程方式?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我运行一个Windows Azure的Web应用程序(ASP.Net MVC)。

I'm running a Windows Azure web application (ASP.Net MVC).

我如何从code范围内衡量其使用的带宽是多少?

How do I measure the bandwidth used by it from within the code?

我有相同的Web应用程序的多个用户,我想限制每个用户有多少是允许带宽方面的消费。

I have more than one user for the same web app and I would like to limit how much each user is allowed to consume in terms of bandwidth.

推荐答案

Azure的SDK不编程提供任何账单或消费信息。作为lgorek指出,可以近似用IIS和WCF性能counters.And使用你也可以使用自己的记录到来自不同用户的轨道交通。但是,您将无法当用户下载从Blob存储的内容进行跟踪消耗的带宽。嗯,你可以,但只有当所有的斑点是私人和你通过你的Web应用程序,而不是在您的网页直接链接流的内容。

The Azure SDK doesn't provide any billing or consumption information programatically. As lgorek stated, you can approximate usage with IIS And WCF performance counters.And you'll also be able to use your own logging to track traffic from different users. However, you won't be able to track bandwidth consumed when users download content from blob storage. Well, you could, but only if all of your blobs were private and you streamed their content through your web application instead of direct links on your web pages .

这篇关于如何衡量Windows Azure的带宽使用编程方式?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆