Skip to content

SF-WDI-LABS/the-client-the-server-and-you

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 

Repository files navigation

Client, Servers, and You!

Objectives
Familiarize yourself with the basic technology transactions of browsing the web
Understand the difference between a domain name and an IP address

What is this client/server magic?

The client–server model is a distributed application structure that partitions tasks or workloads between the providers of a resource or service, called servers, and service requesters, called clients.

Often clients and servers communicate over a computer network on separate hardware, but both client and server may reside in the same system.

A server host runs one or more server programs which share their resources with clients.

A client does not share any of its resources, but requests a server's content or service function. Clients therefore initiate communication sessions with servers which await incoming requests.

Examples of computer applications that use the client–server model are Email, network printing, music streaming services, social media, and pretty much the whole World Wide Web.

- Source

The how and why

There are currently 1,151,254,186 websites in existence. You are currently on one laptop. How are you able to travel to every single one of those websites from your little dinky laptop with an expectation of speed and accuracy?

Domain Name System, or DNS servers, act as information redirectors that will direct your search for a certian website to it's actual physical server location. When we enter https://www.google.com into our browser, we actually go on a fantastic and magical ride across at least three separate servers across our greater region (Northern California for WDI-36) that help us find the actual Google server.

The Process:

  1. Type www.google.com into your browser address bar.

  2. Your browser sends an HTTP Request (internet magic) to a DNS server.

  3. The DNS server looks for a server that has a big list of all .com websites and sends us the IP address of that server. An IP address is a series of digits that act just like a physical street address.

  4. Now that we're in the .com server, they send us to yet another server that will send us to a more specific DNS server that, for example, maybe contains only websites that start with the letters E through K.

  5. We have finally been taken to the DNS server that knows where Google.com is! Yay! The final DNS server gives us the specific IP address of Google.com (139.130.4.5).

  6. Our browser finally goes to the address given by the last DNS Server and we see the beautiful Google landing page of the day!

screen shot 2017-02-18 at 10 25 37 am

Cool, but now what?

We now have Google displayed on our browser. This is great! We made a request for the webpage, and we received a response from Google's server. Now what do we do if we want to find awesome gif files of puppies? There's going to be another set of requests and responses.

We now send a request to Google for puppy gifs. It looks like this up in the address bar when we type in our search:

https://www.google.com/#safe=on&q=puppy+gifs

This is the piece of information that is sent to Google. The section of information #safe=on&q=puppy+gifs tells google we want safe search to be on (SFW, people!) and our query is for puppy gifs.

We send this request to Google directly (no more DNS Servers.) Google receives our information, finds puppy gifs for us, then sends back a web page with the resulting information as a response.

This pattern of requests for information from clients and relevant responses from servers is the backbone of modern internet activity. Neat, right?!

Resources

Releases

No releases published

Packages

No packages published