ASP.NET Interview Questions on web farm and web garden



What does the term Scalability mean?

Web applications that serve a large number of users or that present large amounts of data need to able to add capacity as users’ demands increase. The ability to add capacity to an application is called scalability. ASP.NET Web applications support this concept through their ability to run in multiple processes and to have those processes distributed across multiple CPUs and/or multiple servers.

What is the difference between a web farm and a web garden?
A Web application running on a single server that has multiple CPUs is called a Web garden in the ASP.NET documentation. A Web application running on multiple servers is called a Web farm.

If your web server has multiple processors, how can you specify that ASP.NET runs on all or some of the CPUs?
If your server has multiple processors, you can specify that ASP.NET runs on all or some of the CPUs by setting the webGarden attribute of the processModel element in the server’s Machine.config file

What are the implications on Application and Session state variables in a web farm or a web garden?
In both a Web garden and a Web farm, client requests are directed to the ASP.NET process that is currently least busy. That means that a single client can interact with different CPUs or servers over the course of his or her session. This has the following implications for Application and Session state variables:

Application state variables are unique to each separate instance of the Web application.
Clients can share information through Application state if the Web application is running on a Web garden or a Web farm.

Session state variables are stored in-process by default.
To enable Session state in a Web garden or Web farm, you need to specify a Session state provider.

How can you share Application State in a web farm or a web garden?
To share data across multiple sessions in a Web garden or Web farm, you must save and restore the information using a resource that is available to all the processes. This can be done through an XML file, a database, or some other resource using the standard file or database access methods.

What are the two built-in ways provided by ASP.NET to share Session state information across a Web garden or Web farm?
ASP.NET provides two built-in ways to share Session state information across a Web garden or Web farm. You can share Session state using:

A state server, as specified by a network location
This technique is simple to implement and doesn’t require you to install Microsoft SQL Server.
A SQL database, as specified by a SQL connection
This technique provides the best performance for storing and retrieving state information.

What are the steps to follow to share Session state information using a state server?
To share Session state information using a state server, follow these steps:
1. In the Web application’s Web.config file, set the sessionState element’s mode and stateConnectionString attributes.
2. Run the aspnet_state.exe utility on the Session state server. The aspnet_state.exe utility is installed in the \WINDOWS\Microsoft.NET \Framework\version folder when you install Visual Studio .NET Professional or Visual Studio .NET Enterprise Architect editions.

What are the steps to follow to share Session state information using a SQL database?
To share Session state information using a SQL database, follow these steps:
1. In the Web application’s Web.config file, set the sessionState element’s mode and sqlConnectionString attributes.
2. Run the InstallSqlState.sql utility on the Session state server. This utility installs the SQL database that shares Session state information across processes. The InstallSqlState.sql utility is installed in the \WINDOWS\Microsoft.NET \Framework\version folder when you install Visual Studio .NET Professional, Visual Studio .NET Enterprise Developer, or Visual Studio .NET Enterprise Architect editions.

6 comments:

  1. Thanks Venkat

    ReplyDelete
  2. I'll surely make this as my homepage

    ReplyDelete
  3. that brillian and i am thankful for ur achivement.

    ReplyDelete
  4. Great Job Venkat! Keep it up!

    ReplyDelete
  5. Application state variables are unique to each separate instance of the Web application.
    Clients can *** ** share information through Application state if the Web application is running on a Web garden or a Web farm.????? Looks like missing "NOT BE" at *s.

    ReplyDelete

If you are aware of any other asp.net questions asked in an interview, please post them below. If you find anything missing or wrong, please feel free to correct by submitting the form below.

 
Disclaimer - Terms of use - Contact Us