3

Let's consider the following example:

I have a solution made with C# on Visual Studio, it has a multi-tier architecture, the different layers are the following:

  • Data Model (Library)

  • Data Access (Library)

  • Business Logic (Library)

    ---------- services --------

  • Rest Service (ASP.NET Web API)

  • WCF Service (WCF Service Library)

    They can access the Business Logic and have been published on IIS


  • Proxy (Library): it uses the services mentioned above and connects to the IIS

  • Web Application (ASP .NET MVC 5). It uses the Proxy to access the Business Logic

All of them are on the same machine.

Referring to the scenario and components mentioned above, can you explain to me the difference between the web server (IIS) and the server?

More specifically, I refer to IIS as the webserver. Which is considered to be the server, is it different?

When I browse the pages (Razor Views) of the web application from Visual Studio, a segment of the URL is "Localhost": is it correct to say that it refers to the server and it means that every project and folder I need is in the current machine?

And when I browse the Rest and WCF services from IIS instead, does the "localhost" in the URL refers to the IIS Web Server or does it refer to the Server?

  • 5
    A web server is a server that speaks HTTP. – Bergi Nov 29 '20 at 13:54
  • 1
    A server can both refer to the hardware and to a piece of software. – Polygnome Nov 29 '20 at 21:52
9

"Server" is a generic term that represents a computer that shares something.

There are many different types of servers. Some share databases, others share web sites, still others share files and pictures.

IIS is an application, like WordPress, that runs on the server. In that regard, the terms IIS and server are synonymous. Technically, it is a service that runs on top your MS operating system. As a service, it listens for requests across specific protocols like HTTP/S and FTP, processes those requests and then shares them back to the user if appropriate.

Other servers like database or file servers, listen on entirely different ports and protocols for requests.

All of the items you listed are simply applications that extend the underlying functionality of the MS operating system.

It might help if you did some research on the OSI model for a better understanding of networking and computer architecture. You could start with https://rtnetworks.com/OSI.htm for a basic understanding of how network protocols, and ports work. It's a very old whitepaper, but explains networking in simple to understand terms.

is it correct to say that it refers to the server and it means that every project and folder I need is in the current machine?

That might be an overstatement.

Localhost is a pseudonym for the computer you are physically sitting at (or connecting to through a shell program). It represents an internal IP address of 127.0.0.1. Every computer using TCP/IP protocol, has this address built into it, and usually the pseudonym localhost. But back to your question, generally speaking anything you access using localhost in your path, will be to the computer you are sitting at.

  • Considering that I have all the items on the same machine, is it correct to say that in my scenario I just have ONE server which is the IIS webserver? And what if I move the database and the data access layer on a different machine instead? In that case, I would have two servers? (on to serve the data, the other one would be IIS which serves the web application...?) – franz1 Nov 29 '20 at 15:50
  • 1
    @franz1, yes that would be correct. It might help if you think of your computer as a UPS Mail Box Store with lots of mail boxes. The UPS Store has a physical address, say 123 Main Street and several mail boxes. The UPS stores receives the mail for all of the boxes at that store location, and then distributes them to various mail boxes. Each mail box, listens for messages addressed to that box and processes them. In computer terms, the street address of the UPS store is an IP address, and the mail box number is the port. – Trebor Nov 29 '20 at 18:24
  • thank you @Trebor, I have a doubt related to this--> I have my Rest and WCF services published on IIS; my MVC application calls the proxy which is connected to those services: Should I publish the web application on the same IIS web server ? Or is it supposed to be deployed elsewhere? – franz1 Nov 29 '20 at 19:55
  • 1
    @franz1, that is completely up to you. Per docs.microsoft.com/en-us/dotnet/framework/wcf/whats-wcf A service endpoint can be part of a continuously available service hosted by IIS, or it can be a service hosted in an application. It's been years since I worked with .NET but my general rule was to host applications in IIS, until they became so intensive that there was a performance reason to move them or the database off to another machine. IIS can handle most internal and external applications without performance issues. We supported 300K users on our apps. – Trebor Nov 29 '20 at 20:10
  • "IIS is an application, like WordPress, that runs on the server. In that regard, the terms IIS and server are synonymous." - Why would "IIS" and "server" be synonymous in this "regard", since in the previous sentence you described IIS as an application that runs on a server and compared it to "WordPress". (?) – MrWhite Nov 30 '20 at 16:46
4

The word "server" has become a bit ambiguous but general means a computer which provides information to other computers.

A web server used to be a physical machine that provided web pages to other other machines (clients). It also came to mean the software that served web pages- although this is really a misuse - a (software) webserver is technically speaking a web service - a service being software running on a server to answer requests to clients.

Referring to localhost as a server is correct - it refers to a machine/server (this machine)

A URL stands for uniform resource locator, and provides the details to get information. It includes thebserver, service and unique identifier, for example in the form

service://server/unique_identifier

  • by looking at the URL I've been using so far to test the application, it's "HTTP://localhost/8080/api/name_of_the_rest_controller/…", i-e-the first segment is the protocol, the second one is the server, the third one is the port number. Do they represent the segments of the form example you mentioned (service, server and unique_identifier)? – franz1 Nov 29 '20 at 15:33
1

A web server accepts and fulfills requests from clients for static content (i.e., HTML pages, files, images, and videos) from a website. Web servers handle HTTP requests and responses only.

An application server exposes business logic to the clients, which generates dynamic content. It is a software framework that transforms data to provide the specialized functionality offered by a business, service, or application. Application servers enhance the interactive parts of a website that can appear differently depending on the context of the request.

Web Server VS Application Server

Web Server Deliver static content. Content is delivered using the HTTP protocol only. Serves only web-based applications. No support for multi-threading. Facilitates web traffic that is not very resource intensive.

Application Server Delivers dynamic content. Provides business logic to application programs using several protocols (including HTTP). Can serve web and enterprise-based applications. Uses multi-threading to support multiple requests in parallel. Facilitates longer running processes that are very resource-intensive​.

  • thank you for answering my Q. Is it correct to say that IIS is an "application server" (not a web server), as the services I published on it do use the business logic of my application? – franz1 Dec 7 '20 at 16:57

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.