I am developing a location-based, social live nodejs app for a startup which, if successful would logically generate quite a load (posts, images, comments, etc).
I’m wondering if implementing a service from the start that provides flake id’s to my microservices is overkill (using the library: https://github.com/T-PWK/flake-idgen).
They say that premature optimization is bad, but then again creating an id service that allows for scaling doesn’t seem to be a bad idea and isn’t very hard. ‘If’ the app works well, then scaling for a social live app would become a necessity anyhow.
It is not a plan to have a monolithic database ‘per se’; so having an autoincrement key would bring me trouble anyhow in a distributed environment later on.
The thing I wonder about if this is considered ‘premature optimization’ because of the overhead it takes for the network requests.
What is your educated advice?