After reading a few hits in a quick google search , it seems like there is not much consistency when it comes to determining the average length of a URL.
I know that IE has a maximum URL length of 2083 characters (from here ) - so I have a good maximum for working.
My concern is that I am writing a URL shortener in PHP ( similar to some other questions on SO), and I want to make sure that I cannot exceed the storage capabilities of the server on which it is hosted.
If all URLs are IE max values, then 2^32
will not be conveniently located anywhere - it will take 2K x 4B ~= 8TB
for storage: unrealistic expectation.
Without adding a cropping function (i.e. cleaning up old "shortened URLs"), what is the safest way to calculate application storage usage?
Is ~ 34 characters safe to guess? If so, then the full one (using the int
database for the primary key) will digest 292 GB of space (double 146 GB for any metadata that can be saved).
What is best for such an application?
warren
source share