Use MD5, Base64 to encode the URL, instead of an default generate by DB( 1,2,3....), or Base62([A-Z],[a,z],[0-9]), Base64([A-Z],[a,z],[0-9],[, /]) this wlll better than using Base10 (0-9)
Let assume we will generate 6 characters and used Base64:
- 6 characters: 64^6 = 68.7 Billions
We will need a KGS DB size: 68.7 billions * 6 bytes (6 charaters) ~ 400 GB.