Hi @Aryaa Kotian,
Welcome to the Microsoft Q&A Platform!
It seems like you're seeing random spikes in the response time for requests to 'POST AjaxService/GetHomepageData', these spikes are likely caused by temporary factors like increased traffic, slow responses from external services, temporary resource bottlenecks, variations in how the code handles different requests, or issues with caching.
- Look at the logs using Application Insights or a similar tool to see what happens with requests to "POST AjaxService/GetHomepageData." Focus on times when there are spikes to find any slowdowns.
- See how well any outside services or database queries are working when handling requests. Turn on tracking in Application Insights to find out if any queries or API calls are slow.
- Run tests to simulate high traffic and find out where things might slow down. Also, check if larger or more complex requests are causing delays.
- Review the code for this endpoint to find any areas that can be made faster. Use tools to identify slow parts of the code. Also, check for any database queries that could be improved, especially if they lack proper indexing.
- Add caching for data that people request often. This can help speed up responses for repeat requests.
- Create alerts in Application Insights to monitor response times for "POST AjaxService/GetHomepageData." This way, you can catch any issues early.
- Investigate if problems like thread pool overload or frequent garbage collection are causing delays. These issues can be temporary and might not show up in regular performance checks.
Troubleshoot performance issues:
https://learn.microsoft.com/en-us/azure/app-service/troubleshoot-performance-degradation
Application insights overview:
https://learn.microsoft.com/en-us/azure/azure-monitor/app/app-insights-overview
Hope the above provided information help in better understanding and help you resolve the issue, if you have any further concerns or queries, please feel free to reach out to us.
If the answer is helpful, please click "Accept Answer" and kindly upvote it.