date: 2019-07-02 11:28:46
title: tech| aliyun - 為了無法計算的價值
架構師捷徑: 了解云能做什么, 并且能用好云; 數據->價值
- aliyun 網站矩陣 -> SE: `site:*.aliyun.com`
- [阿里云大學](https://edu.aliyun.com)
- [aliyun mvp](https://mvp.aliyun.com)
- [云棲社區](https://yq.aliyun.com)
- [阿里云總監課](https://yq.aliyun.com/promotion/689)
[[toc]]
# elastic computing
## ecs, elastic compute service
- ecs 送的免費云盾有一層白名單
## cr, container registry
## cs, container service, k8s
- 專有版: 3master+worker; 托管版: worker; serverless: 控制臺+命令控制
## eci, elastic container instance
## fc, function compute
- 支持 php
# apsaraDB
- [企業級數據庫服務選型](https://promotion.aliyun.com/ntms/act/dbservice.html)
## rds, relationship database service
- 實例規格 https://help.aliyun.com/document_detail/26312.html
- 慢查: sql洞察(搜索) sql日志(匯總/詳情)
- 讀寫分離: 事務 `/*force_master*/`
- dblink
## drds
- 多個 rds 的前置服務器
- 查詢: 分區鍵>索引>常規查詢
- 并發型vs分析型
- prepare協議支持: 主庫支持, 從庫不支持
show help;
SHOW PARTITIONS FROM tablename # 查看分區鍵
## redis, kvstore
- 規格性能: https://help.aliyun.com/document_detail/26350.html
## mongo
- 版本與存儲引擎: https://help.aliyun.com/document_detail/61906.html
## ads
- mysql -> dts -> ads -> quickBI/DataV
## tsdb
- ts, influx, 時空(時序+時空)
## dts, data transfer service
## dbs, data backup service
## dms, db devops
## hdm, hybrid cloud database management
# analysis, 大數據
## E-MapReduce
## MaxCompute
## data integration
## data lake analytics
# DTplus, 數加
## aliyun elasticsearch
- 預置插件
# storage&CDN
## oss
## nas
- mount NFS https://help.aliyun.com/document_detail/90529.html
# networking
## vpc
- vpc®ion: http://static-aliyun-doc.oss-cn-hangzhou.aliyuncs.com/assets/img/80559/155324038634448_zh-CN.png
- vpc - 路由器 - 路由表 - 交換機 - ecs/rds
# monitor & management
## kms, key management service
## ActionTrail, 操作審計
# application service
## sls, log service
- logtail 采集原理: https://help.aliyun.com/document_detail/89928.html
- logtail 采集限制: 每次512kb->導致json截斷->json解析失敗 修改時間后需要重啟
- search syntax: https://help.aliyun.com/document_detail/29060.html
- analyze syntax: https://help.aliyun.com/document_detail/53608.html
- grafana: https://help.aliyun.com/document_detail/60952.html
- 日志接入: 文件/容器stdout -> json -> logtail json 解析
- 配置索引: 索引配置后驗證
- 查詢 + 保存快查
- 面板: 根據 web 服務 SLA 制定數據指標
- 監控: 監控驗證
```
* | select time_series(__time__, '1m', '%H:%i' ,'0') as time, count(1) as PV group by time order by time limit 100
host: mms.mengtuiapp.com
# status
select count(1) as pv ,status group by status
# pv/uv
select approx_distinct(remote_addr) as uv ,count(1) as pv , date_format(date_trunc('hour', __time__), '%m-%d %H:%i') as time group by date_format(date_trunc('hour', __time__), '%m-%d %H:%i') order by time limit 1000
# 訪問前十地址
* | select count(1) as pv, split_part(request_uri,'?',1) as path group by split_part(request_uri,'?',1) order by pv desc limit 10
# 訪問前十來源
* | select count(1) as pv , http_referer group by http_referer order by pv desc limit 10
# 訪問時間
select avg(request_time) as response_time, avg(upstream_response_time) as upstream_response_time , date_format( from_unixtime(__time__ -__time__%3600),'%m-%d %H:%i' ) as time group by __time__ - __time__% 3600 limit 10000
# 訪問時間前十地址
* | select request_uri as top_latency_request_uri ,request_time order by request_time desc limit 10
```
## pts, performance testing sevice
阿里云性能測試 PTS: https://help.aliyun.com/product/29260.html
apache jmeter: http://jmeter.apache.org/
## open search
# middleware
## arms, application real-time monitoring service
## acm, application config manager
- 
## tracing analysis, opentrace
zipkin
## ahas, application high availability service
## edas, enterprise distributed application service
## mq, amqp
# sercurity
## 安騎士
# devops
## cli
https://help.aliyun.com/product/29991.html
aliyun rds DescribeSlowLogs --DBInstanceId=rm-uf64x3v2l4m1eb753 --StartTime=2018-11-05Z --EndTime=2018-11-06Z --SortKey=TotalQueryTimes
aliyun rds DescribeSlowLogRecords --DBInstanceId=rm-uf64x3v2l4m1eb753 --StartTime=2018-11-05T00:00Z --EndTime=2018-11-06T00:00Z
## toolkit
https://help.aliyun.com/product/29966.html
## codeshell
https://help.aliyun.com/product/89853.html
## openapi explorer
https://api.aliyun.com