What is Azure REDIS Cache? How to use it? When to use and when not to use it? Can I use it for a simple c# application which accesses data from MS-SQL server?
What is best source to get started with Azure Redis cache?
Azure Redis Cache offering is a Software as a service (SAAS) offering of the opensource Redis cache. You should be able to get started with the resource below:
https://azure.microsoft.com/en-in/services/cache/
https://azure.microsoft.com/en-in/documentation/services/redis-cache/
http://redis.io/documentation
There is good support for C# via 'StackExchange.Redis' nuget package. However, please explore if your application needs or will benefit from a cache solution before you get to the implementation.
Azure Cache for Redis provides an in-memory data store based on the Redis software. Redis improves the performance and scalability of an application that uses backend data stores heavily
In my application I have stored around 5 millions key/value data with each key containing around 800 records in json format under Redis cache. Called the Redis using stackexchange library(1.2.6) since the application does not support the latest version
You can go through the below links
https://learn.microsoft.com/en-us/azure/azure-cache-for-redis/cache-overview
https://learn.microsoft.com/en-us/azure/azure-cache-for-redis/cache-redis-samples
Related
Currently, My web application is on Redis db(all database). it's required more than 4 GB RAM which is cost me a lot.
I want to migrate some part of my application into permanent storage DB(SQL, mongo...)
So, Can anyone tell me which is the best choice(SQL, mongo...)?
Technology stack of my application:
nodejs(express)
angularjs
redis
It really depend on your design. Is your data highly relational? Redis is considered a NoSQL technology so I guess MongoDb would be somewhat similar but implementation will be file-based instead of key-value set. If you need your data to have strong relationship between each data set then SQL family is designed for exactly that, but a lot of work is needed to build the tables first and then separate the data.
I have an application having more than 2 TB of data to be stored in cache, the data will be accessed using NodeJS APIs. For a NodeJS app which would be a better choice, Hazelcast or Redis(or RedisLabs)? Considering following criteria?
NodeJS API Support, including connection pooling. Looks like HazelCast doesn't have NodeJS API
I understand that in benchmarking Hazelcast is faster due to multithreaded implementation, and its scalable as well. But can we effectively leverage these good features using NodeJS(need Set datastructure)? Lastly, we can have multiple shards in RedisLabs which will be like having multiple threads or processes working on their respective chunk of data, in that case I believe the Hazelcast's edge due to multi-threaded nature would be true for Redis but not for RedisLabs, Any comments in this?
Hazelcast Node.js client in fact does exist and currently provides following features
implementation of Open Client Binary Protocol, Redis uses text-based protocol
Map
Get
Put
Remove
Smart Client - clients connect to each cluster node.
Since each data partition uses the well known and consistent hashing algorithm, each client can send an operation to the relevant cluster node, which increases the overall throughput and efficiency. The client doesn't need to be restarted in case of adding or removing nodes from the cluster.
Distributed Object Listener
Lifecycle Service
In terms of comparing Hazelcast and Redis server-side features, you find comprehensive doc here.
Thank you
Well, I would suggest if you are using very complex data handling/processing you should go with HazelCast, and by nature nodejs is single threaded so if you are using it just to store key-value dont go with it.
There is official API you can use for (NodeJS + hazelcast) but with very limited functionality, uses only KeyVal
If you are just using cache as key-value store Redis is good, fast, FREE!, it can handle huge data as well with some extra setup take look at
http://redis.io/topics/partitioning
in terms of support pricing RedisLabs are less costly and if you use Redisson with Redis it can give you all data structure which Hazelcast use :)
BitSet, Set, Multimap, SortedSet, Map, List, Queue, BlockingQueue, Deque, BlockingDeque, Semaphore, Lock, AtomicLong, CountDownLatch, Publish / Subscribe, Bloom filter, Remote service, Spring cache, Executor service, Live Object service, Scheduler service
RedisLabs is having much more userbase + contributors, HazelCast is bit less if you comapre users, so if your data is 2TB if its just key-value .. Redis be best
I am currently working on a ASP.NET MVC application.Currently it is using AppFabric for storing session and cache data.But Microsoft has stopped support for AppFabric.Microsoft is using Redis for cache management and is supported by Azure.
What is the difference between AppFabric and Redis in terms of speed,size of data and performance?How Redis is different than AppFabric?
According to the following post, "Mainstream Support will be provided until 4/11/2017 and Extended Support until 4/12/2022."
http://blogs.msdn.com/b/appfabric/archive/2015/06/19/appfabric-1-1-for-windows-server-support-lifecycle-extension-4-11-2017.aspx
This means you are not without support yet. However, Microsoft does recommend that all application using AppFabric should migrate to Redis Cache. See this entry in MSDN for Cache Recommendations.
https://msdn.microsoft.com/en-us/library/azure/dn766201.aspx
How is Redis better/different than AppFabric...
First, AppFabric was actually contained a number of technologies including, Service Bus, Access Control Service, and Caching
see also: Azure AppFabric vs. Server AppFabric - today
Second, from a caching perspective, AppFabric was more closely aligned with .Net. Redis as an Open Source NoSQL database store is usable by a broad set of technologies including Python, Ruby, Java, PHP, Node, C, C#.
Third, since its keys can store data structures like strings, hashes, lists, sets, sorted sets, bitmaps, and hyperloglogs, it is generally more flexible than other caching solutions.
There is a migration guide here, if you want to see what might be involved with moving to Redis Cache.
https://msdn.microsoft.com/en-us/library/azure/dn690524.aspx
I recently wanted to process some large data in nodejs and then put them into mongodb, at first I tried to process data in memory (javascript arrays),but when I decide to use node cluster, I figured out that by using node cluster it is not good way to use cache object. however, it seems impractical solution to store data in arrays even for short time. I think it would be better to store it in some memory databases such as redis.
so my first question is whether I can use redis via node cluster or not? and whether redis is the best solution or not?
thanks in advance.
When using the cluster module, an external data store is by far the simplest way of sharing state. Think of each worker as an individual client accessing the data store. Redis happens to be perfectly fit for the job, but the same can be said for just about any database. For short term storage, redis and memcached are both popular solutions. For arrays, redis beats memcached because it has an array like type that you can push to and pop from.
An extremely popular library for Node.js connecting to redis is node-redis. I've personally used it and highly recommend the API.
New to node coming over from asp.net so was curious about the best modules/frameworks to implement caching in node.js. I would like to cache some expensive db queries so looking for an easy way to cache db results or entire http page output to memory.
In .net it would be using either httpcache or page output caching. Is there an equivalent in the node world?
Should I just set up a local memcached or redis server to accomplish this?
If you are using express then there is a settings option for enabling view cache, also since express is built on top of connect you can try to look at connect-cache module. For caching static stuff you can take a look at node-static for example. Caching database queries in memcached or redis may be highly dependent on your data structure, but I would probably choose redis since it supports more advanced data structures which may be handy.