I’m working on an e-commerce site using ASP.NET and I’m trying to figure out the best way to handle session data like shopping carts. I’ve mostly worked with intranets before, so I’m not sure what’s best for a public-facing site.
I know there are a few options:
State-Server session
SQL Server session
Custom database session
Cookies
Has anyone here used these methods for large-scale public websites? What worked well? What didn’t? Any lessons learned or recommendations?
I’m not considering in-proc sessions since they don’t scale well. Any insights would be super helpful!
I’ve implemented custom database sessions for a high-traffic e-commerce platform, and it proved to be the most flexible solution. It allowed us to tailor the session management to our specific needs, including seamless integration with our existing database infrastructure. We could optimize queries, implement custom caching strategies, and easily extend functionality as the business requirements evolved. The main trade-off was increased development time upfront, but the long-term benefits in terms of performance and scalability were significant. If you have the resources, I’d recommend exploring this option, especially if you anticipate complex session data or need fine-grained control over session persistence and retrieval.
Ooh, e-commerce session management, that’s a juicy topic! Have you thought about using a distributed cache like Redis for your session storage? It’s super fast and can handle tons of concurrent users without breaking a sweat.
I’m curious, what kind of products are you selling? The nature of your inventory might influence your session strategy. Like, if you’re dealing with limited stock items, you might want something that can handle reservation timeouts smoothly.
Also, have you considered the user experience angle? Sometimes a mix of approaches works best - like using cookies for essential info and a backend solution for the heavy lifting.
What’s your traffic looking like? Are we talking hundreds or millions of daily visitors? That could really sway your decision too!
Let us know more details about your project. I’m sure the community here has loads more advice to share once we know the full picture!
hey dancingbutterfly, i used sql server session on a large ecommerce site and it wass great, reliable and scalable. performance can dip with heavy trafic though. custom db sessions offer more control. cookies are basic with small storage. hope this helps!