<p>When I run multiple instances of WordPress on Google Kubernetes Engine and drop session affinity I get weird behavior in the cart, items disappear and come back. And people get logged out. (When I use session affinity, 100% of my traffic gets sent to one pod).</p>

<p>It seemed to be an issue of session persistence, but from what I can tell, WordPress relies on cookies to store login and cart info rather than sessions so this shouldn't be an issue. Locally when I use docker, destroy the container, and restart my cart remains so this seems to confirm that. </p>

<p>What is going on? And more importantly, what can I do to fix it?</p>

<p>It looks like woocommerce uses PHP sessions for Cart info:</p>
<p><a href="https://woocommerce.github.io/code-reference/classes/WC-Cart.html#108" rel="nofollow noreferrer">https://woocommerce.github.io/code-reference/classes/WC-Cart.html#108</a>
<a href="https://woocommerce.github.io/code-reference/classes/WC-Cart-Session.html" rel="nofollow noreferrer">https://woocommerce.github.io/code-reference/classes/WC-Cart-Session.html</a></p>
<p>By default, that data would be stored on the specific pod file system. There are ways of telling PHP in multihost environments to use a common session store.</p>
