Wowza Community

How to config 2 EDGE read 1 mediacache file.

Hi all,

Currenttly, I have configured my wowza-edge mediacache follow diagram:

I configured 2 edge using the same store/source mediacache. After test, in my understand when wowza write & read mediacache following:

when Edge-1 stream aaa.mp4 movie, it will check mediacache-store:

if has a cache of aaa.mp4 it will stream from mediacache-store.

if doesn’t has a cache of aaa.mp4 it will get from mediacache-source and process stream and write to mediacache-store ( 00000000.block, 00000000.media, 00000000.props).

when Edge-2 stream aaa.mp4 movie, it will check mediacache-store:

if has a cache of aaa.mp4 it will stream from mediacache-store.

if doesn’t has a cache of aaa.mp4 it will get from mediacache-source and process stream and write to mediacache-store ( 00000001.block, 00000001.media, 00000001.props).

So,to avoid duplicate data and save the store-space. How I can config when Edge-1 stream aaa.mp4 from source and write to store after that users request aaa.mp4 from Edge-2 it will read from data which Edge-1 wrote before and don’t read from source?

Could someone please point me in the right direction? Thank you so much :slight_smile:

Hi,

We would not recommend sharing the Mediacache store in this way. This will likely cause (at best) a bottleneck in your dataflow when multiple edges try to access the shared storage. The recommended policy is for each edge to have its own store local to that server. The stores are short lived and are not intended to be used as a permanent container in this type of scenario.

Paul

Hi,

Rsync would possibly help but it’s probably not the most elegant way to keep separate stores in sync. You could look at Unison as a slightly more sophisticated way to keep two separate stores in sync. It’s based on rsync and runs a daemon constantly monitoring for changes and syncing them when identified.

Paul

Thanks Paul :slight_smile:

One more question. If wowza recommend store mediacache in local. So, How I can configure Edge-2 read mediacache which syschonize from mediacache of Edge-1? You can review the scenario below: