> ## Documentation Index
> Fetch the complete documentation index at: https://docs.apinizer.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Performance Degradation

> You can detect performance degradation issues in Apinizer, optimize resource allocation, improve database queries, and apply cache strategies.

## Causes of Performance Issues

<Warning>
  Performance degradation can usually be caused by the following factors:
</Warning>

* High traffic volume
* Insufficient resource allocation (CPU, RAM)
* Database query performance
* Network delays
* Policy execution times
* Cache configuration issues

## Performance Monitoring

<Info>
  To monitor performance metrics in Apinizer:
</Info>

1. **Analytics Dashboard:** You can get detailed information about API traffic and response times.
2. **Prometheus Metrics:** You can monitor system resource usage and performance metrics.
3. **Log Analysis:** You can detect slow responding requests from log files.

## Performance Optimization

### Resource Allocation

* Allocate sufficient CPU and RAM resources to pods
* Configure auto-scaling settings
* Optimize JVM parameters

### Database Optimization

* Optimize database queries
* Configure connection pooling settings
* Check indexes

### Cache Strategy

* Use appropriate cache policies
* Optimize cache TTL values
* Set cache sizes

### Policy Optimization

* Remove unnecessary policies
* Optimize policy execution order
* Optimize script policies

## DNS Resolution Performance

<Warning>
  In systems with intensive environment usage or high number of rate limit definitions, the situation where some service addresses cannot be resolved instantly may be caused by insufficient DNS resolution performance.
</Warning>

### Solution

<Steps>
  <Step title="Increase CoreDNS Resource Limits">
    CPU and RAM resources should be increased to enable processing more queries simultaneously.
  </Step>

  <Step title="Distribute CoreDNS Over Nodes">
    Deployment should be reconfigured so that there is one CoreDNS pod on each worker node. This way, DNS queries can be processed in a distributed manner without piling up at a central point.
  </Step>
</Steps>
