2 ms·
what if I start at a random int number? consider your first customer to be 546472?
by merb 9y ago
what if I start at a random int number? consider your first customer to be 546472?
- xtreme 9y agoYou can still guess the growth over a period of time.
- jasonshaev 9y agoSure, not a bad idea :) That being said, I can still extract information. For example, I can create a user today, and then another user a week from today. From that information I can extract how many new users a service adds in a week. To avoid that, I can increment by a value other than one, but that might make sharding harder unless I pick a number like 10, 1000, etc. (of course depending on sharding strategy), which is probably easy to figure out. I guess my point is that it's harder to avoid leaking information with auto incrementing IDs. This may or may not matter depending on the use case.