2

I'm looking at using Redis or SQL Server for storing sessions in ASP.NET Core, and maybe some other caching needs. A few quick questions:

  1. Are there any major differences with the two?
  2. Redis is in-memory, is SQL Server also for this purpose, or does it store everything on disk?
  3. Would the SQL Server Express -version be enough
1

1 Answer 1

6

You may be able to use sql server for session state but redis is purpose built to handle the session state. A SQL based database like SQL Server is likely an overkill for session state management. From a cost of computing a session state lookup, redis will be much cheaper and faster. Redis is lightweight, low latency and more scalable.

Full disclosure, I worked in engineering both product at different times. I work on Redis in Redis Labs these days.

Sign up to request clarification or add additional context in comments.

2 Comments

Yes, but I will use a distributed cache for caching other stuff too :) Anyway, Express is quite lightweight also?
express is still sql server with a few of the wheels removed but I'd not say it is light weight. BTW - if you are looking for an option for windows you can use redis on docker. There are a few repos I'd recommend; the official redis repo: hub.docker.com/_/redis - the redis-enterprise repo (clustered redis running Redis Cloud by Redis Labs): hub.docker.com/r/redislabs/redis

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.