I don't know that much about how SSH works, but from what I understand it basically takes your keyboard input and pipes it into the shell of a remote console. Pretty light-weight once the connection has been established and keys exchanged.
HTTP is a totally different protocol. It works a bit like this, assuming it's a just a static HTML page:
- Establish TCP/IP session (this could involve DNS lookups)
- Send HTTP headers
- Send HTTP request body (GET, POST, PUT, etc)
- Web server receives HTTP request
- Web server checks its handler mappings to figure out how to process the request
- Web server picks up the static HTML file
- Web server formulates the response headers and sends them down the wire
- Web server pushes the static HTML file down the wire
- Your browser receives the headers
- Your web browser receives the response
- Your web browser waits for the connection to be closed
- Your web browser then parses the HTML
- Your web browser then renders the HTML to the monitor
That's a really basic overview, but there's a lot more that goes on in HTTP. It's not a "light-weight" protocol, unlike SSH.
Also, unlike SSH, most HTTP requests are self-contained and your TCP connections re-established. SSH keeps your TCP session open, meaning that every time you press a key, you don't have to re-establish the connection. That's why your web browser can survive being unplugged for a few minutes, but the moment you lose your connection your SSH session drops.
This is actually a fair question. SSH has a little-known SSH Subsystems mode (https://www.oreilly.com/library/view/ssh-the-secure/0596008953/ch05s08.html) which is used for example by NETCONF to allow configuring network equipment and it directly competes with RESTCONF that does the same thing via HTTPS/REST.
– berezovskyi – 2019-09-23T14:05:02.8431If you mean, "Why does something feel somehow?" this question will be closed. I'm sure you can edit it to conform with the FAQ – Xavierjazz – 2014-02-10T23:47:22.147
5Why does riding a bike feel so much faster than making a cup of coffee? You're comparing completely different technologies, there's no point of reference. – Joel E Salas – 2014-02-10T23:47:23.657