This topic describes how to use the query and analysis feature of Log Service to analyze layer-7 access logs of Server Load Balancer (SLB) in real time.
Prerequisites
Layer-7 access logs of SLB are collected. For more information, see Enable the access log management feature.
Background information
SLB is a basic component for most cloud services. In most cases, you need to continuously monitor, detect, diagnose, and configure alerts for SLB. Alibaba Cloud SLB distributes traffic to multiple ECS instances to improve the service capabilities of applications. You can use SLB to prevent single point of failures (SPOFs) and a large number of concurrent web access requests.
- Page Views (PVs): the total number of HTTP or HTTPS requests sent by the clients.
- Unique Visitors (UVs): the total number of unique requests. Requests initiated by unique visitors from the same client are counted only once.
- Request success rate: the percentage of the requests whose status code is 2XX to the total PVs.
- Request traffic: the total number of bytes of request messages that are sent by the clients.
- Response traffic: the total number of bytes of the HTTP message body that is sent to the clients.
- PV heat map: indicates the density of PVs in the regions where the IP addresses of the clients reside.
Examples
Request scheduling analysis
Client traffic is first processed by SLB and then distributed to an ECS instance for business logic processing. SLB can detect unhealthy ECS instances and distribute traffic to healthy ECS instances. After the unhealthy ECS instances recover, traffic is distributed to them.
* | select COALESCE(client_ip, vip_addr, upstream_addr) as source, COALESCE(upstream_addr, vip_addr, client_ip) as dest, sum(request_length) as inflow group by grouping sets( (client_ip, vip_addr), (vip_addr, upstream_addr))
