# Replay buffer - simple how-to question

**URL:** <https://discuss.ray.io/t/replay-buffer-simple-how-to-question/3728>\
**Category:** RLlib\
**Created:** [October 5, 2021, 3:51pm UTC](https://discuss.ray.io/t/replay-buffer-simple-how-to-question/3728 "2021-10-05T15:51:23Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Mike](https://sea2.discourse-cdn.com/flex020/user_avatar/discuss.ray.io/mike/32/1580_2.png) [@Mike](https://discuss.ray.io/u/Mike)\
**Post date:** [October 5, 2021, 3:51pm UTC](https://discuss.ray.io/t/replay-buffer-simple-how-to-question/3728/1 "2021-10-05T15:51:23Z")

</div>

Hello,  
I’m a bit lost reading the documentation so I thought I could ask a simple question here if you may.

I have a simple task which is to store experience tuples (S, A, R, S′) as weel as models into a replay buffer and eventually sample them (using any existing approaches if any at all)  
I can’t find the right way to do it ☹  
Also, I’d like this replay buffer to be shared accross multiple nodes and stored somehow so that I can reload it later.

Does it make any sense?

nb: I’m using pytorch

---

<div class="post-metadata">

**Author:** ![mannyv](https://sea2.discourse-cdn.com/flex020/user_avatar/discuss.ray.io/mannyv/32/606_2.png) [@mannyv](https://discuss.ray.io/u/mannyv)\
**Post date:** [October 7, 2021, 12:56pm UTC](https://discuss.ray.io/t/replay-buffer-simple-how-to-question/3728/2 "2021-10-07T12:56:27Z")

</div>

Hi @Mike,

Welcome to the forums. I am not sure how to go about answering your question because I am not sure what you are trying to do.

Are you planning on using on of the built in algorithms or implement your own algorithm from scratch?

Can you provide more information on your bigger picture plan?

---

<div class="post-metadata">

**Author:** ![Mike](https://sea2.discourse-cdn.com/flex020/user_avatar/discuss.ray.io/mike/32/1580_2.png) [@Mike](https://discuss.ray.io/u/Mike)\
**Post date:** [October 7, 2021, 1:01pm UTC](https://discuss.ray.io/t/replay-buffer-simple-how-to-question/3728/3 "2021-10-07T13:01:27Z")

</div>

Hi @mannyv ,  
From scratch. All I’m interested in right now is a distributed and persistent replay buffer.

Thanx.
