测量SAAS应用带宽使用情况 [英] Measure SAAS App Bandwidth Usage

查看:163
本文介绍了测量SAAS应用带宽使用情况的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在on Rails的基于SaaS的应用程序建立一个Ruby的过程。 这个应用程序被托管在AWS(亚马逊)。

I am in the process of building a Ruby on Rails based SaaS app. The app is being hosted on AWS (Amazon).

我需要衡量每个客户的计费和客户分段的带宽使用。 客户可以通过它们的URL来识别。像customer1.myapp.com或mycustomer.com

I need to measure the bandwidth usage by each customer for billing and customer segmenting. The customers could be identified by their Urls. like customer1.myapp.com or mycustomer.com

有人可以建议做到这一点的最好方法是什么?任何工具或简单的黑客将AP preciated。

Can somebody suggest the best way to accomplish this? Any tools or simple hacks would be appreciated.

推荐答案

假设你正在面向与Nginx的或Apache你的Rails应用程序,你可以使用,其中包括虚拟主机日志格式,然后拉出传输的字节,并从虚拟主机日志行(夜间,每月或其他)。添加了字节,通过虚拟主机分组,和你去那里。

Assuming you are fronting your Rails app with Nginx or Apache, you could use a log format that includes the vhost, then pull out the bytes transferred and the vhost from the log lines (nightly, monthly, or whatever). Add up the bytes, grouping by vhost, and there you go.

这篇关于测量SAAS应用带宽使用情况的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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