adsense

.Any thing on your mind

Thursday, 2 January 2014

Web server client architecture

Web server basics
Client/server architectures
In a client/server architecture, the client computers typically request services such as printing, information retrieval and database access from the server which processes the clients’ requests.
The computers that perform the server function usually have more memory and larger, faster disk drives than the client computers they serve.
  The main job of a Web server computer is to respond to requests from Web client computers.
  Three main elements of a Web server:
 1.  Hardware (computers and related components)
  2.  Operating system software  
  3.  Web server software
  All three of these elements work together to provide sufficient capacity in a given situation.
  Web sites are developed by estimating the number of visitors a business expects to have:
How many pages those visitors will view during an average visit
How large those pages will be (including graphics and other page elements)
Maximum number of simultaneous visitors
  In the early days of electronic commerce, Web sites were collections of individual pages about the site’s product or service offerings. Today, Web sites produce pages in response to customers’ specific needs.
Dynamic Content Generation
A dynamic page is a Web page whose content is shaped by a program in response to user requests whereas a static page is an unchanging page retrieved from a file on a Web server.
On a Web site that is a collection of HTML pages, the content on the site can be changed only by editing the HTML in the pages.
This is cumbersome and does not allow customized pages to be produced in response to specific queries from site visitors.
Dynamic content is non static information constructed in response to a Web client’s request.
The text, graphics, form fields, and other Web page elements can change in response to user input or other variables.
  Dynamic content can be created using two basic approaches:
   
  Client-side scripting: software operates on the Web client (the browser) to change what is displayed on the Web page in response to a user’s actions (such as mouse clicks or keyboard text input).
In client-side scripting, changes are generated within the browser using software such as JavaScript or Adobe Flash.
The Web client retrieves a file from the Web server that includes code (JavaScript).
The code instructs the Web client to request specific page elements from the Web server and dictates how they will be displayed in the Web browser window.
  This approach is often used to manage the activity displayed on a Web page by various media elements (audio, video, changing graphics or text).
  Server-side scripting:  a program running on a Web server creates a Web page in response to a request for specific information from a Web client.
  The content of the request can be determined by several things, including text that a user has entered into a Web form in the browser, extra text added to the end of a URL, the type of Web browser making the request or simply the passage of time.
  For example, if you are logged into an online banking site and do not enter any text or click anywhere on the page for a few minutes, you might find that the Web server ends your connection and sends a page to your browser indicating that your session has expired.
     Server
A server is any computer used to provide files or make programs available to other computers connected to it through a network (such as a LAN or a WAN).
The software that the server computer uses to make these files and programs available to the other computers is often called server software.
  Sometimes this server software is included as part of the operating system that is running on the server computer.
When a server computer is connected to the Internet and is running web server software (usually in addition to the server software it runs to serve files to client computers on its own network), it is called a Web server.
Server computer that handles incoming and outgoing e-mail is usually called an e-mail server, and the software that manages e-mail activity on that server is frequently called e-mail server software.
Server computer on which database management software runs is often called a database server.
Web Client/Server Architectures
When a person uses a web browser to visit a web site, the web browser (also known as a Web client) requests files from the web server at the company or organization that operates the web site.
Using the Internet as the transportation medium, the request is formatted by the browser using HTTP and sent to the server computer.
When the server receives the request, it retrieves the file containing the web page or other information that the client requested, formats it using HTTP and sends it back to the client over the Internet.
A file containing the text and mark up tags of a web page arrives at the client computer.
The web browser software determines that the information is an HTML page.
It displays the page on the client machine according to the directions defined in the page’s HTML code.
The basic Web client/server model is a two-tier model because it has only one client and one server.
All communication takes place on the Internet between the client and the server.
Other computers are involved in forwarding packets of information across the Internet, but the messages are created and read only by the client and the server computers in a two-tier client/server architecture.
A web site that delivers dynamic content and processes transactions must do more than respond to requests for Web pages.
A three-tier architecture extends the two-tier architecture to allow additional processing (for example, collecting the information from a database needed to generate a dynamic web page) to occur before the web server responds to the web client’s request.
The third tier often includes databases and related software applications that supply information to the web server.
The web server can then use the output of these software applications when responding to client requests, instead of just delivering a Web page.
  A good example of services supported by a database in a three-tier architecture is a catalog style web site with search, update, and display functions.
  Assume that a user requests a display of an online store’s product selections.
1.The client request is formulated into an HTTP message by the Web browser (tier 1), sent over the Internet to the Web server, and examined by the Web server.
2.The Web server (tier 2) analyses the request and determines that responding to the request requires the help of the server’s database.
1.The server sends a request to the database management software (tier 3) to search for, retrieve, and return all information about exotic fruit in the catalog database.
2.The database information flows back through the database management software system to the server, which formats the response into an HTML document and sends that document inside an HTTP response message back to the client over the Internet.
Software for web servers
Operating Systems for Web Servers:
Running programs and allocating computer resources such
  as memory and disk space to programs.
Operating system software also provides input and output services to devices connected to the computer, including the keyboard, monitor and printers.
A computer must have an operating system to run programs. For large systems, the operating system has even more responsibilities, including keeping track of multiple users logged on to the system and ensuring that they do not interfere with one another.
Web Server Software
1.  Apache HTTP Server
2.  Microsoft Internet Information Server (IIS)
3.  Sun Java System Web Server (JSWS).
 
Web server hardware
Server Computers
Web server computers generally have more memory, larger and faster hard disk drives, and faster processors than the typical desktop or notebook PCs with which you are probably
  familiar.
Web server computers use multiple processors; very few desktop PCs have more than one processor.
IP-sharing, or a virtual server, is a feature that allows different groups to share a single Web server’s IP address.
A virtual server or virtual host is a feature that maintains more than one server on one machine, can have separate domain names but all domain names refer to the same physical web server.
Web Server Hardware Architectures
Large electronic commerce web sites must deliver millions of individual web pages and process thousand of customers and vendors transactions each day.
Administrators of these large web sites must plan carefully to configure their web server computers, which can number in the hundreds or even thousands, to handle the daily web traffic efficiently.
These large collections of servers are called server farms because the servers are often lined up in large rooms, row after row, like crops in a field.
One approach, sometimes called a centralized architecture, is to use a few very large and fast computers.
A second approach is to use a large number of less-powerful computers and divide the workload among them. This is sometimes called a distributed architecture or more commonly, a decentralized architecture.
Each approach has benefits and drawbacks. The centralized approach requires expensive computers and is more sensitive to the effects of technical problems.
If one of the few servers becomes inoperable, a large portion of the site’s capability is lost.
Web sites with centralized architectures must have adequate backup plans.
Any server problem, no  matter how small, can threaten the operation of the site.
The decentralized architecture spreads that risk over a large number of servers. If one server becomes inoperable, the site can continue to operate without much degradation in capability.
The smaller servers used in the decentralized architecture are less expensive than the large servers used in the centralized approach.
The decentralized architecture does require additional hubs or switches to connect the servers to each other and to the Internet.
Most large decentralized sites use load-balancing systems, which cost additional money, to assign the workload efficiently.
Load-Balancing Systems
A load-balancing switch is a piece of network hardware that monitors the workloads of servers attached to it and assigns incoming web traffic to the server that has the most available capacity at that instant in time.
In a simple load-balancing system, the traffic that enters the site from the Internet through the site’s router encounters the load-balancing switch which then directs the traffic to the web server best able to handle the traffic.
  In more complex load-balancing systems, the incoming web traffic which might enter from two or more routers on a larger web site is directed to groups of web servers dedicated to specific tasks:
  groups of web servers that handle delivery of static HTML pages.
  groups of web servers that coordinate queries of an information database.
  groups of web servers that generate dynamic  web pages, and servers that handle transactions.

No comments:

Popular Posts