Api-gateway Practice (7) New service gateway-Gateway request monitoring statistics

Source: Internet
Author: User

First, real-time monitoring

The user clicks on the service instance, the system displays the list of APIs under service instance-version,

The user clicks on the following two icons for an API

1, API request number monitoring

Horizontal axis: Time, granularity is minute

Longitudinal axis: Number of requests for access

Display: Number of failures (red), number of successes (green), total (yellow), "Click Red, display the list of failed logs, click the failure log, and the tree shows the local request end-to-end detail log."

Store:

    • At the end of the request, the cumulative number of successes is instid_api_20171852_suc_cnt
    • At the end of the request, the cumulative number of failures to instid_api_20171852_err_cnt
2. API Request Duration Monitoring

Horizontal axis: Time, granularity is minute

Longitudinal axis: Request Access length

Show: Average success time of Gateway (green), average success time of server (black)

Store:

    • At the end of the request, the cumulative gateway succeeds to Instid_api_20171852_suc_len
    • At the end of the request, the cumulative service end succeeds to Instid_svc_20171852_suc_len
3. Recording to Redis storage

The above data in Redis is set to default 120-minute expiration,

When the above 1 and 2 are complete, log the "Request monitoring statistics log" to elk.

Ii. log format 1, request start log

Request Log Request ID request Developer APIID Service Instance client gateway start time server end time Client address success/failure

Gateway End Time service end Time service provider
@[email protected] @[email protected] @[email protected] @[email protected] @[email protected] @[email protected] @[email Protected] @[email protected] @succFlag/f[email protected]

@[email protected] @[email protected] @[email protected]

2. Signature comparison Log

Signature is unsuccessful for failed request ID APIID service instance

@[email protected] @[email protected] @[email protected] @[email protected] @succFlag/[email protected]

3. Request Monitoring Statistics log (collect and send regularly)

@[email protected] @[email protected] @[email protected] @ Date Time @ @ hour @ @ min @

@ Success @ @ Number of failures @ Total @

@ Gateway Average Request response Duration (Success) @ @ Gateway Average Request response Duration (failed) @

@ Service-side average request response Duration (Success) @ @ Server average Request response Duration (failed) @

Api-gateway Practice (7) New service gateway-Gateway request monitoring statistics

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.