Casus Redis Cache as a data store?

I am developing PaaS. The app will be hosted on Azure sites. I am currently using EF / SQL as a memory cached datastore. I was planning on using the Azure Reddis cache if the application is growing and I need to split this cache into multiple instances.

As I looked more at reddis, I started to like what I saw. It was very fast and perfect for multiple objects in my domain. For example my logging model. So now I'm wondering if I can use Azure Reddis Cache as my primary data store?

The word Cash in the title worries me. Is the data clean when not in use?

While I'm at it, I think I should describe my application in a little more detail. The app is an MVC5 app. It includes the administration section of the HtmlController, but the meat of the job is in the ApiController. The ApiController will serve mostly OData Get, but I will also have my share of PUT requests. I put on request , so all user actions must be logged (perfect work for reddis).

Edit

My model has three objects and no relationship. A user that is rarely used for authentication. Logging, which is 90% "fire and forget", and "Storage", which is separated by "application key" and "group key". "Storage requests" will be requested and Odata verbs will be manually applied in memory.

Edit

After some more research, Im wondering id Azure Tables would be the best solution. This Blog was influential. Hypothetical replacement for both cache and sql.

Edit: Sent by email to Azure

So, I emailed to Azure ....

Hi Nicholas,

Your question seems to require technical support instead of billing, and subscription support as chosen.

You do not currently have a Windows Azure technical support subscription.

Note that Windows Azure has many options for getting technical support. Have you tried searching or posting your question in our community forums? The Windows Azure ecosystem provides answers to a large number of technical questions that arise frequently. In addition, if you go to WindowsAzure.com/support, you will see that we have several paid support options, and you can choose which one best suits your technical support needs.

Really? This is NOT how you make pre-sales inquiries.

+3


source to share


2 answers


You can use Redis as your primary data store, but there is always a small risk of data loss, between the time Redis receives data and the time it tries to write it to the AOF file. If the instance dies during this window, you will lose that piece of data.

Having said that, there is no clear indication that the Redis Cache incident is doing background saving or not (in simple words, writing to disk). If they don't, everything will remain in memory on the servers, meaning if you lose all servers, you will lose all data. Losing all servers is a very different scenario, but still possible.



Until further details become available, I would suggest that data could be lost from cache (volatile) and have a different type of data store (like SQL like you are now) to be safe.

UPDATE : Redis Cache does not support persistence, so the original assumption was correct.

+4


source


Here's an interesting post on the downsides of using MongoDB as your primary source instead of a relational database.

I think most of the inference occurs in your script as well.



The most important issue is that if you need or need to find connections and relationships between data, calculate metrics and extract business values ​​from data, then using solutions like Redis can cause problems because they are designed to store and retrieve SINGLE values , without links to other data.

+1


source







All Articles