I would like to write a simple phoenix app that I can post JSON to. The app should hold on to the JSON and return it to me when I ask for it. I would like to be able to update this JSON from time to time.
I think I should use ETS for this.
I only have 4-5 blobs of JSON to store, but they will be accessed from millions of clients.
I was reading documentation here: https://hexdocs.pm/plug/Plug.Session.ETS.html#content It says:
We don’t recommend using this store in production as every session will be stored in ETS and never cleaned until you create a task responsible for cleaning up old entries.
Also, since the store is in-memory, it means sessions are not shared between servers. If you deploy to more than one machine, using this store is again not recommended.
So, my question: how can I use ETS without violating the recommendation above. Also, how can I ensure that I don’t run into the problem information being shared between nodes.
Thanks.