Skip to content

Conversation

@rimomcosta
Copy link

@rimomcosta rimomcosta commented Sep 16, 2025

Purpose of this pull request

This PR improves the Redis guidance for Adobe Commerce on cloud infrastructure and clarifies configuration locations and intent. It documents how to enable stale cache on cloud, adds vetted server-side options (lazyfree and multithreaded I/O) with risks and operational notes, corrects the session configuration example, and adds client-side timeout/retry guidance. It also adds an explicit caveat that longer timeouts/retries are not a remedy for sustained overload.

Affected pages

  • help/implementation-playbook/best-practices/planning/redis-service-configuration.md

Additional information

Summary of changes, rationale, and scope:
1. Stale cache enablement (cloud):
The instructions now point to config.php (cloud only) for enabling stale cache via RemoteSynchronizedCache and include a concrete configuration block. This aligns with how Cloud merges configuration and avoids implying .magento.env.yaml alone is sufficient for stale cache routing.
2. Session configuration example:
Removes a hardcoded port line from the session Redis example to prevent copy-paste errors. On Cloud, the service endpoint is injected via $MAGENTO_CLOUD_RELATIONSHIPS; specifying a port is usually unnecessary and often wrong.
3. Redis asynchronous freeing (lazyfree):
Adds operational guidance to request the following Redis settings via an Adobe Commerce Support ticket:
lazyfree-lazy-eviction yes, lazyfree-lazy-expire yes, lazyfree-lazy-server-del yes, replica-lazy-flush yes, lazyfree-lazy-user-del yes.
Explains the effect (offloading memory reclamation to background threads), a note that lazy-user-del makes DEL behave like UNLINK, and a warning about transient memory footprint under pressure.
4. Redis multithreaded I/O:
Adds instructions to request io-threads-do-reads yes and a tuned io-threads value via Support. Clarifies that only socket I/O and parsing are parallelized, not command execution, and includes a caution about CPU usage with guidance to benchmark and tune conservatively.
5. Client timeouts and retries:
Adds a small .magento.env.yaml snippet to increase read_timeout and connect_retries for cache clients. Clarifies this is to smooth brief congestion (e.g., many PHP workers connecting simultaneously) and explicitly states this is not a fix for persistent overload.

Links to the affected code

  • N/A (documentation-only changes).

What's New highlights

whatsnew
Added guidance for enabling stale cache on cloud via config.php; new sections on Redis lazyfree and multithreaded I/O (requestable via Support); clarified session Redis example; and added client timeout/retry guidance with an explicit overload caveat.

Copy link
Contributor

@jeff-matthews jeff-matthews left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the PR! I left a couple of minor editorial suggestions. I'll import to our internal delivery repo next. That repo includes some PR validation for .md formatting that may flag some additional superficial fixes, but I'll take care of that.

@jeff-matthews jeff-matthews self-assigned this Sep 18, 2025
@jeff-matthews jeff-matthews added internal Differentiates work between community and Adobe staff major-update Significant original updates to existing content labels Sep 18, 2025
@dshevtsov
Copy link
Contributor

@jeff-matthews the PR body must include the whatsnew tag to be detected by the automation

@dshevtsov
Copy link
Contributor

I added the tag word.
Also, the automation detects only merged PRs. But this PR is not merged probably because the Adobe CLA signed check wasn't passed.

@jeff-matthews
Copy link
Contributor

jeff-matthews commented Sep 19, 2025

No, I think it's because repo sync is broken. I created a UGP ticket. Other repos are affected.

@adobe-bot adobe-bot merged commit c23c641 into AdobeDocs:main Sep 22, 2025
1 check failed
@github-project-automation github-project-automation bot moved this from 📋 Needs Review to 🏁 Done in Commerce - Pull Requests Sep 22, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

internal Differentiates work between community and Adobe staff major-update Significant original updates to existing content

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

5 participants