What happened when you visit www.google.com?

Type URL in browser: www.google.com(domain)
Find the nearest DNS server(Domain Name Service)
Send http/https request to the IP address
Web Server got the request and deliver it to HTTP server (port 80)
HTTP server resend the request to Django, Rails, NodeJS based Web Application
Web Application processes the request

Web System Arch

https://www.djangoproject.com...

HTTP server: Apache, Unicorn, Unicorn, Uwsgi

Design Tiny URL

  • bit.ly

  • Google url shortener

Scenario

  • bit.ly: transform Long URL --> Short URL

  • user: use short URL --> bit.ly

  • bit.ly: return Long URL --> user

  • user: request Long URL to redirect to the website

Needs


linspiration
161 声望53 粉丝