<p>I am working on moving a application which require near real time exchange of data between processes running in multiple containers in kubernetes cluster.
I am thinking of using redis cache for this purpose. </p>

<p>The type of data that needs to be exchanges are simple types like double,string values. The frequency of exchange needs to near real time(sub seconds)</p>

<p>are there any other more performant mechanisms available for exchanging data between containers hosted in kubernetes environment?</p>

Vijay
<p>This is hugely complex question with way more nuance than can fit in here. It very much depends on the object sizes, uptime requirements, cluster scale, etc. I would recommend you try all of them, evaluate performance, and analyze failure modes as they apply to your use case.</p>

<p>Some things you can try out:</p>

<ul>
<li>Redis</li>
<li>Memcached</li>
<li>Local files with mmap</li>
<li>Network block device with mmap</li>
<li>NFS with mmap</li>
<li>All three of the above with RocksDB</li>
<li>Postgres</li>
<li>Kafka</li>
</ul>

<p>On the encodings side evaluate:</p>

<ul>
<li>JSON (don't use this, just for baseline)</li>
<li>ProtocolBuffers</li>
<li>CapnProto</li>
<li>Msgpack</li>
<li>Maybe BSON?</li>
</ul>
