18 ms·
> This gives us a 1% probability of a collision in the next ~35 years if we are generating 1,000 IDs per hour. Yes, but that's for 1,000 IDs per hour. That is
by ezekg 4y ago
> This gives us a 1% probability of a collision in the next ~35 years if we are generating 1,000 IDs per hour.
Yes, but that's for 1,000 IDs per hour. That is not a large workload. If you generate 10 IDs per second (which, again, is not a lot), your time frame shrinks to just over 1 year. With 100 IDs per second, a mere 36 days. With your reduced alphabet, I would at the very least bump your ID length to 16 characters.
- ithkuil 4y agoThat's why there are no silver bullets. They have a problem (long IDs in links), they have a scenario (no more than 1000 entities, databases, I suppose, created every hour), and they found something simple that solves their problem under the requirements derived from their scenario. YMMV