Saturday, 13 May 2023

How can I determine the normal performance of my API?

 Here are some ways you can determine the "normal" performance of your API as a benchmark:

  1. Collect metrics and logs over time - As you first deploy your API and it sees increased usage, collect metrics like:
  1. Look for performance trends - Over days, weeks and months, look for patterns in the metrics that indicate the API's typical performance under different loads and usage scenarios.

  2. Analyze log patterns - Determine the normal types and frequency of log messages your API produces when running smoothly. These become your "baseline" logs.

  3. Set performance SLAs - Based on the typical performance you've observed, set Service Level Agreements for metrics like:

  • Uptime percentage goal
  • Average latency target
  • Maximum error rate to stay within
    1. Identify performance outliers - As you collect more metrics over time, look for data points that fall outside the normal performance ranges you've observed. These could indicate issues.

    2. Compare to historical data - Within your monitoring system, compare current performance metrics to the same time periods in previous weeks and months. This can reveal degrading performance earlier.

    3. Take into account environmental factors - Consider things like day of week, season, promotions, etc. that could cause fluctuations in your typical performance benchmarks.

    4. Monitor resource usage - Track metrics like CPU, memory and network usage of your API hosts. Determine the "normal" levels required to sustain your expected API performance.

    By collecting metrics, logs and resource usage data over an extended period after your API is launched, you'll gain insights into its typical performance under a variety of conditions. This historical data then serves as the benchmark for determining when current performance deviates outside normal ranges, indicating potential issues.

    Hope this helps! Monitoring your API over time and continually updating your performance baselines as usage changes will give you the context needed to spot abnormal behavior and troubleshoot issues quickly.

No comments:

Post a Comment

What is the difference between the Rate Limit and Quota policies?

  The   Rate Limit   and   Quota policies   in Apigee serve similar but distinct purposes: Rate Limit: • Limits the number of requests withi...