Facebook processes 600 Tb of data each day and has 1.71 billion active monthly users. Every single minute huge size of user data are uploaded to Facebook and at the same time needs to be delivered to user too. Facebook is a large network and it has to deliver data at faster speeds to each and every user. So, to deliver in the quickest time, it needs to use CDN(Content Delivery Network).
What is CDN ?
A content delivery network (CDN) is a system of distributed servers (network) that deliver webpages and other Web content to a user based on the geographic locations of the user, the origin of the webpage and a content delivery server.
Facebook uses akamaihd.net as CDN. So, what happens is when we upload photos, the photos are uploaded to akamaihd server not actually to Facebook. Whenever we make a request to view a photo on Facebook, our request is sent to the nearest possible akamaihd server. This server returns the requested photo in least delay from the nearest possible server. CDN is used to deliver contents, data in the fastest time to minimize the waiting time delays. Even Instagram uses the akamaihd as CDN.