Comments (4)
@564064202 I believe you are asking for an API that you can call to release the lock for a given session. Is that correct? Also, can you please explain why you want such an API? What is the scenario?
from aspnet-redis-providers.
@JonCole
A lot of people has this question about why there is locking of session in every request.
We need a no locks option. We found that locking sometimes leads to a cascading event were many servers end up waiting on the same session to unlock.
I just discovered that every request in an ASP.Net web application gets a Session lock at the beginning of a request, and then releases it at the end of the request!
In case the implications of this are lost on you, as it was for me at first, this basically means the following:
Anytime an ASP.Net webpage is taking a long time to load (maybe due to a slow database call or whatever), and the user decides they want to navigate to a different page because they are tired of waiting, THEY CAN'T! The ASP.Net session lock forces the new page request to wait until the original request has finished its painfully slow load. Arrrgh.
Anytime an UpdatePanel is loading slowly, and the user decides to navigate to a different page before the UpdatePanel has finished updating... THEY CAN'T! The ASP.net session lock forces the new page request to wait until the original request has finished its painfully slow load. Double Arrrgh!
So what are the options? So far I have come up with:
Implement a Custom SessionStateDataStore, which ASP.Net supports. I haven't found too many out there to copy, and it seems kind of high risk and easy to mess up.
Keep track of all requests in progress, and if a request comes in from the same user, cancel the original request. Seems kind of extreme, but it would work (I think).
Don't use Session! When I need some kind of state for the user, I could just use Cache instead, and key items on the authenticated username, or some such thing. Again seems kind of extreme.
I really can't believe that the ASP.Net Microsoft team would have left such a huge performance bottleneck in the framework ! Am I missing something obvious? How hard would it be to use a ThreadSafe collection for the Session?
from aspnet-redis-providers.
from aspnet-redis-providers.
The way the question was phrased, it sounded like this was something else, thus the request for clarification. There is already an issue (#21) tracking support for a lock-free solution. We will continue the discussion on that thread rather than having multiple for the same topic. Note that we have been in discussion with the ASP.NET team and about this topic and we will provide a path forward as soon as possible.
from aspnet-redis-providers.
Related Issues (20)
- v5 - Microsoft.Web.Redis.ISerializer is not available any more HOT 39
- Incorrect assembly version on RedisSessionStateProvider 5.0.0 HOT 1
- RedisSessionStateProvider 5.0.0 is not tagged, is missing release notes, and breaking change documentation HOT 3
- 5.0.0 Breaking Change - Why Change Cache Key Names? HOT 2
- Exception: The specified value is not valid in the 'SslProtocolType' enumeration HOT 3
- NullReferenceException HOT 3
- RedisSessionstate Provider gives more Response Size while saving 25kb file data in session HOT 1
- Azure Cache for Redis giving Large response size than the key size stored in the cache causing the timeout issue. HOT 1
- Breaking Change: Microsoft.Web.Redis.ISerializer not present in v5.0.0 HOT 1
- Web project not able to start after upgrade to v5 HOT 3
- Merge development with AspNetSessionState repository
- RedisSessionStateProvider - Bump Microsoft.AspNet.SessionState.SessionStateModule PackageReference from 1.1.0 to 2.0.0 HOT 1
- Buffer cannot be null error accessing session HOT 10
- ArgumentNullException: Buffer cannot be null. Parameter name: buffer HOT 2
- NewRelic shows multiple REDIS EVAL calls - Sluggish Performance HOT 2
- Microsoft.Web.Redis.RedisSessionStateProvider tries to connect to server:15000 HOT 3
- Empty catch swallowing serialization errors HOT 1
- Version 5.0.3 Missing/Unreleased HOT 6
- RedisOutputCacheProvider Serialization broke in version 4.0.1
- Frequent timeout errors with session state provider
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from aspnet-redis-providers.