When your app experiences a sudden flood of requests, it can degrade performance, increase latency, or even cause downtime. This situation is common for apps hosted on public endpoints with infrastructure scaled for low traffic, such as MVPs or apps in the early stages of product development.
This guide outlines steps to detect, analyze, and mitigate such floods of requests on the Aptible platform, along with strategies for long-term preparation.
Use Endpoint Logs to analyze incoming requests:
What to Look For: Endpoint logs can help identify traffic spikes, frequently accessed endpoints, and originating networks.
Steps:
Use APM Tools to identify bottlenecks:
Purpose: Application Performance Monitoring (APM) tools provide insight into performance bottlenecks.
Key Metrics:
Determine if Endpoint or resources should be public:
Investigate Traffic Source:
Monitor App and Database Metrics:
Scale Resources Temporarily:
worker_connections are not enough
error message in your logs, horizontal scaling will help address this issue. See more about this error here.Validate Performance of Custom Error Pages:
Authentication and Access Control:
Periodic Load Testing:
Horizontal Auto Scaling:
Optimize Performance:
Incident Response Plan:
A flood of requests doesn’t have to bring your app down. By proactively monitoring traffic, optimizing performance, and having a well-rehearsed response plan, you can ensure that your app remains stable during unexpected surges.
When your app experiences a sudden flood of requests, it can degrade performance, increase latency, or even cause downtime. This situation is common for apps hosted on public endpoints with infrastructure scaled for low traffic, such as MVPs or apps in the early stages of product development.
This guide outlines steps to detect, analyze, and mitigate such floods of requests on the Aptible platform, along with strategies for long-term preparation.
Use Endpoint Logs to analyze incoming requests:
What to Look For: Endpoint logs can help identify traffic spikes, frequently accessed endpoints, and originating networks.
Steps:
Use APM Tools to identify bottlenecks:
Purpose: Application Performance Monitoring (APM) tools provide insight into performance bottlenecks.
Key Metrics:
Determine if Endpoint or resources should be public:
Investigate Traffic Source:
Monitor App and Database Metrics:
Scale Resources Temporarily:
worker_connections are not enough
error message in your logs, horizontal scaling will help address this issue. See more about this error here.Validate Performance of Custom Error Pages:
Authentication and Access Control:
Periodic Load Testing:
Horizontal Auto Scaling:
Optimize Performance:
Incident Response Plan:
A flood of requests doesn’t have to bring your app down. By proactively monitoring traffic, optimizing performance, and having a well-rehearsed response plan, you can ensure that your app remains stable during unexpected surges.