Se7en
Se7en

Reputation: 400

Redis - different persistence depending on data

I am currently evaluating Redis for the needs of a web application I am creating.

I don't need the features of a relational database but a small subset of the data will need to be persistent on disk and no loss of that small subset of data should ever occur.

Is there a way to define which Key-Value pairs are persistent on disk and which are not? Or is this an all or nothing setting for the whole database?

If this is a universal setting for the whole database, what is the best alternative to get what I want?

Is it easy to have 2 instances of Redis on the same server, so I can have full persistence on one instance and no persistence on another?

Or would it be better to use a different kind of database for that persistent data? (reads/writes for these data will usually not be anywhere as much as the rest of the data)

My aim is speed while keeping it as simple as possible.

Thanks!

Upvotes: 1

Views: 192

Answers (1)

Karthikeyan Gopall
Karthikeyan Gopall

Reputation: 5679

Different instance will be the best option.

Benefits :

  1. Simple and clear seperation and maintenance of data
  2. Request traffic is divided among the instances
  3. You can configure other instances like an lru cache without worrying to have lost important data.

Upvotes: 2

Related Questions