What is the difference between HTTP and RTMP streaming? When should we use RTMP streaming?

The port, the door to the outside internet. The http uses port 80 or 443, nowadays https, most sites now have https instead of http . for example http://quora.com

try quora.com:443 it will work

now for the rtmp it uses port 1935

try quora.com:1935 it will not work.

quora is not a rtmp server. the rtmp is used for media servers like live videostreaming.

So if you could use rtmp to broadcast live it would be great because the delay broadcasting and receiving the video transmission on rtmp is good, just 1 or 2 seconds of delay. while if you just use a normal http server for live streaming the delay is much higher sometimes up to 25 seconds.

BUT, most firewalls or browsers will not allow the port 1935 to be open, or the plugin use which is called flash from adobe is not acceptable anymore. that means the viewer using a purely rtmp server will not be able to see the transmission.

But there are still uses for rtmp server, and it is like this, the broadcaster connects from his location to the server with a rtmp and then the rtmp server converts the stream to another protocol called HLS (https live streaming) so we back on port 80 or 443 and then the transmission can be viewed by nearly all devices. You can see a sketch at the site RTMP Server | RTMP to HLS And HTML5 Player and you can even order a free demo and test yourself broadcasting live.

Going back to the ports check http://rtmp-server.com:1935/ it works! they using wowza which is special server for live streaming. you can more on this at their site Wowza Live Streaming Software