I wondering the rationale behind the big social networks folder structures for images they hold. I'm creating an API for a smaller social app with endpoints similar to the following:
https://api.example.com/v1/users/<id>
https://api.example.com/v1/users/<id>/posts/<post_id>
and users can upload profile images via a PUT
call to:
https://api.example.com/v1/users/<id>/images
Now the images are served through nginx and for example you can access the profile image via:
https://cdn.example.com/images/user/<id>/profile/<imagename>.jpg
So what I'm wondering is why Facebook, Twitter, Instagram and all those guys have structures similar to this giberish:
https://fbcdn-photos-d-a.akamaihd.net/hphotos-ak-xal1/v/t1.0-0/p480x480/10329215_977076969053738_7417509963714441891_n.jpg?oh=64aecaca7a84139c16e8a0f579782034&oe=57880BF0&__gda__=1469390211_f894185cc7e133738a0b9321e28e53c3
I'm aware they have insane levels of images to serve and they are across many servers, but I can't make sense of the URLs.