Friday, August 19, 2016

State Management



Advantages of Client – Side State Management: 

Better Scalability
  • With server-side state management, each client that connects to the Web server consumes memory on the Web server. If a Web site has thousands of simultaneous users, the memory consumed by storing state management information can become a limiting factor. Pushing this burden to the clients removes that potential bottleneck.
Supports multiple Web servers

  • With client-side state management, you can distribute incoming requests across multiple Web servers because the client provides all the information the Web server needs to process the request. With server-side state management, if client switches servers in middle of the session, the new server does not have client’s state information. 
  • Solution : You can use multiple servers with server-side state management, but you need either intelligent load-balancing (to always forward requests from a client to the same server) or centralized state management (where state is stored in a central database that all Web servers access). 

________________________________________________________________________

Advantages of Server – Side State Management:
Better security
  • Client-side state management information can be captured (either in transit or while it is stored on the client) or maliciously modified. Therefore, you should never use client-side state management to store confidential information, such as a password, authorization level, or authentication status. 
Reduced bandwidth

  • If you store large amounts of state management information, sending that information back and forth to the client can increase bandwidth utilization and page load times, potentially increasing your costs and reducing scalability. The increased bandwidth usage affects mobile clients most of all, because they often have very slow connections. Instead, you should store large amounts of state management data (say, more than 1 KB) on the server. 

No comments:

Post a Comment