AEM Site 404 performance issue | Community
Skip to main content
Level 2
September 11, 2022
Solved

AEM Site 404 performance issue

  • September 11, 2022
  • 2 replies
  • 2186 views

I had ran a load test for 404 response on a 8 core 16GB AEM publish instance. 

The request urls are something like https://www.myhost.com/content/abc/${__Random(1,1000000)}/,
and the response is set in /apps/sling/servlet/errorhandler/404.jsp:

<% response.setStatus(404); response.setContentType("text/html"); response.getWriter().write("<h1>Not Found</h1> <p>The requested URL was not found on this server.</p>"); %>

 
AEM can handle about 700 requests/second, which seems quite low for this simple scenario.


Does anybody konw how to improve the 404 throughtout for AEM instance?

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Best answer by Mohit_KBansal

Understood. I recommend the following in such a scenario:

  1. Make sure to apply recommended best practices to the publisher [1] [2] [3]
  2. Configure DDoS Protection [4] on CDN, this will block any attempt of attack on the server.
  3. Continuously scan your publisher logs, to find common 404 patterns and add these patterns to the dispatcher's farm filter or CDN.

 

[1] https://experienceleague.adobe.com/docs/experience-manager-65/deploying/configuring/performance-guid...

[2] https://experienceleague.adobe.com/docs/experience-manager-65/deploying/practices/best-practices-for...

[3] https://blogs.perficient.com/2020/02/19/website-performance-with-the-adobe-experience-cloud/ 

[4] https://aws.amazon.com/shield/ddos-attack-protection/ 

2 replies

Mohit_KBansal
Adobe Employee
Adobe Employee
September 12, 2022

This is a strange scenario where you are trying to measure the performance of the server by putting a load of 404 requests. In such case, the dispatcher/CDN cache can not be leveraged and requests will always reach to the publisher.

 

Ideally, in the case of 404, the publisher should do only resource resolution, and return a very lightweight 404 response. Your code seems to be doing the same.

 

Next, you need to make sure to apply best practices [1] [2] [3] to improve the performance of publisher servers.

 

I also suggest finding common URL patterns, which are hitting publishers with 404 response code and adding such patterns in your dispatcher farm filter or CDN filter to avoid unwanted load on publishers.

 

[1] https://experienceleague.adobe.com/docs/experience-manager-65/deploying/configuring/performance-guidelines.html?lang=en

[2] https://experienceleague.adobe.com/docs/experience-manager-65/deploying/practices/best-practices-for-performance-testing.html?lang=en

[3] https://blogs.perficient.com/2020/02/19/website-performance-with-the-adobe-experience-cloud/ 

 

Ian_2021Author
Level 2
September 12, 2022

I know page should be cached in dispatcher and cdn. 

I'm worrying some malicious site scan requests may cause publish  cpu exhaustion.

Mohit_KBansal
Adobe Employee
Mohit_KBansalAdobe EmployeeAccepted solution
Adobe Employee
September 12, 2022

Understood. I recommend the following in such a scenario:

  1. Make sure to apply recommended best practices to the publisher [1] [2] [3]
  2. Configure DDoS Protection [4] on CDN, this will block any attempt of attack on the server.
  3. Continuously scan your publisher logs, to find common 404 patterns and add these patterns to the dispatcher's farm filter or CDN.

 

[1] https://experienceleague.adobe.com/docs/experience-manager-65/deploying/configuring/performance-guid...

[2] https://experienceleague.adobe.com/docs/experience-manager-65/deploying/practices/best-practices-for...

[3] https://blogs.perficient.com/2020/02/19/website-performance-with-the-adobe-experience-cloud/ 

[4] https://aws.amazon.com/shield/ddos-attack-protection/ 

Ian_2021Author
Level 2
September 12, 2022

I  can setup 404 page at dispatcher/apache level, but AEM publish have to return 404 response code before apache can handle it.

arunpatidar
Community Advisor
Community Advisor
September 12, 2022

approx 700 request/second to 404 page would be signature of attack until you have issue with code/design.

You should rely on DDoS/attack protection.

Arun Patidar