Hi Sam,
Wow, thanks for the detailed response!
I have thought that I most definitely wasn't the first person to think of this question, but unfortunately my Googling skills failed me and I couldn't find a satisfying answer.
So, thank you VERY much for explaining the "Justin Bieber problem", despite having to have likely repeated yourself.
I haven't considered different types of databases, what firestore's limitations are and what it is best suited for.
Somehow I thought there must be a way to mitigate this problem and I just wasn't modeling the data properly.
I agree that scaling problems are good problems to have, and thinking about them too prematurely can be counterproductive.
I guess what I'm really looking for, since I'm new to firebase, is just what's the "typical" or "commonly accepted" way to model data for an app like instagram, so I can avoid trying to reinvent the wheel.
A better version of the question I asked might be:
Given that I want to start with only Firestore to keep things simple, how should I model my data for a social networking app?
Specifically, is the pattern of creating many features that increase the cost of write operations linearly acceptable?
(eg. having the user's name and avatar stored in every follower's "following" list, as well as with every post/comment made, and having to update them all when the user updates their profile)
If so, roughly at what point (eg. when a user gets more than X followers, user accumulated X comments) would this start to face scaling issues, and a more sophisticated setup with more than just firestore would be required?
Alternatively, would it be acceptable (or better) to only store the user id, and fetch the user details separately using the id, kind of like using a traditional RDBMS?
If you could offer some insights or even just point me to some good reference material, that would be amazing!
Thanks again for your reply, it is much appreciated.
Kind Regards,
Bill