开发者社区> 问答> 正文

如何查询请求缓存命中率?



DescribeDomainReqHitRateData



描述


获取加速域名的请求命中率(命中请求百分比)
不指定StartTime和EndTime时,默认读取过去24小时的数据,同时支持按指定的起止时间查询,两者需要同时指定。

  • 支持批量域名查询,多个域名可用逗号(半角)分隔
  • 最多可获取最近90天的数据


请求参数

参数类型必要描述
ActionString操作接口名,系统规定参数取值:DescribeDomainReqHitRateData
DomainNameString需要查询的加速域名,只支持一个域名,不写代表所有
StartTimeString获取数据起始时间点,日期格式按照ISO8601表示法,并使用UTC时间。格式为:YYYY-MM-DDThh:mmZ最小数据粒度为5分钟不写默认读取过去24小时数据
EndTimeString结束时间需大于起始时间;获日期格式按照ISO8601表示法,并使用UTC时间。格式为:YYYY-MM-DDThh:mmZ
IntervalString查询数据的时间粒度,支持300, 3600, 14400, 28800和86400秒。不传和传的值不支持时,使用默认值300秒


返回参数

名称类型描述
DomainNameString加速域名信息
DataIntervalString每条记录的时间间隔,以秒为单位
StartTimeDateTime开始时间
EndTimeDateTime结束时间
HitRateIntervalDataModule[]每个时间间隔的字节命中百分占比


DataModule

名称类型描述
TimeStampString时间片起始时刻
ValueString详细使用数据


特殊错误码

错误代码描述Http 状态码语义
ThrottlingRequest was denied due to request throttling.503请求被流量控制限制
IllegalOperationIllegal domain, operation is not permitted.403非法域名, 无法操作
OperationDeniedYour account does not open CDN service yet.403未开通CDN服务
OperationDeniedYour CDN service is suspended.403CDN服务已被停止
InvalidDomain.NotFoundThe domain provided does not belong to you.404域名不存在或不属于当前用户
InvalidDomain.OfflineThe domain provided is offline.404域名已下线
ServiceBusyThe specified Domain is configuring, please retry later.403域名正在配置中, 请稍后再试
InvalidDomain.Configure_failedFailed to configure the provided domain.500域名配置失败
MissingParameterStartTime and EndTime can not be single.400StartTime和EndTime不能单独设置
InvalidStartTime.MalformedSpecified start time is malformed.400StartTime格式错误
InvalidEndTime.MalformedSpecified end time is malformed.400EndTime格式错误
InvalidEndTime.MismatchSpecified end time does not math the specified start time.400EndTime小于StartTime
InvalidStartTime.ValueNotSupportedSpecified end time does not math the specified start time.400EndTime和StartTime差值超过90天


示例


请求示例: http://cdn.aliyuncs.com?Action=DescribeDomainReqHitRateData&DomainName=test.com
&StartTime=2015-12-10T20:00Z
&EndTime=2015-12-10T21:00Z
&<公共请求参数>


返回示例:
JSON格式 {
    "DomainName": "test.com",
    "DataInterval": "300",
    "RequestId": "5ADA5190-EE5B-4EF2-BE00-DC441B8D81DD",
    "StartTime": "2015-12-10T20:00Z",
    "EndTime": "2015-12-10T21:00Z",
    "HitRateInterval": {
        "DataModule": [
            {
                "TimeStamp": "2015-12-10T21:00:00Z",
                "Value": "100.0"
            },
            {
                "TimeStamp": "2015-12-10T20:35:00Z",
                "Value": "100.0"
            },
            {
                "TimeStamp": "2015-12-10T20:50:00Z",
                "Value": "99.99932881437826"
            },
            {
                "TimeStamp": "2015-12-10T20:05:00Z",
                "Value": "100.0"
            },
            {
                "TimeStamp": "2015-12-10T20:10:00Z",
                "Value": "100.0"
            },
            {
                "TimeStamp": "2015-12-10T20:55:00Z",
                "Value": "100.0"
            },
            {
                "TimeStamp": "2015-12-10T20:30:00Z",
                "Value": "100.0"
            },
            {
                "TimeStamp": "2015-12-10T20:25:00Z",
                "Value": "100.0"
            },
            {
                "TimeStamp": "2015-12-10T20:00:00Z",
                "Value": "100.0"
            },
            {
                "TimeStamp": "2015-12-10T20:40:00Z",
                "Value": "100.0"
            },
            {
                "TimeStamp": "2015-12-10T20:15:00Z",
                "Value": "100.0"
            },
            {
                "TimeStamp": "2015-12-10T20:45:00Z",
                "Value": "100.0"
            },
            {
                "TimeStamp": "2015-12-10T20:20:00Z",
                "Value": "100.0"
            }
        ]
    }
}


XML格式: <DescribeDomainReqHitRateDataResponse>
        <DataInterval>300</DataInterval>
        <RequestId>515FC426-589D-41C9-BF56-62B2DAACD091</RequestId>
        <DomainName>test.com</DomainName>
        <EndTime>2015-12-10T21:00Z</EndTime>
        <StartTime>2015-12-10T20:00Z</StartTime>
        <HitRateInterval>
                <DataModule>
                        <TimeStamp>2015-12-10T21:00:00Z</TimeStamp>
                        <Value>100.0</Value>
                </DataModule>
                <DataModule>
                        <TimeStamp>2015-12-10T20:35:00Z</TimeStamp>
                        <Value>100.0</Value>
                </DataModule>
                <DataModule>
                        <TimeStamp>2015-12-10T20:50:00Z</TimeStamp>
                        <Value>99.99932881437826</Value>
                </DataModule>
                <DataModule>
                        <TimeStamp>2015-12-10T20:05:00Z</TimeStamp>
                        <Value>100.0</Value>
                </DataModule>
                <DataModule>
                        <TimeStamp>2015-12-10T20:10:00Z</TimeStamp>
                        <Value>100.0</Value>
                </DataModule>
                <DataModule>
                        <TimeStamp>2015-12-10T20:55:00Z</TimeStamp>
                        <Value>100.0</Value>
                </DataModule>
                <DataModule>
                        <TimeStamp>2015-12-10T20:30:00Z</TimeStamp>
                        <Value>100.0</Value>
                </DataModule>
                <DataModule>
                        <TimeStamp>2015-12-10T20:25:00Z</TimeStamp>
                        <Value>100.0</Value>
                </DataModule>
                <DataModule>
                        <TimeStamp>2015-12-10T20:00:00Z</TimeStamp>
                        <Value>100.0</Value>
                </DataModule>
                <DataModule>
                        <TimeStamp>2015-12-10T20:40:00Z</TimeStamp>
                        <Value>100.0</Value>
                </DataModule>
                <DataModule>
                        <TimeStamp>2015-12-10T20:15:00Z</TimeStamp>
                        <Value>100.0</Value>
                </DataModule>
                <DataModule>
                        <TimeStamp>2015-12-10T20:45:00Z</TimeStamp>
                        <Value>100.0</Value>
                </DataModule>
                <DataModule>
                        <TimeStamp>2015-12-10T20:20:00Z</TimeStamp>
                        <Value>100.0</Value>
                </DataModule>
        </HitRateInterval>
</DescribeDomainReqHitRateDataResponse>

展开
收起
青衫无名 2017-10-24 11:07:06 2713 0
0 条回答
写回答
取消 提交回答
问答排行榜
最热
最新

相关电子书

更多
基于英特尔 SSD 的虚拟机缓存解决SSD 立即下载
用户态高速块缓存方案 立即下载
高性能Web架构之缓存体系 立即下载