Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
Bedrock Mission!

Learn more

View all

Sign in to view all badges

Optimize Cache Hit Ratio for Dispatcher

Avatar

Level 7

Hi Team,

 

I have the below Cache Hit Ratio Logs from HTTPD Error Logs - 

Line 2257: Thu Sep 08 00:26:33.903079 2022 [dispatcher:info] [pid 439:tid 140012885994296] [cm-pyyyyy-ezzzzzz-aem-publish-b46b599f5-8cqmj] Current cache hit ratio: 0.67 %, referer: https://publish-pyyyyy-ezzzzzz.adobeaemcloud.com/systemready
Line 2642: Thu Sep 08 00:31:22.796975 2022 [dispatcher:info] [pid 437:tid 140012888001336] [cm-pyyyyy-ezzzzzz-aem-publish-b46b599f5-8cqmj] Current cache hit ratio: 0.67 %, referer: https://publish-pyyyyy-ezzzzzz.adobeaemcloud.com/systemready
Line 4787: Thu Sep 08 00:58:27.780079 2022 [dispatcher:info] [pid 438:tid 140012886137656] [cm-pyyyyy-ezzzzzz-aem-publish-b46b599f5-8cqmj] Current cache hit ratio: 0.33 %, referer: https://publish-pyyyyy-ezzzzzz.adobeaemcloud.com/systemready
Line 7508: Thu Sep 08 01:32:31.066790 2022 [dispatcher:info] [pid 439:tid 140012888288056] [cm-pyyyyy-ezzzzzz-aem-publish-b46b599f5-8cqmj] Current cache hit ratio: 0.57 %, referer: https://publish-pyyyyy-ezzzzzz.adobeaemcloud.com/systemready
Line 7717: Thu Sep 08 01:34:48.090471 2022 [dispatcher:info] [pid 437:tid 140012888431416] [cm-pyyyyy-ezzzzzz-aem-publish-b46b599f5-8cqmj] Current cache hit ratio: 0.57 %, referer: https://publish-pyyyyy-ezzzzzz.adobeaemcloud.com/systemready
Line 9286: Thu Sep 08 01:54:51.199421 2022 [dispatcher:info] [pid 438:tid 140012885707576] [cm-pyyyyy-ezzzzzz-aem-publish-b46b599f5-8cqmj] Current cache hit ratio: 0.29 %, referer: https://publish-pyyyyy-ezzzzzz.adobeaemcloud.com/systemready
Line 13376: Thu Sep 08 02:45:20.619248 2022 [dispatcher:info] [pid 251:tid 139740566354744] [cm-pyyyyy-ezzzzzz-aem-publish-b46b599f5-x5jk4] Current cache hit ratio: 0.75 %, referer: https://publish-pyyyyy-ezzzzzz.adobeaemcloud.com/systemready
Line 14529: Thu Sep 08 03:00:14.681611 2022 [dispatcher:info] [pid 439:tid 140012884155192] [cm-pyyyyy-ezzzzzz-aem-publish-b46b599f5-8cqmj] Current cache hit ratio: 0.50 %, referer: https://publish-pyyyyy-ezzzzzz.adobeaemcloud.com/systemready
Line 14898: Thu Sep 08 03:04:20.837002 2022 [dispatcher:info] [pid 248:tid 139740568218424] [cm-pyyyyy-ezzzzzz-aem-publish-b46b599f5-x5jk4] Current cache hit ratio: 0.50 %, referer: https://publish-pyyyyy-ezzzzzz.adobeaemcloud.com/systemready
Line 15923: Thu Sep 08 03:17:14.615414 2022 [dispatcher:info] [pid 437:tid 140012889434936] [cm-pyyyyy-ezzzzzz-aem-publish-b46b599f5-8cqmj] Current cache hit ratio: 0.50 %, referer: https://publish-pyyyyy-ezzzzzz.adobeaemcloud.com/systemready
Line 17140: Thu Sep 08 03:32:31.140206 2022 [dispatcher:info] [pid 249:tid 139740566498104] [cm-pyyyyy-ezzzzzz-aem-publish-b46b599f5-x5jk4] Current cache hit ratio: 0.50 %, referer: https://publish-pyyyyy-ezzzzzz.adobeaemcloud.com/systemready
Line 18229: Thu Sep 08 03:45:50.219356 2022 [dispatcher:info] [pid 438:tid 140012885302072] [cm-pyyyyy-ezzzzzz-aem-publish-b46b599f5-8cqmj] Current cache hit ratio: 0.25 %, referer: https://publish-pyyyyy-ezzzzzz.adobeaemcloud.com/systemready
Line 25431: Thu Sep 08 05:03:37.615377 2022 [dispatcher:info] [pid 249:tid 140036349836088] [cm-pyyyyy-ezzzzzz-aem-publish-5f697b88fb-x66fv] Current cache hit ratio: 1.00 %, referer: https://publish-pyyyyy-ezzzzzz.adobeaemcloud.com/systemready
Line 25496: Thu Sep 08 05:04:13.940976 2022 [dispatcher:info] [pid 248:tid 140036349692728] [cm-pyyyyy-ezzzzzz-aem-publish-5f697b88fb-x66fv] Current cache hit ratio: 2.00 %, referer: https://publish-pyyyyy-ezzzzzz.adobeaemcloud.com/systemready
Line 27017: Thu Sep 08 05:23:23.454985 2022 [dispatcher:info] [pid 254:tid 140036356668216] [cm-pyyyyy-ezzzzzz-aem-publish-5f697b88fb-x66fv] Current cache hit ratio: 1.00 %, referer: https://publish-pyyyyy-ezzzzzz.adobeaemcloud.com/systemready
Line 29658: Thu Sep 08 05:56:23.335498 2022 [dispatcher:info] [pid 248:tid 139694172326712] [cm-pyyyyy-ezzzzzz-aem-publish-5f697b88fb-9n4sd] Current cache hit ratio: 2.00 %, referer: https://publish-pyyyyy-ezzzzzz.adobeaemcloud.com/systemready
Line 29819: Thu Sep 08 05:58:32.987770 2022 [dispatcher:info] [pid 251:tid 139694173616952] [cm-pyyyyy-ezzzzzz-aem-publish-5f697b88fb-9n4sd] Current cache hit ratio: 4.00 %, referer: https://publish-pyyyyy-ezzzzzz.adobeaemcloud.com/systemready
Line 30332: Thu Sep 08 06:04:51.895327 2022 [dispatcher:info] [pid 249:tid 139694177606456] [cm-pyyyyy-ezzzzzz-aem-publish-5f697b88fb-9n4sd] Current cache hit ratio: 1.00 %, referer: https://publish-pyyyyy-ezzzzzz.adobeaemcloud.com/systemready
Line 35901: Thu Sep 08 07:14:29.991084 2022 [dispatcher:info] [pid 251:tid 139694177606456] [cm-pyyyyy-ezzzzzz-aem-publish-5f697b88fb-9n4sd] Current cache hit ratio: 2.00 %, referer: https://publish-pyyyyy-ezzzzzz.adobeaemcloud.com/systemready
Line 36270: Thu Sep 08 07:18:59.375791 2022 [dispatcher:info] [pid 248:tid 139694172470072] [cm-pyyyyy-ezzzzzz-aem-publish-5f697b88fb-9n4sd] Current cache hit ratio: 1.00 %, referer: https://publish-pyyyyy-ezzzzzz.adobeaemcloud.com/systemready
Line 37487: Thu Sep 08 07:34:11.512184 2022 [dispatcher:info] [pid 249:tid 139694172900152] [cm-pyyyyy-ezzzzzz-aem-publish-5f697b88fb-9n4sd] Current cache hit ratio: 0.50 %, referer: https://publish-pyyyyy-ezzzzzz.adobeaemcloud.com/systemready
Line 46124: Thu Sep 08 09:08:26.655883 2022 [dispatcher:info] [pid 250:tid 139731113913144] [cm-pyyyyy-ezzzzzz-aem-publish-767cb8874-dz9cq] Current cache hit ratio: 2.00 %, referer: https://publish-pyyyyy-ezzzzzz.adobeaemcloud.com/systemready
Line 46605: Thu Sep 08 09:14:30.995258 2022 [dispatcher:info] [pid 252:tid 140380673166136] [cm-pyyyyy-ezzzzzz-aem-publish-767cb8874-gxps7] Current cache hit ratio: 3.00 %, referer: https://publish-pyyyyy-ezzzzzz.adobeaemcloud.com/systemready
Line 46894: Thu Sep 08 09:17:48.004838 2022 [dispatcher:info] [pid 249:tid 140380671445816] [cm-pyyyyy-ezzzzzz-aem-publish-767cb8874-gxps7] Current cache hit ratio: 3.00 %, referer: https://publish-pyyyyy-ezzzzzz.adobeaemcloud.com/systemready
Line 47039: Thu Sep 08 09:19:50.044915 2022 [dispatcher:info] [pid 248:tid 140380673739576] [cm-pyyyyy-ezzzzzz-aem-publish-767cb8874-gxps7] Current cache hit ratio: 2.00 %, referer: https://publish-pyyyyy-ezzzzzz.adobeaemcloud.com/systemready
Line 47776: Thu Sep 08 09:29:02.203555 2022 [dispatcher:info] [pid 248:tid 139731112909624] [cm-pyyyyy-ezzzzzz-aem-publish-767cb8874-dz9cq] Current cache hit ratio: 1.00 %, referer: https://publish-pyyyyy-ezzzzzz.adobeaemcloud.com/systemready
Line 48385: Thu Sep 08 09:36:43.025027 2022 [dispatcher:info] [pid 249:tid 139731111619384] [cm-pyyyyy-ezzzzzz-aem-publish-767cb8874-dz9cq] Current cache hit ratio: 4.00 %, referer: https://publish-pyyyyy-ezzzzzz.adobeaemcloud.com/systemready

 

As seen above the max cache hit ratio is extremely low. (max 4%)

Query 1 - On what timeframe is the ratio calculated ?

 

Analyzing the HTTPD Error Logs for a time period between 2 logs - 

Choosing between 2 time frames -
Time Frame - 05:56:23 to 05:58:32
Line 29658: Thu Sep 08 05:56:23.335498 2022 [dispatcher:info] [pid 248:tid 139694172326712] [cm-pyyyyy-ezzzzzz-aem-publish-5f697b88fb-9n4sd] Current cache hit ratio: 2.00 %, referer: https://publish-pyyyyy-ezzzzzz.adobeaemcloud.com/systemready
Line 29819: Thu Sep 08 05:58:32.987770 2022 [dispatcher:info] [pid 251:tid 139694173616952] [cm-pyyyyy-ezzzzzz-aem-publish-5f697b88fb-9n4sd] Current cache hit ratio: 4.00 %, referer: https://publish-pyyyyy-ezzzzzz.adobeaemcloud.com/systemready

 

I tried to get a list of all requests that are coming to the dispatcher between the time period.

HTTPD Access _ Logs - 
Time Frame - 05:56:23 to 05:58:32 - 2 mins - 222 requests
/favicon.ico HTTP/1.1" 404 - 9 Requests
/system/probes/health HTTP/1.1" 200 1126 "-" "Envoy/HC" - 157 Requests
/server-status/?auto HTTP/1.1" 200 2351 "-" "Go-http-client/1.1" - 25 requests
/system/probes/live HTTP/1.1" 200 31 "-" "kube-probe/1.21" - 32 requests
Total Requests - 223 Requests

 

I think the cache hit ratio is low because of these requests that are not cached and not site specific.

Can you please help with this issue ? How can we boost the cache hit ratio ?

 

My current website implementation has one single page hence maybe that's why the cache hit ratio is low.

@arunpatidar@Mohit_KBansal@Jörg_Hoh@kautuk_sahni 

 

Thanks,

Rohan Garg

2 Replies

Avatar

Employee Advisor

The cache-hit ratio on individual dispatchers is not a really good indication how the overall caching is doing, especially when adding Fastly into the equation. And the goal should be to cache as much as possible in the CDN.

 

I recommend to check https://experienceleague.adobe.com/docs/experience-manager-cloud-service/content/implementing/conten... to details on Caching with AEM as a Cloud Service

 

 

Avatar

Level 7

Hi @Jörg_Hoh , thanks for the reply. We have implemented most of the suggestions on the sent link.

We will maybe ignore the cache-hit ratio on individual dispatchers for now.