6 Comments

This was a really nice read that helps really solidify some system design theoretical concepts seeing how it's applied in the real-world.

I also appreciated the diagram at the end too to help piece it all together.

Thanks for the article!

Expand full comment
author

I always appreciate your input Jordan. Thanks so much!

Expand full comment
Sep 17, 2023·edited Sep 17, 2023Liked by Leonardo Creed

Thank you for this convenient post!

About the S3 uploads, they cannot go direct to AWS servers. It has to go through the Instagram servers since the upload needs to be authenticated AND the S3 connection secrets can/should not be kept on the client end.

Expand full comment
author
Sep 17, 2023·edited Sep 18, 2023Author

Hey Ravi! The diagram simplifies this a bit so that there aren’t too many arrows going everywhere. But yes, you are absolutely correct! The application server is involved in image uploads for the reasons you mentioned.

We don't want clients to upload images to the application servers, so the servers can then put them into your object store. This will just burn resources and slow things down. Instead, the application server will be used to create signed URL requests so that the client can upload directly to S3.

Expand full comment

Great article!

I am curious on why they needed to query Redis for the User ID instead of retrieving it in along with the Picture ID. On the related linked article they mention it was for legacy reasons but still, seems odd to me that they had this setup.

Expand full comment

Maybe to identify the shard for the stored user data

Expand full comment