The /api/alerts/ endpoint currently returns all alerts in a single response, which causes severe performance issues when alert volume grows:
- Slow dashboard: Page might take a lot of time to load in case of large payloads which might affect in production
- Frontend freezes: ag-grid table tries to render thousands of rows, causing browser UI to become unresponsive
A solution to the same issue can be implementing server-side pagination on the alerts endpoint with the following characteristics:
Backend API:
- Paginated responses with metadata: [{count, next, previous, results}]
- Configurable page size : default: 25 alerts/page, max: 100 with Query parameters and filter support
Frontend UI:
- Pagination controls: First/Previous/Next/Last buttons
- This will help establish smooth browsing without refetching entire dataset
- This can be integrated seamlessly with existing date range filter
The
/api/alerts/endpoint currently returns all alerts in a single response, which causes severe performance issues when alert volume grows:A solution to the same issue can be implementing server-side pagination on the alerts endpoint with the following characteristics:
Backend API:
Frontend UI: