1 AI Ops - Anomaly Detection

Types of Anomalies in API Monitoring

1. Response Time Anomalies

  • When an API suddenly becomes slower than usual.
  • Example: The average response time is 200ms, but suddenly it spikes to 2 seconds.

2. Error Rate Anomalies

  • When the number of failed API calls increases unexpectedly.
  • Example: If an API usually has a 1% error rate but jumps to 20%, it’s an anomaly.

3. Traffic Volume Anomalies

  • Sudden increase or decrease in API request traffic.
  • Example: If an API normally gets 1,000 requests per minute, but suddenly gets 10,000, it might indicate a DDoS attack or bug.

4. Data Pattern Anomalies

  • Unexpected behavior in API responses.
  • Example: A user details API suddenly returns empty data for valid users.

Why Detect Anomalies?

✅ Identify performance issues early before they affect users.

✅ Prevent system failures by acting on unusual trends.

✅ Enhance security by detecting suspicious activities.

✅ Improve reliability of the distributed platform.

Machine Learning-Based Anomaly Detection

Isolation Forest (IForest)

  • Works by randomly splitting the dataset and identifying points that get isolated quickly.
  • Best for detecting sudden spikes or drops in API performance.