- Stateless web servers behind a smart load balancer.
- Avoid session state (or if you can’t avoid it, use distributed cache rather than a database).
- Use a CDN to edge-cache static file assets (images and scripts).
- Use .NET 4.5’s async support to avoid blocking calls.
AVOID SESSION STATE
It's often not practical in a real-world cloud app to avoid storing some form of state for a user session, but some approaches impact performance and scalability more than others. If you have to store state, the best solution is to keep the amount of state small and store it in cookies. If that isn't feasible, the next best solution is to use ASP.NET session state with a provider for distributed, in-memory cache. (See “ASP.NET session state using a cache provider,” in the upcoming Module 12, “Distributed Caching.”) The worst solution from a performance and scalability standpoint is to use a database-backed session state provider.
No comments:
Post a Comment