0

We are using ElastiCache with Redis as an ASP.NET Session Store like here - https://blogs.aws.amazon.com/net/post/TxMREMF0459SXT/ElastiCache-as-an-ASP-NET-Session-Store.

We are storing lot of data in Session and we would like to know if we can compress the data and store it like we do in say SQL Server Session state db (sessionState mode="SQLServer" compressionEnabled="true")

1 Answers1

1

We also hold our ASP.NET session items in Redis.
I can't help you with the compression, but in our case for the big items we decided not to store them in session anymore, but just to cache them in Redis, using directly the Redis client - StackExchange one.
The advantage is that on the big items you will not get them from redis on every start of request and then save them at the end, so everything will be faster. You will only load the big items on demand.

Also saving them with the client allows you to treat the timeout, like maybe try again or to break in smaller pieces. With the session you only have the throwOnError parameter.

Hope this helps you.

Liviu Costea
  • 3,624
  • 14
  • 17