When a Shuffle Memcached cache is worth deploying
A shared cache is optional, and many single-server Shuffle installs will not need one. Teams that run more than one Shuffle backend or several Orborus nodes often ask whether Memcached is required. Shuffle's configuration docs list it as an optional component for a shared cache within the high availability recommendations, next to an OpenSearch cluster, NFS for shared files when several backends run, the backend and frontend scaled across all servers, and more than one Orborus node. The question is therefore not whether Memcached is part of a highly available design, but whether your topology has enough moving parts that a shared cache earns its operational cost.
The server side of Shuffle, as described in the architecture docs, consists of a frontend, a Go backend API listening on port 5001, and an OpenSearch document database. The runtime side is Orborus, which polls the backend for jobs and starts a worker for each workflow execution, and the worker then starts app containers. Count your backends and Orborus nodes against that picture. A single server running one backend and one Orborus node can usually run without a shared cache. Once you add backends behind a load balancer or a second and third runtime, confirm with Shuffle's documentation and your own test environment whether the components you run benefit from sharing cached state, and record that decision in your design before you deploy anything.
Make the decision explicit and write it down. List each backend and runtime node, state whether they share a network segment, and note which high availability items you are adopting (OpenSearch clustering, shared NFS files, multiple Orborus nodes). Then ask the Shuffle maintainers or review the configuration docs for the current cache behavior of your version, since the cache settings you need depend on the release you run. A short proof of concept with the same node count as production will show whether the added service changes behavior you care about, and it gives you a baseline to compare against when you debug cache problems later.
How the backend, Orborus workers and Memcached connect
The diagram starts at the frontend, which calls one or more backend instances on port 5001. Backends read and write OpenSearch as the document store and use a shared Memcached instance as the cache path. Orborus nodes sit on the runtime side of the trust boundary, poll the backend for jobs, and start a worker for each workflow execution, which in turn starts app containers. Check that every backend points at the same Memcached instance, and confirm which network paths cross the server and runtime boundary before you place Orborus nodes.
Frontend, backends, OpenSearch, Memcached and Orborus runtimes across the trust boundary.
Memcached options and when each fits
This table compares the four ways a team can place a shared cache for Shuffle, from no cache to an existing managed service. Read each row for the conditions that favor it, the extra failure points it introduces, and what to confirm before choosing. The main takeaway is that a cache reachable from every backend and worker host adds network dependencies that must be designed, not assumed.
| Option | When it fits | What it adds to the failure surface | What to confirm |
|---|---|---|---|
| No shared cache (single backend) | One backend instance on a single server, where caching across backends is not needed | Nothing extra to run, but no shared state if you later add backends | Whether your deployment has only one backend, and that the configuration docs need no cache setting |
| Memcached on the backend network | Several backends that can all reach the cache over the backend's internal network | One more service to restart and monitor, reachable only from backend hosts | That every backend host can resolve and reach the cache address, and the variable names in the configuration docs |
| Memcached reachable from every backend and worker host | Distributed deployments where workers on other hosts also need the cache, such as Swarm or multi-host Kubernetes | Cache is now on the path for workers across hosts, so network policy, firewall rules and DNS affect runtime behavior | Routing and firewall rules between every host, and which environment variables workers read in the configuration docs |
| Existing or managed Memcached service | An organization already operates a supported Memcached service with its own monitoring and backups | Dependency on a service owned outside the Shuffle deployment, plus its maintenance windows and access controls | Service endpoint, supported Memcached version, whether it is reachable from every backend and worker host, and who owns incident response |
| Memory and connection limits | When cache capacity or client connection counts need tuning for growing workflow volume | Undersized memory or connection limits cause evictions or connection errors that look like application faults | Current memory and connection settings in your environment, and the exact values documented in the configuration docs |
Placing Memcached in Compose, Swarm and Kubernetes
In the single-server Compose architecture, the backend, frontend, OpenSearch, Orborus and Memcached all run on one host inside the same Compose project. Memcached is a service on the internal Compose network, so the backend reaches it by service name without any exposed host port. This layout is the simplest place to start, but it gives you no failover for the cache or the backend, because every component shares one failure domain. Recovery from a host restart clears the cache along with everything else, and Shuffle must rebuild it from scratch.
- Internal service name: Point the cache address at the Compose service name, and confirm the exact setting in the configuration docs.
- No published port: Keep Memcached off the host network so that only the backend container can reach it.
- Shared failure domain: A host outage takes the cache, backend and Orborus down together, so plan restart order and recovery steps.
- Single cache instance: One Memcached container serves the one backend, so there is nothing to synchronize.
Before you go live, confirm the cache setting name in the Shuffle configuration docs and check that it matches your Compose service name exactly.
The distributed Swarm architecture spreads backend and frontend tasks across several servers, and Memcached becomes a Swarm service attached to the same overlay network as those backend tasks. Swarm's internal DNS resolves the service name to a virtual address, so every backend task reaches the same cache no matter which server it runs on. This matters because the Shuffle high availability guidance calls for a shared cache when several backends run, and a per-node cache would give each backend a different view of the same data.
- Overlay attachment: Attach Memcached to the overlay network used by the backend tasks and Orborus, not to the host network.
- No published ports: Leave the cache port unpublished so the routing mesh does not expose it outside the cluster.
- Service DNS: Backends on any server resolve the same service name, so scaling backend replicas requires no change to the cache address.
- Placement: Use placement constraints only if you need the cache on a particular server, and confirm that the chosen node has enough memory.
After scaling, test from a backend task on a different server that the cache address resolves and accepts connections. Shared files for multiple backends are a separate requirement, so confirm the NFS layout in the Shuffle architecture docs as well.
The hybrid architecture pairs Shuffle Cloud with a local Orborus that needs no inbound firewall ports. In this model, the backend, frontend and OpenSearch are run by the cloud service, so you do not operate a Memcached instance for that control plane. Where you run your own backend in a hybrid design, the cache belongs with that backend, and the local Orborus should not be treated as a cache client unless the documentation says so. Confirm this boundary before you place anything in the customer network.
- Cloud-hosted control plane: Memcached placement is a backend concern, so a cloud-run backend gives you no cache to deploy.
- Local runtime only: The local Orborus polls for jobs and starts workers, so keep its network path outbound only.
- Self-hosted backend case: If you host a backend yourself, place the cache beside it and keep it off any network reachable from outside your perimeter.
- No cross-boundary exposure: Never expose the cache port across the boundary between your network and the cloud service.
Ask your Shuffle contact to confirm in writing which components the cloud service runs and whether any cache traffic crosses into your network. The Shuffle architecture docs describe the hybrid layout in detail.
On Kubernetes, Shuffle is deployed with Helm charts, and Memcached is reached through a Service object rather than a pod address. Backend pods in the same namespace resolve the Service name through cluster DNS, so a backend that scales to several replicas keeps one stable cache endpoint. Keep the chart's Memcached settings and replica expectations to the values the chart exposes, and confirm the exact keys in the chart documentation for your release rather than copying them from older examples.
- Service discovery: The backend uses the Service name, which stays stable when cache pods restart or move between nodes.
- Helm values: Confirm the chart keys that enable the cache, set its address and size its memory, and record the chosen values in version control.
- Network policy: If your cluster enforces network policies, allow traffic from backend pods to the cache and deny other paths.
- App pods: Confirm in the chart documentation whether app containers need any cache access, since they run as separate pods.
- Scaling: Backend replicas share one endpoint, so scaling the backend does not require changing the cache address.
Before a production rollout, check the Service resolution from a backend pod and confirm the chart values against the Shuffle configuration docs and your Helm release notes.
Setting up Memcached for Shuffle step by step
This sequence adds a shared Memcached cache to a Shuffle deployment in the right order, so every backend reads from the same cache. It ends with checks that confirm the backends connect and that cached results match a non-cached run.
Confirm the high availability requirement and backend count
The platform owner counts the backend instances and confirms whether the deployment runs several backends that need a shared cache. Shuffle's configuration docs treat Memcached as optional, so a single-backend install may not need it. Write down the backend hosts, the network each one uses and the planned Orborus nodes. This step is done when the team can name every backend that will connect to the cache and explain why a shared cache is needed.
Choose the Shuffle version and image tag
The platform owner selects the Shuffle release to run and records its Docker tag before any change is made. Shuffle's docs recommend the latest tag for stable releases and the nightly tag for experimental changes, so production should pin a stable tag. Check the Shuffle GitHub releases page for release notes that mention cache or configuration changes. This step is done when the same tag is recorded for every backend and the Orborus nodes.
Deploy Memcached on a network every backend reaches
The infrastructure team runs Memcached on a host, container or service that all backend instances can reach over the network. Place it on the internal network used by the backends, not on a network that only one backend can see. Limit access with firewall rules or network policy so only the backend hosts can connect. Test reachability from each backend host with a basic network check. This step is done when each backend host can open a connection to the Memcached address.
Set the Memcached address in backend configuration
The platform owner adds the Memcached address to the backend configuration on each instance, using the setting name listed in Shuffle's configuration docs. Confirm the exact key name for your release before editing, and use the same address on every backend. Keep the
SHUFFLE_ENCRYPTION_MODIFIERvalue unchanged, because changing it breaks saved app authentications. This step is done when the configuration files or environment settings match on all backends and the setting is recorded in version control or the change record.Restart backends in a planned order
The platform owner restarts one backend at a time so at least one backend keeps serving requests during the change. Check the frontend and load balancer health after each restart before moving to the next backend. Restart the Orborus nodes only after the backends are healthy, so runtimes reconnect to a working API. Record the restart order and the time of each restart in the change log. This step is done when every backend reports healthy and the frontend loads through the load balancer.
Verify backend connections in logs
The operator reads the backend logs after the restart and looks for a clear message that the backend connected to Memcached. Repeat the check on every backend, since one misconfigured instance can serve stale or missing data without an obvious failure. Also check for repeated connection errors or timeouts in the same logs. The exact log wording depends on the release, so compare it against the logs from a backend that you know works. This step is done when every backend logs a successful connection and no connection errors appear during a short observation period.
Confirm results with a repeat workflow run
The security engineer runs a test workflow that uses a known input and records its output and execution time. Then the engineer runs the same workflow again, and compares the second result with a run from before Memcached was enabled or from a run with the cache removed. The outputs should match, since the cache should change speed and load, not results. If outputs differ, disable the Memcached address on one backend and repeat the test to isolate the cause. This step is done when repeated runs return the same results across backends and the team has a saved test record.
Security controls for the Memcached network path
Memcached sits between Shuffle's backend and its workers, so it can be reached by systems that should never touch it. The controls below keep the cache private, keep sensitive material out of it, and make changes to it visible. Each one is a check you can confirm in your own environment before the cache goes into production.
Keep Memcached on the backend network
Place Memcached on the same private network segment as the Shuffle backend and bind it to that interface only. It should have no public address, no load balancer listener and no route from user-facing networks. Confirm the listening address on the host and test from a workstation outside the backend network, where the connection should fail.
Configuration docsAssume cached values are readable
Memcached stores values in memory without any encryption or access control beyond network reachability. Treat anything written to the cache as readable by anyone who can reach the port. Before you go live, ask the vendor and your own configuration to confirm exactly which data Shuffle writes to the cache, and keep credentials, tokens and personal data out of any value you add.
Restrict firewall rules between zones
Write firewall rules that allow only the backend and worker hosts that need the Memcached port to reach it, and deny everything else, including other tenants or lab networks on the same hypervisor. If Orborus runs in a different network zone, open the path deliberately and record the rule with its owner. Review these rules after any change to the network layout.
Keep saved credentials encrypted in OpenSearch
Saved app credentials and API keys are stored in OpenSearch, encrypted with AES-256 using the SHUFFLE_ENCRYPTION_MODIFIER secret, so they should not depend on Memcached for protection. Store that secret in your secrets manager, back it up under restricted access, and never place it in the cache. Losing or changing it breaks every saved app authentication.
Review cache access logs
Collect logs from the Memcached host and from the firewall that guards its port, and review connection attempts from unexpected source addresses. Compare them against the list of backend and worker hosts you approved. Confirm with your logging platform that these events are retained long enough for your incident response process to use them.
Apply change control to the cache host
Manage the Memcached host and its version, configuration and memory limits through the same change process as other production services. Record who changed a setting, when, and why, and test changes in a non-production copy first. Restart or patch windows should be coordinated with the backend, since a change to the cache affects every node that uses it.
Debugging stale results and cache misses in Shuffle
When Memcached misbehaves in a Shuffle deployment, the symptoms usually reach the operator before the cause does. Common reports include a workflow still showing data from before an edit, two backends returning different results for the same request, slow responses right after a Memcached restart, and connection errors in backend logs. Treat each report as a question about which backend, which network path and which cache state produced the answer. Start by writing down which backend served each request, the time, and whether the workflow or app data had changed recently, so you can compare evidence instead of guessing.
Work through the method in a fixed order. First, compare backend logs across every node that runs the Shuffle backend, looking for Memcached connection failures, timeouts or retries at the same time the bad result appeared. Second, check network reachability from each backend host to the Memcached port (the default is set in your deployment, so confirm it against your configuration), using a simple TCP test from inside the backend container, not from the host. Third, restart one backend at a time rather than the whole set, and confirm after each restart whether the disagreement clears. Confirm exact log messages, cache key formats and any flush or invalidation commands against the installed version, because these change between releases and the Shuffle configuration docs are the place to check.
Finally, reproduce the problem outside production. Run the same workflow with the cache enabled and with it disabled in a non-production environment that mirrors your node count and network layout. If results match only when the cache is off, the fault sits in cache behavior or placement. If they differ in both modes, look at the OpenSearch data path, since the cache is not the source. Record each test, the version, and the configuration values used, so a fix can be reviewed and repeated before it reaches production.
Limits to confirm before you rely on the cache
The cache is only as dependable as the settings, versions and failure behavior behind it. Each item below is a question to settle with the Shuffle maintainers or in a staging test before any production workflow depends on Memcached.
Memory and connection settings
Confirm the memory allocation and maximum connection count Shuffle expects from Memcached, and where the backend and workers read the cache address. Ask the maintainers whether the configuration settings cover every component that connects, including workers in other network zones. Then load-test with your expected execution volume and watch for connection errors. Undersized memory evicts entries silently, so a test that only confirms startup proves little.
Configuration docsShuffle release in use
Record the exact Shuffle release and image tag your team runs before you test the cache. The v2.3.0 release was published on September 28, 2026, and the docs recommend the latest Docker tag for stable use and the nightly tag for experimental changes. A cache setup validated on nightly may not match a stable install, so confirm the tag in your compose file or Helm values and repeat the test after every upgrade.
Shuffle releasesMemcached version compatibility
Confirm that the Memcached version you plan to deploy works with your Shuffle release. Ask the maintainers for a list of tested cache versions before you choose an image tag. Pin the Memcached version, run a smoke test that writes and reads a cached value from a worker, and record the result. Avoid floating tags such as latest for the cache, because a silent image change can alter behavior after a restart.
Behavior when the cache is down
Decide what you expect when Memcached is unreachable: whether Shuffle falls back to reading from OpenSearch, slows down, or fails executions. Ask the maintainers to describe the fallback path for each component that reads the cache. Then stop the Memcached container during a test run of a multi-step workflow and record what happens to each step, the logs and any operator alerts. Treat any undocumented fallback as a failure until it is tested.
Cache restarts and running executions
Find out whether restarting Memcached interrupts workflows that are already running, and what data is lost. Ask whether any execution state lives only in the cache, or whether workers can recover it from the database. Test by starting a long workflow, restarting the cache, and comparing the final execution record with a run that was not interrupted. Schedule cache restarts outside active investigations until the answer is known.
What the paid tier enforces
Confirm which scaling limits apply on the open-source edition and what a paid license changes for multiple backends or runtimes. Since the release that began enforcing edition limits, a cache design that adds backend or worker replicas may hit a restriction in production. Ask the maintainers in writing which settings a paid tier changes, whether Memcached support is included, and how each limit is counted.
- Limits enforced since
- v2.1.1
Questions teams ask before adding Memcached to Shuffle
Is Memcached required to run Shuffle on a single server?
No. Memcached is optional for a single-server Shuffle install, according to the Shuffle configuration docs, which describe it as a shared cache for setups that run more than one backend. A single Docker Compose host with one backend typically runs without it. Adding Memcached only makes sense once you run several backends or want a shared cache across nodes, and you should confirm the current guidance for your Shuffle version in the configuration docs before changing the design.
What does a Memcached deployment for Shuffle cost?
Cost comes from the people doing the work, the infrastructure you run it on, and any follow-on support. Memcached itself is open source, so there is no license fee for the cache. The main cost drivers are the number of backends and network zones, whether Docker Compose, Swarm or Kubernetes is the target, how much of the surrounding stack (OpenSearch, NFS, load balancing) must be reviewed at the same time, and how much testing you want before cutover. Ask for a fixed-scope quote that lists each environment, the deliverables, and what is one-time versus recurring, such as patching or retesting after Shuffle upgrades. DeployOpen does not publish a price list, so the quote follows from the written scope.
How long does it take to set up Memcached for Shuffle?
No duration is published, and the time depends on scope. The main variables are how many backend and worker nodes need to reach the cache, how many network zones are involved, whether firewall changes need approval, and which orchestrator you run. A single-host Compose change with one backend is a much smaller job than a multi-zone Kubernetes rollout. Ask for a timeline in the written scope that breaks the work into design, build, testing and cutover, and note which steps depend on your change windows.
What must our team provide before a Memcached engagement starts?
Prepare four inputs so the scope can be fixed in writing:
- An architecture diagram showing backends, Orborus runtimes, OpenSearch nodes and the network zones they sit in
- The network rules that currently allow or block traffic between those components
- The exact Shuffle version and Docker tag you run, since the docs recommend pinning versions
- A change window and a named approver for production changes
If you also run a shared file store or a load balancer, include their configuration so the cache design fits the whole cluster.
Can an internal team set up Memcached for Shuffle without a partner?
Yes, if your team already runs Docker or Kubernetes, understands Shuffle's backend and Orborus layout, and can test network paths between components. The work itself is not large, but mistakes show up as intermittent behavior: stale data, failed lookups after a restart, or workers that cannot reach the cache from another zone. A partner is most useful when the environment spans several zones, the team has no one who has run Shuffle clusters before, or you need a documented, tested change for an audit. Decide based on your team's capacity to test and roll back, not only on the install steps.
Which problems should we check first when Shuffle cache behavior looks wrong?
Start with connectivity, then configuration, then application logs. Confirm that each backend can open a connection to the Memcached port from its own network zone, because a blocked path often looks like slow or missing results rather than a clear error. Next, check that every backend points at the same cache address and that no node still uses an old value after a change. Finally, review Shuffle backend logs for cache errors during workflow runs, and compare behavior before and after a restart. Record each finding so the fix can be repeated in your next upgrade.
What changes in Shuffle security when we add Memcached?
Memcached adds a network service that holds cached data, so its exposure matters. Keep it on a private network segment reachable only by Shuffle backends, and do not publish its port outside that segment. Review what Shuffle stores in the cache and confirm that secrets such as the encryption modifier are not cached in a way that spreads them to other systems. Shuffle encrypts saved app credentials in OpenSearch with the SHUFFLE_ENCRYPTION_MODIFIER setting, so that key must stay protected whatever cache design you choose. Ask whoever runs your security review to confirm the network and data-handling rules before rollout.
How DeployOpen scopes and delivers Shuffle caching work
DeployOpen plans, implements, hardens, documents and supports self-hosted open-source platforms inside your own infrastructure. For Shuffle caching, that means deciding with your team whether Memcached is needed, placing it where your workers can reach it, and handing over settings and runbooks your operators can maintain.
How we scope
- Engagements are fixed-scope, with the Memcached deployment target, network zones and worker layout agreed in writing before work starts.
- The written scope names which Shuffle deployment architecture you run and whether Memcached is needed for your backend replicas.
- Scope records memory, connection and firewall requirements you will confirm with your platform and security teams before build.
How we build
- We deploy Memcached for your Docker Compose, Swarm or Kubernetes layout and connect the Shuffle backend to it.
- We place the cache so backend and worker traffic stays on the internal network, and we verify reachability from each runtime location.
- We test cache behavior during backend restarts and document what happens to sessions and cached data when the cache is unavailable.
How we hand over
- You receive the deployed configuration, network rules and memory and connection settings with the reasons for each value.
- Runbooks cover checking cache health, reading backend logs for cache errors and restarting Memcached safely.
- Knowledge transfer sessions walk your operators through the debugging steps we used during the build and testing.
How we support
- Ongoing support, version upgrades and continuous testing are available as retainers after handover.
- Retainers can cover cache changes when you add backend replicas, change Shuffle versions or move to a new cluster.
- Support requests are handled against the agreed scope, and any new cache work is scoped and quoted in writing first.

