You can check the papers on the non-code repo [1] but an update to the whitepaper (4th draft) is in the works.
not sure what you mean by http interface discovery, thou. Each local node opens a readonly http interface (localhost:8080 by default) and a json api interface for cli and webui (localhost:5000 by default). gateway.ipfs.io simply a node that exposes it's readonly http interface.
The binary 'wire' protocol happens on 4000 by default. The discovery of other nodes happens by connecting to a bunch of known/configured nodes to bootstrap and asking them for other nodes.
[1] - https://github.com/jbenet/ipfs