Welcome to the Treehouse Community
Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community!
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.Start your free trial
Sachin Devatar919 Points
Explain the difference between HTTP and TCP/IP in Simple way by giving the real-world example?
Please provide a real-world example, it will be easy to understand and also helps to remember for a longer time.
Elad Ohana24,456 Points
TCP/IP is a method of addressing places on the internet, while HTTP refers to communication protocols when accessing websites. So an example would be if you wanted to host your own domain, and wanted to provide a website, as well as email and file transfers, your domain would have an IP address, with a TCP protocol to establish communication, and then you would need to set up HTTP for websites, SMTP for email and FTP for file transfers. This allows your server to provide the right information based on the requested communication.
You could think of it in terms of your house. For someone to access your house, they would need your address and directions to get there (analogous to TCP/IP protocol). What they do when they get there is dependent on the context. If you were throwing a party, your guests might take the front door and come right in, where as a caterer might need to go through the back and check in with someone. While they all took the same route to get there, they perform different functions once the destination has been reached.
Hopefully this helps.
I would say imagine that TCP/IP is the post office or FedEx where they are responsible for the breaking down of packets of information and routing them to and from their destinations. The sender and receiver all have an IP addresses which would represent their individual mailing address in the analogy and HTTP would be the initial request to send or receive.